using System; using System.Collections.Generic; namespace Shared { [Serializable] public class RegionInfoRes { /// /// 修复旧APP数据丢失 兼容恢复 /// 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(); mList.Add(mHomeGateways); HomeGateways = mList; } } } } public string Id { get; set; } public string Name { get; set; } //public string MAC { get; set; } public List HomeGateways = new List (); /// /// 是否为其他主用户分享过来的住宅 /// public bool IsOthreShare { get; set; } /// /// 当前住宅是其他主帐号分享过来的主帐号的分布式Id /// public string MainUserDistributedMark { get; set; } /// /// 仅子账号登陆的时候使用,当【IsOthreShare】为"true",并且【AccountType】为"1"时,该账号拥有管理员权限 /// public int AccountType { get; set; } /// /// 经度 /// public double Longitude = 0; /// /// 纬度 /// 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 PageData = new List (); } }