using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.SC.SC;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace APT.MS.Domain.Entities.SC
{
    /// <summary>
    /// 责任制岗位
    /// </summary>
    [Description("责任制岗位")]
    public class T_SC_POST : MesEntityBase
    {
        /// <summary>
        /// 编号
        /// </summary>
        [Description("编号")]
        public string CODE { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Description("名称")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldLength(100)]
        public string NAME { get; set; }

        /// <summary>
        /// 是否为兼职安全员
        /// </summary>
        [Description("是否为兼职安全员")]
        [FormFieldEdit]
        [FormFieldTable]
        public bool AS_SAFE_USER { get; set; }

        /// <summary>
        /// 部门岗位
        /// </summary>
        [Description("部门岗位")]
        [FormFieldEdit]
        public List<T_SC_POST_DEPOST> Nav_Posts { get; set; }

        /// <summary>
        /// 导航属性：责任制签订模板
        /// </summary>
        [Description("责任制签订模板")]
        public List<T_SC_POST_SAFE_PDT_TEMPLATE_FILE> Nav_Files { get; set; }

        [Description("负责人组织")]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("负责人组织")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }
        /// <summary>
        /// 负责人岗位
        /// </summary>
        [Description("负责人岗位")]
        [DataFieldForeignKey("Nav_Depost")]
        [FormFieldEdit]
        public Guid? DEPOST_ID { get; set; }

        /// <summary>
        /// 导航:负责人岗位
        /// </summary>
        [Description("导航:负责人岗位")]
        public T_FM_USER_POST Nav_Depost { get; set; }

        [Description("组织架构")]
        [FormFieldEdit]
        public List<T_SC_DEPARTMENT> Nav_Depts { get; set; }
    }
}
