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_CHANGE_SHIFT_RECORD : MesEntityBase
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Description("名称")]
        public string NAME { get; set; }

        /// <summary>
        /// 编辑人
        /// </summary>
        [Description("编辑人")]
        [FormFieldTable]
        [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 CHANGE_SHIFT_TIME { get; set; }

        /// <summary>
        /// 交接班地点
        /// </summary>
        [Description("交接班地点")]
        [FormFieldEdit]
        public string ADDRESS { get; set; }


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

        /// <summary>
        /// 设备工具材料使用存放
        /// </summary>
        [Description("设备工具材料使用存放情况")]
        [FormFieldEdit]
        public string DEVICE_STORAGE { get; set; }


        #region 本班运行情况
        /// <summary>
        /// 本班运行情况
        /// </summary>
        [EnumName("FOShiftRecordStatusEnum")]
        [Description("本班运行情况")]
        [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")]
        [Description("设备运行状况")]
        [FormFieldEdit]
        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("劳保用品使用处理情况")]
        [FormFieldEdit]
        public string SUPPLIES_MEASURE { get; set; }
        #endregion


        #region 上班运行记录
        /// <summary>
        /// 上班运行记录
        /// </summary>
        [EnumName("FORunRecordStatusEnum")]
        [Description("上班运行记录")]
        [FormFieldEdit]
        public FORunRecordStatusEnum LAST_CLASS_RECORD_STATUS { get; set; }

        /// <summary>
        /// 上班运行存在问题
        /// </summary>
        [Description("上班运行记录存在问题")]
        [FormFieldEdit]
        public string LAST_CLASS_RECORD_QUESTION { get; set; }
        #endregion

        #region 上班工作完成情况
        /// <summary>
        /// 上班工作完成情况
        /// </summary>
        [EnumName("FOJobFinishEnum")]
        [Description("上班工作完成情况")]
        [FormFieldEdit]
        public FOJobFinishEnum LAST_CLASS_FINISH_STATUS { get; set; }

        /// <summary>
        /// 上班工作完成情况存在问题
        /// </summary>
        [Description("上班工作完成情况存在问题")]
        [FormFieldEdit]
        public string LAST_CLASS_FINISH_QUESTION { get; set; }
        #endregion

        /// <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>
        /// 当班工作记录ID
        /// </summary>
        [Description("当班工作记录ID")]

        public Guid? CURRENT_CLASS_RECORD_ID { get; set; }
        /// <summary>
        /// 交班成员
        /// </summary>
        [Description("交班成员")]
        [FormFieldEdit]

        public List<T_FO_CHANGE_SHIFT_RECORD_PRE_USER> Nav_PreUsers { get; set; }

        /// <summary>
        /// 接班成员
        /// </summary>
        [Description("接班成员")]
        [FormFieldEdit]

        public List<T_FO_CHANGE_SHIFT_RECORD_AFTER_USER> Nav_AfterUsers { get; set; }


        /// <summary>
        /// 导航属性：文件
        /// </summary>
        [Description("导航属性：文件")]
        [FormFieldEdit]

        public List<T_FO_CHANGE_SHIFT_RECORD_FILE> Nav_Files { get; set; }
        /// <summary>
        /// 当前班组ID
        /// </summary>
        [Description("当前班组ID")]
        [FormFieldTable]
        [DataFieldForeignKey("Nav_Team")]
        public Guid? TEAM_ID { get; set; }
        /// <summary>
        /// 班组
        /// </summary>
        [Description("班组")]
        public T_FM_TEAM Nav_Team { get; set; }
        [Description("是否超时")]//0-未统计,1-未超时,2-超时
        public FOISOVERTIME OVERTIME { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
    }
}
