Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
using SDK.Communication;
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 int SectorId { get; set; }
public int ValidSectorId { get; set; }
public string Title { get; set; }
public string Note { get; set; }
public long LastTimeOnline { get; set; }
public long ValidLastTimeOnline { get; set; }
public float X { get; set; }
public float Y { get; set; }
public float ValidX { get; set; }
public float ValidY { get; set; }
public string AppVersion { get; set; }
public bool IsMoving { get; set; }
public int FallStatus { get; set; }
public float Battery { get; set; }
public int DeviceTypeId { get; set; }
public string DeviceType { get; set; }
public bool Position { get; set; }
public bool Geofence { get; set; }
public float GeofenceRange { get; set; }
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,
};
}
}
}