using System.ComponentModel.DataAnnotations;
|
|
namespace Yw.Model
|
{
|
/// <summary>
|
/// 行政区域
|
/// </summary>
|
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;
|
}
|
|
/// <summary>
|
/// 名称
|
/// </summary>
|
[Display(Name = "名称")]
|
public string Name { get; set; }
|
|
/// <summary>
|
/// 国家编码
|
/// </summary>
|
[Display(Name = "国家编码")]
|
public string CountryCode { get; set; }
|
|
/// <summary>
|
/// 父级ID列表
|
/// </summary>
|
[Display(Name = "父级ID列表")]
|
public List<long> ParentIds { get; set; }
|
|
/// <summary>
|
/// 类型
|
/// </summary>
|
[Display(Name = "类型")]
|
public Yw.Model.eDivisionType Type { get; set; }
|
|
/// <summary>
|
/// 高德地图城市编码
|
/// </summary>
|
[Display(Name = "高德地图城市编码")]
|
public string ADCode { get; set; }
|
|
/// <summary>
|
/// 标签列表
|
/// </summary>
|
[Display(Name = "标签列表")]
|
public List<string> Flags { get; set; }
|
|
/// <summary>
|
/// 标签名称
|
/// </summary>
|
[Display(Name = "标签名称")]
|
public string TagName { get; set; }
|
|
/// <summary>
|
/// 排序码
|
/// </summary>
|
[Display(Name = "排序码")]
|
public int SortCode { get; set; }
|
|
/// <summary>
|
/// 说明
|
/// </summary>
|
[Display(Name = "说明")]
|
public string Description { get; set; }
|
|
public Division Clone()
|
{
|
return (Division)this.MemberwiseClone();
|
}
|
|
object ICloneable.Clone()
|
{
|
return this.MemberwiseClone();
|
}
|
}
|
}
|