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("班前会议记录表")]
    [DataRuleField("Nav_Team.DEPARTMENT_ID")]
    public class T_FO_PRE_SHIFT_MEETING_RECORD : MesEntityBase
    {
        [Description("编码")]
        [FormFieldEdit]
        [DataFieldLength(50)]
        public string CODE { get; set; }

        [Description("名称")]
        [FormFieldEdit]
        [DataFieldLength(50)]

        public string NAME { get; set; }
        [Description("会议时间")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public DateTime MEETING_TIME { get; set; }

        [Description("地点")]
        [FormFieldTable]
        [FormFieldQuery]
        public string LOCATION { get; set; }

        [Description("上班开始时间")]
        [FormFieldEdit]
        public DateTime START_TIME { get; set; }

        [Description("上班结束时间")]
        [FormFieldEdit]
        public DateTime END_TIME { get; set; }

        [Description("班组当班工作内容")]
        [FormFieldEdit]
        [DataFieldLength(1000)]

        public string JOB_CONTENT { get; set; }

        [Description("安全注意事项及防护措施")]
        [FormFieldEdit]
        [DataFieldLength(1000)]

        public string PROTECT_MEASURE { get; set; }

        [Description("其他内容")]
        [FormFieldEdit]
        [DataFieldLength(1000)]

        public string OTHER_CONTENT { get; set; }

        [Description("完成进度")]
        [FormFieldTable]
        public string RATE { get; set; }

        [Description("班次")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Class")]
        public Guid? CLASS_ID { get; set; }
        [Description("导航:班次")]
        public T_FM_CLASS Nav_Class { get; set; }

        [Description("部门")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Department")]

        public Guid? DEPARTMENT_ID { get; set; }

        [Description("导航:部门")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }
        [Description("班组")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Team")]
        public Guid? TEAM_ID { get; set; }

        [Description("导航:班组")]
        public T_FM_TEAM Nav_Team { get; set; }

        /// <summary>
        /// 班前会议记录状态
        /// </summary>
        [EnumName("FOPreMeetingStatusEnum")]
        [Description("班前会议记录状态")]
        [FormFieldTable]
        [FormFieldQuery]
        public FOPreMeetingStatusEnum PRE_MEETING_STATUS { get; set; }

        [Description("主持人")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }
        [Description("导航属性：主持人")]
        public T_FM_USER Nav_User { get; set; }

        [Description("导航：参会成员")]
        [FormFieldEdit]
        public ICollection<T_FO_PRE_SHIFT_MEETING_RECORD_USER> Nav_Users { get; set; }
        /// <summary>
        /// 头像文件
        /// </summary>
        [Description("导航：附件表")]
        public List<T_FO_PRE_SHIFT_MEETING_RECORD_FILE> Nav_Files { get; set; }
        [Description("是否超时")]
        public FOISOVERTIME OVERTIME { get; set; }

        [Description("是否跑批")]
        public WFDisableStatusEnum IS_RUN { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
        [Description("排班信息表")]
        public Guid? DEPARTMENT_SCHEDULING_ID { get; set; }

        [Description("记录人")]
        [DataFieldForeignKey("Nav_Record")]
        public Guid? RECORD_ID { get; set; }
        [Description("导航属性：记录人")]
        public T_FM_USER Nav_Record { get; set; }

        [Description("班长")]
        [DataFieldForeignKey("Nav_Monitor")]
        public Guid? MONITOR_ID { get; set; }
        [Description("导航属性：班长")]
        public T_FM_USER Nav_Monitor { get; set; }

        [Description("应到")]
        public int? SHOULD_QTY { get; set; }
        [Description("实到")]
        public int? ACTUAL_QTY { get; set; }
        [Description("迟到")]
        public int? LATE_QTY { get; set; }
        [Description("请假")]
        public int? LEAVE_QTY { get; set; }

        [Description("异常原因")]
        [DataFieldLength(1000)]

        public string ABNORMAL_CAUSE { get; set; }

        [Description("问候语")]
        [DataFieldLength(500)]

        public string GREETING { get; set; }

        [Description("班组口号")]
        [DataFieldLength(500)]

        public string SLOGAN { get; set; }

        [Description("欢迎语")]
        [DataFieldLength(500)]

        public string WELCOME { get; set; }

        [Description("今日计划")]
        [DataFieldLength(2000)]

        public string TODAY_PLAN { get; set; }
        [Description("学习内容")]
        [DataFieldLength(2000)]

        public string LEARNING { get; set; }

        [Description("一分钟表扬")]
        [DataFieldLength(2000)]

        public string PRAISE { get; set; }
        [Description("员工分享")]
        [DataFieldLength(2000)]

        public string SHARE { get; set; }

        [Description("危险识别")]
        [DataFieldLength(2000)]

        public string DANGER { get; set; }

        [Description("困难或建议")]
        [DataFieldLength(2000)]

        public string DIFFICULTY { get; set; }
        [Description("安全宣誓")]
        [DataFieldLength(2000)]

        public string SAFETY_OATH { get; set; }

        [Description("导航：上班生产情况")]
        [FormFieldEdit]
        public ICollection<T_FO_PRE_SHIFT_MEETING_RECORD_DETAIL> Nav_Details { get; set; }

        [Description("是否触发岗位当班记录")]

        public bool IS_RECORD { get; set; } = false;
    }
}
