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

namespace APT.MS.Domain.Entities.FO
{
    /// <summary>
    /// 岗位当班工作记录表
    /// </summary>
    [Description("岗位当班工作记录表")]
    public class T_FO_CURRENT_CLASS_RECORD : MesEntityBase
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Description("编码")]
        public string CODE { get; set; }

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

        /// <summary>
        /// 编辑人
        /// </summary>
        [Description("编辑人")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Editor")]

        public Guid? EDITOR_ID { get; set; }

        /// <summary>
        /// 编辑人
        /// </summary>
        [Description("编辑人")]
        public T_FM_USER Nav_Editor { get; set; }


        /// <summary>
        /// 记录日期
        /// </summary>
        [Description("记录日期")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public DateTime RECORD_DATE { get; set; }
        /// <summary>
        /// 设备工具材料使用存放情况
        /// </summary>
        [Description("设备工具材料使用存放情况")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string DEVICE_STORAGE { get; set; }



        /// <summary>
        /// 班次
        /// </summary>
        [Description("班次")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Class")]

        public Guid? CLASS_ID { get; set; }

        /// <summary>
        /// 班次
        /// </summary>
        [Description("班次")]
        public T_FM_CLASS Nav_Class { get; set; }
        /// <summary>
        /// 部门
        /// </summary>
        [Description("部门")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Department")]

        public Guid? DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        [Description("部门")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }


        /// <summary>
        /// 部门岗位
        /// </summary>
        [Description("部门岗位")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_DepartmentPost")]

        public Guid? DEPARTMENT_POST_ID { get; set; }

        /// <summary>
        /// 部门岗位
        /// </summary>
        [Description("部门岗位")]
        public T_FM_USER_POST Nav_DepartmentPost { get; set; }

        /// <summary>
        /// 交接班状态（待处理、已记录、签到中、班组长待确认、交班完成、接班中、交接完成）
        /// </summary>
        [Description("交接班状态")]
        [EnumName("FOShiftStatusEnum")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public int SHIFT_STATUS { get; set; }

        #region 本班运行情况
        /// <summary>
        /// 本班运行情况
        /// </summary>
        [EnumName("FOShiftRecordStatusEnum")]
        [Description("本班运行情况")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public int CURRENT_CLASS_STATUS { get; set; }

        /// <summary>
        /// 本班运行情况存在问题
        /// </summary>
        [Description("本班运行情况存在问题")]
        [FormFieldEdit]

        public string CURRENT_CLASS_QUESTION { get; set; }

        /// <summary>
        /// 本班运行情况处理情况
        /// </summary>
        [Description("本班运行情况处理情况")]
        [FormFieldEdit]

        public string CURRENT_CLASS_MEASURE { get; set; }
        #endregion

        #region 设备运行状况
        /// <summary>
        /// 设备运行状况
        /// </summary>
        [EnumName("FOShiftRecordStatusEnum")]
        [FormFieldEdit]

        [Description("设备运行状况")]
        public int DEVICE_STATUS { get; set; }

        /// <summary>
        /// 设备运行状况存在问题
        /// </summary>
        [Description("设备运行状况存在问题")]
        [FormFieldEdit]

        public string DEVICE_QUESTION { get; set; }

        /// <summary>
        /// 设备运行状况处理情况
        /// </summary>
        [Description("设备运行状况处理情况")]
        [FormFieldEdit]

        public string DEVICE_MEASURE { get; set; }
        #endregion


        #region 现场环境情况
        /// <summary>
        /// 现场环境情况
        /// </summary> 
        [EnumName("FOShiftRecordStatusEnum")]
        [Description("现场环境情况")]
        [FormFieldEdit]

        public int ENVIRONMENT_STATUS { get; set; }

        /// <summary>
        /// 现场环境情况存在问题
        /// </summary>
        [Description("现场环境情况存在问题")]
        [FormFieldEdit]

        public string ENVIRONMENT_QUESTION { get; set; }

        /// <summary>
        /// 现场环境情况处理情况
        /// </summary>
        [Description("现场环境情况处理情况")]
        [FormFieldEdit]

        public string ENVIRONMENT_MEASURE { get; set; }
        #endregion

        #region 劳保用品使用情况
        /// <summary>
        /// 劳保用品使用情况
        /// </summary> 
        [EnumName("FOShiftRecordStatusEnum")]
        [Description("劳保用品使用情况")]
        [FormFieldEdit]

        public int SUPPLIES_STATUS { get; set; }

        /// <summary>
        /// 劳保用品使用情况存在问题
        /// </summary>
        [Description("劳保用品使用情况存在问题")]
        [FormFieldEdit]

        public string SUPPLIES_QUESTION { get; set; }

        /// <summary>
        /// 劳保用品清单
        /// </summary>
        [Description("劳保用品清单")]
        public virtual List<T_FO_CURRENT_CLASS_RECORD_LABOUR_SUPPLY> Nav_LabourSupplies { get; set; }


        /// <summary>
        /// 是否佩戴
        /// </summary> 
        [EnumName("WFDisableStatusEnum")]
        [Description("是否佩戴")]
        [FormFieldEdit]

        public int SUPPLIES_USED { get; set; }

        /// <summary>
        /// 劳保用品使用情况处理情况
        /// </summary>
        [Description("劳保用品使用情况处理情况")]
        [FormFieldEdit]
        public string SUPPLIES_MEASURE { get; set; }
        #endregion


        /// <summary>
        /// 导航属性：交班人员
        /// </summary>
        [Description("导航属性：交班人员")]
        [FormFieldEdit]
        public virtual List<T_FO_CURRENT_CLASS_RECORD_USER> Nav_Users { get; set; }

        /// <summary>
        /// 导航:附件表
        /// </summary>
        [Description("导航：附件表")]
        public virtual List<T_FO_CURRENT_CLASS_RECORD_FILE> Nav_Files { get; set; }

        /// <summary>
        /// 班组长ID
        /// </summary>
        [Description("班组长ID")]
        [DataFieldForeignKey("Nav_ChargeUser")]
        public Guid? CHARGE_USER_ID { get; set; }
        /// <summary>
        /// 导航属性:班组长
        /// </summary>
        [Description("导航属性:班组长")]
        public T_FM_USER Nav_ChargeUser { get; set; }
        /// <summary>
        /// 审批意见
        /// </summary>
        [Description("审批意见")]
        [DataFieldLength(2000)]
        public string AUDIT_OPINION { get; set; }
        /// <summary>
        /// 审批日期
        /// </summary>
        [Description("审批日期")]
        public DateTime AUDIT_DATE { get; set; }
        /// <summary>
        /// 下个排班排班表ID
        /// </summary>
        [Description("下个排班排班表ID")]
        public Guid NEXT_CLASS_TEAM_ID { get; set; }
        /// <summary>
        /// 当前班组ID
        /// </summary>
        [Description("当前班组ID")]
        [FormFieldTable]
        [DataFieldForeignKey("Nav_Team")]
        public Guid CLASS_TEAM_ID { get; set; }
        /// <summary>
        /// 班组
        /// </summary>
        [Description("班组")]
        public T_FM_TEAM Nav_Team { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [Description("备注")]
        [DataFieldLength(200)]
        public string REMARK { get; set; }
        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("是否超时")]//0-未统计,1-未超时,2-超时
        public FOISOVERTIME OVERTIME { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
    }
}
