using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Atomx.Common.Entities { /// /// 地区(国家、省、市、区) /// [Table("Areas")] public class Area { /// /// 数据ID /// [DatabaseGenerated(DatabaseGeneratedOption.None)] [Key] public long Id { get; set; } /// /// 上级ID /// public long ParentId { get; set; } /// /// 地区名称 /// [Column(TypeName = "varchar(256)")] public string Name { get; set; } = string.Empty; /// /// 首字母 /// [Column(TypeName = "varchar(1)")] public string Initial { get; set; } = string.Empty; /// /// 双字母代码 /// [Column(TypeName = "varchar(2)")] public string TwoLetterISOCode { get; set; } = string.Empty; /// /// 三字母代码 /// [Column(TypeName = "varchar(3)")] public string ThreeLetterISOCode { get; set; } = string.Empty; /// /// 数字代码 /// public int NumericISOCode { get; set; } /// /// 是否允许配送 /// public bool AllowShipping { get; set; } /// /// 是否启用 /// public bool Enabled { get; set; } /// /// 显示排序 /// public int DisplayOrder { get; set; } } }