using Hotline.Settings;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.Org
{
    public class AddOrgDto
    {
        /// <summary>
        /// 组织架构名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 组织架构简称
        /// </summary>
        public string ShortName { get; set; }

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

        /// <summary>
        /// 上级名称
        /// </summary>
        public string? ParentName { get; set; }

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

        /// <summary>
        /// 部门类型
        /// </summary>
        public EOrgType OrgType { get; set; }

        /// <summary>
        /// 区域Code（行政区域代码）
        /// </summary>
        public string AreaCode { get; set; }

        /// <summary>
        /// 区域名称
        /// </summary>
        public string AreaName { get; set; }

        public string OrgTypeText => OrgType.GetDescription();
    }

    public class UpdateOrgDto : AddOrgDto
    {
        public string Id { get; set; }
    }

    public class OrgDto : UpdateOrgDto
    {
        ///// <summary>
        ///// 组织架构Code
        ///// </summary>
        //public string OrgCode { get; set; }

        /// <summary>
        /// 部门级别
        /// </summary>
        public int Level { get; set; }

        public string OrgTypeText => OrgType.GetDescription();
    }
}
