using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using OpenAuth.Repository.Core;
using SqlSugar;

namespace OpenAuth.Repository.Domain
{
    /// <summary>
    /// 组织表
    /// </summary>
    [SugarTable("sys_org")]
    public partial class SysOrg : TreeEntity<long>
    {
        /// <summary>
        /// 节点图标文件名称
        /// </summary>
        [Description("节点图标文件名称")]
        public string IconName { get; set; }

        /// <summary>
        /// 当前状态
        /// </summary>
        [Description("当前状态")]
        public int Status { get; set; }
        /// <summary>
        /// 业务对照码
        /// </summary>
        [Description("业务对照码")]
        public string BizCode { get; set; }
        /// <summary>
        /// 自定义扩展码
        /// </summary>
        [Description("自定义扩展码")]
        public string CustomCode { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Description("创建时间")]
        public System.DateTime CreateTime { get; set; }
        /// <summary>
        /// 创建人ID
        /// </summary>
        [Description("创建人ID")]
        public long CreateId { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        [Description("排序号")]
        public int SortNo { get; set; }

        public long PosGroupId { get; set; }
        /// <summary>
        /// 等级
        /// </summary>
        public int Level { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<SysOrg> Children { get; set; }

        //[Navigate(NavigateType.OneToOne, nameof(ParentId))]
        //public SysOrg Parent { get; set; }

    }
}