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

namespace APT.MS.Domain.Entities.SC.SC
{
    [Description("标准化创建")]
    public class T_SC_STANDARD_CREATE : MesEntityBase
    {
        [Description("编号")]
        public string CODE { get; set; }
        [Description("名称")]
        public string NAME { get; set; }
        [Description("编制单位")]
        public string UNIT { get; set; }
        [Description("编制时间")]
        public DateTime? COMPILE_TIME { get; set; }

        [Description("颁布时间")]
        public DateTime? PUBLISH_TIME { get; set; }
        [Description("录入人员")]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }

        [Description("录入人员")]
        public virtual T_FM_USER Nav_User { get; set; }
        [Description("文件附件")]
        public ICollection<T_SC_STANDARD_CREATE_FILE> Nav_Files { get; set; }
        [Description("版本号")]
        public decimal? VERSION { get; set; }
        [Description("修订/废除原因")]
        public string REASON { get; set; }
        [Description("修订概要")]
        public string PROFILE { get; set; }
        [Description("修订/废除时间")]
        public DateTime? UPDATE_TIME { get; set; }

        [Description("制定要求")]
        public string FORMULATE { get; set; }

        [Description("文件状态")]
        [EnumName("SCSystemFileStatus")]
        public SCSystemFileStatus FILE_STATUS { get; set; }
        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("类型")]
        [EnumName("SCType")]
        public SCType TYPE { get; set; }
        [Description("状态")]
        [EnumName("SCSystemEditStatus")]
        public SCSystemEditStatus STATUS { get; set; }

        [Description("责任制说明")]
        public string NOTE { get; set; }
        [Description("责任制岗位")]
        [DataFieldForeignKey("Nav_Post")]
        public Guid? POST_ID { get; set; }

        [Description("责任制岗位")]
        public virtual T_SC_POST Nav_Post { get; set; }
        [Description("导航属性：批量新增")]
        [DataFieldIngore]
        public virtual ICollection<T_SC_STANDARD_CREATE> Nav_Details { get; set; }
        [Description("导入类型")]
        [EnumName("DisableStatusEnum")]
        public DisableStatusEnum IMPORT_TYPE { get; set; }

        [Description("版本号")]
        [DataFieldIngore]
        public string VERSION_NAME { get; set; }

        [Description("文件名称")]
        public string FILE_NAME { get; set; }
        [Description("文件内容")]
        [DataFieldLength(5000)]
        public string FILE_CONTENT { get; set; }

        [Description("法律法规ID")]
        public Guid? LAW_ID { get; set; }

        [Description("法律法规名称")]
        public string LAW_NAME { get; set; }

        [Description("部门层级")]
        [EnumName("SCDepartmentType")]
        public SCDepartmentType DEPARTMENT_TYPE { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
     
        [Description("录入部门")]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("录入部门")]
        public virtual T_FM_DEPARTMENT Nav_Department { get; set; }

        /// <summary>
        /// 生产单元类型
        /// </summary>
        [Description("生产单元类型")]
        [EnumName("FMProductionUnit")]
        public FMProductionUnit? MineType { get; set; }
    }
}
