Newer
Older
using SDK.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SDK.Contracts.Communication
{
class AddDeviceResponseContract : PostResponseContract
{
public int Id { get; set; }
public string Mac { get; set; }
public int BranchId { get; set; }
public string Title { get; set; }
public string Note { get; set; }
public string AppVersion { get; set; }
public bool IsMoving { get; set; }
public int DeviceTypeId { get; set; }
public string DeviceType { get; set; }
public bool Position { get; set; }
public bool Geofence { get; set; }
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
public string Login { get; set; }
//public string Password { get; set; }
//public string Salt { get; set; }
public static explicit operator DeviceContract(AddDeviceResponseContract addDeviceResponseContract)
{
return new DeviceContract
{
Id = addDeviceResponseContract.Id,
Mac = addDeviceResponseContract.Mac,
BranchId = addDeviceResponseContract.BranchId,
SectorId = addDeviceResponseContract.SectorId,
ValidSectorId = addDeviceResponseContract.ValidSectorId,
Title = addDeviceResponseContract.Title,
Note = addDeviceResponseContract.Note,
LastTimeOnline = addDeviceResponseContract.LastTimeOnline,
ValidLastTimeOnline = addDeviceResponseContract.ValidLastTimeOnline,
X = addDeviceResponseContract.X,
Y = addDeviceResponseContract.Y,
ValidX = addDeviceResponseContract.ValidX,
ValidY = addDeviceResponseContract.ValidY,
AppVersion = addDeviceResponseContract.AppVersion,
IsMoving = addDeviceResponseContract.IsMoving,
FallStatus = addDeviceResponseContract.FallStatus,
Battery = addDeviceResponseContract.Battery,
DeviceTypeId = addDeviceResponseContract.DeviceTypeId,
DeviceType = addDeviceResponseContract.DeviceType,
Position = addDeviceResponseContract.Position,
Geofence = addDeviceResponseContract.Geofence,
GeofenceRange = addDeviceResponseContract.GeofenceRange,
Login = addDeviceResponseContract.Login,
};
}
}
}