JLChen
2021-01-05 f500e14c0a994487070380c50c85e0929cbc8e63
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
94
95
96
97
98
99
100
101
102
103
using System;
using System.Collections.Generic;
 
namespace Shared
{
    [Serializable]
    public class RegionInfoRes
    {
        /// <summary>
        /// 修复旧APP数据丢失 兼容恢复
        /// </summary>
        public int RegionID
        {
            set
            {
                if (value != 0)
                    Id = value.ToString();
            }
        }
 
        public string RegionName
        {
            set
            {
                if (!string.IsNullOrEmpty(value))
                    Name = value;
            }
        }
 
        public string MAC
        {
            set
            {
                if (!string.IsNullOrEmpty(value))
                {
                    if (HomeGateways != null && HomeGateways.Count > 0)
                    {
                        HomeGateways[0].GatewayUniqueId = value;
                    }
                    else
                    {
                        var mHomeGateways = new HomeGateways() { GatewayUniqueId = value };
                        var mList = new List<HomeGateways>();
                        mList.Add(mHomeGateways);
                        HomeGateways = mList;
                    }
                }
            }
        }
    
 
        public string Id { get; set; }
     
        public string Name { get; set; }
 
        //public string MAC { get; set; }
        public List<HomeGateways> HomeGateways = new List<HomeGateways> ();
 
         /// <summary>
        /// 是否为其他主用户分享过来的住宅
        /// </summary>
        public bool IsOthreShare { get; set; }
        /// <summary>
        /// 当前住宅是其他主帐号分享过来的主帐号的分布式Id
        /// </summary>
        public string MainUserDistributedMark { get; set; }
        /// <summary>
        /// 仅子账号登陆的时候使用,当【IsOthreShare】为"true",并且【AccountType】为"1"时,该账号拥有管理员权限
        /// </summary>
        public int AccountType { get; set; }
        /// <summary>
        /// 经度
        /// </summary>
        public double Longitude = 0;
        /// <summary>
        /// 纬度
        /// </summary>
        public double Latitude = 0;
 
    }
 
    [Serializable]
    public class HomeGateways {
        public string GatewayUniqueId { get; set; }
        
    }
 
 
    [Serializable]
    public class ResidenceRes
    {
        public int PageIndex;
        public int PageSize;
        public int TotalCount;
        public int TotalPages;
        public bool HasPreviousPage;
        public bool HasNextPage;
        public string RegionName;
 
        public List<RegionInfoRes> PageData = new List<RegionInfoRes> ();
 
    }
}