using System.ComponentModel.DataAnnotations;
namespace Yw.Model
{
///
/// 行政区域
///
public class Division : BaseModel, ISorter, ITagName, IFlags, ITreeSorter, System.ICloneable
{
public Division()
{ }
public Division(Division rhs) : base(rhs)
{
this.ID = rhs.ID;
this.Name = rhs.Name;
this.ParentIds = rhs.ParentIds;
this.Type = rhs.Type;
this.ADCode = rhs.ADCode;
this.Flags = rhs.Flags?.ToList();
this.TagName = rhs.TagName;
this.SortCode = rhs.SortCode;
this.Description = rhs.Description;
this.CountryCode = rhs.CountryCode;
}
public void Reset(Division rhs)
{
this.ID = rhs.ID;
this.Name = rhs.Name;
this.ParentIds = rhs.ParentIds;
this.Type = rhs.Type;
this.ADCode = rhs.ADCode;
this.Flags = rhs.Flags?.ToList();
this.TagName = rhs.TagName;
this.SortCode = rhs.SortCode;
this.Description = rhs.Description;
this.CountryCode = rhs.CountryCode;
}
///
/// 名称
///
[Display(Name = "名称")]
public string Name { get; set; }
///
/// 国家编码
///
[Display(Name = "国家编码")]
public string CountryCode { get; set; }
///
/// 父级ID列表
///
[Display(Name = "父级ID列表")]
public List ParentIds { get; set; }
///
/// 类型
///
[Display(Name = "类型")]
public Yw.Model.eDivisionType Type { get; set; }
///
/// 高德地图城市编码
///
[Display(Name = "高德地图城市编码")]
public string ADCode { get; set; }
///
/// 标签列表
///
[Display(Name = "标签列表")]
public List Flags { get; set; }
///
/// 标签名称
///
[Display(Name = "标签名称")]
public string TagName { get; set; }
///
/// 排序码
///
[Display(Name = "排序码")]
public int SortCode { get; set; }
///
/// 说明
///
[Display(Name = "说明")]
public string Description { get; set; }
public Division Clone()
{
return (Division)this.MemberwiseClone();
}
object ICloneable.Clone()
{
return this.MemberwiseClone();
}
}
}