2021-05-13 20:03:07 +02:00
|
|
|
|
using System;
|
|
|
|
|
using TINK.Model.Bikes.Bike.BluetoothLock;
|
|
|
|
|
|
|
|
|
|
namespace TINK.Model.Bike.BluetoothLock
|
|
|
|
|
{
|
|
|
|
|
public class BikeInfoMutable : BC.BikeInfoMutable, IBikeInfoMutable
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Constructs a bike object from source. </summary>
|
2022-01-04 18:59:16 +01:00
|
|
|
|
public BikeInfoMutable(BikeInfo bike, string stationName) : base(
|
2022-04-25 22:15:15 +02:00
|
|
|
|
bike.Id,
|
|
|
|
|
bike.LockModel,
|
2021-05-13 20:03:07 +02:00
|
|
|
|
bike.IsDemo,
|
|
|
|
|
bike.Group,
|
|
|
|
|
bike.WheelType,
|
|
|
|
|
bike.TypeOfBike,
|
|
|
|
|
bike.Description,
|
2022-01-04 18:59:16 +01:00
|
|
|
|
bike.StationId,
|
|
|
|
|
stationName,
|
2021-05-13 20:03:07 +02:00
|
|
|
|
bike.OperatorUri,
|
|
|
|
|
bike.TariffDescription,
|
|
|
|
|
() => DateTime.Now,
|
|
|
|
|
bike.State)
|
|
|
|
|
{
|
|
|
|
|
LockInfo = new LockInfoMutable(
|
|
|
|
|
bike.LockInfo.Id,
|
|
|
|
|
bike.LockInfo.Guid,
|
|
|
|
|
bike.LockInfo.UserKey,
|
|
|
|
|
bike.LockInfo.AdminKey,
|
|
|
|
|
bike.LockInfo.Seed,
|
|
|
|
|
bike.LockInfo.State);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public LockInfoMutable LockInfo { get; }
|
|
|
|
|
|
|
|
|
|
ILockInfoMutable IBikeInfoMutable.LockInfo => LockInfo;
|
|
|
|
|
}
|
|
|
|
|
}
|