using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 地区（国家、省、市、区）
    /// </summary>
    public class Area
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 上级ID
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 地区名称
        /// </summary>

        [Column(TypeName = "varchar(255)")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 首字母
        /// </summary>
        [Column(TypeName = "varchar(1)")]
        public string Initial { get; set; } = string.Empty;

        /// <summary>
        /// 双字母代码
        /// </summary>
        [Column(TypeName = "varchar(2)")]
        public string TwoLetterISOCode { get; set; } = string.Empty;

        /// <summary>
        /// 三字母代码
        /// </summary>
        [Column(TypeName = "varchar(3)")]
        public string ThreeLetterISOCode { get; set; } = string.Empty;

        /// <summary>
        /// 数字代码
        /// </summary>
        public int NumericISOCode { get; set; }

        /// <summary>
        /// 是否允许配送
        /// </summary>
        public bool AllowShipping { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 显示排序
        /// </summary>
        public int DisplayOrder { get; set; }

    }
}
