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

namespace APT.MS.Domain.Entities.FO
{
    [Description("明细表")]
    public class T_FO_LEADER_WELL_RECORD_DETAIL : MesEntityBase
    {
        [Description("主表ID")]
        [DataFieldForeignKey("Nav_Record", "Nav_Details")]
        public Guid LEADER_WELL_RECORD_ID { get; set; }

        [Description("导航属性：主表")]
        public virtual T_FO_LEADER_WELL_RECORD Nav_Record { get; set; }

        [Description("开始时间")]
        [FormFieldEdit]
        public DateTime? START_DATE { get; set; }
        [Description("结束时间")]
        [FormFieldEdit]
        public DateTime? END_DATE { get; set; }

        [Description("导航属性：巡视区域")]
        [FormFieldEdit]
        public ICollection<T_FO_LEADER_WELL_RECORD_DETAIL_AREA> Nav_DetailAreas { get; set; }


        [Description("现场情况描述")]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string DESCRIPTION { get; set; }
        [Description("发现问题")]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string QUESTION { get; set; }

        [Description("处置措施")]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string MEASURE { get; set; }

        [Description("导航属性：附件")]
        [FormFieldEdit]
        public ICollection<T_FO_LEADER_WELL_RECORD_DETAIL_FILE> Nav_DetailFiles { get; set; }

        [Description("现场责任人")]
        [DataFieldForeignKey("Nav_User")]
        [FormFieldEdit]
        public Guid? USER_ID { get; set; }


        [Description("导航属性：现场责任人")]
        public T_FM_USER Nav_User { get; set; }

        [Description("处理状态")]
        [EnumName("FOUserShiftStatusEnum")]     //为枚举（0待处理 1已处理）
        public FOUserShiftStatusEnum? USER_DEAL_STATUS { get; set; }

        [Description("交接事项")]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string ITEM { get; set; }

        [Description("交接地点")]
        [FormFieldEdit]
        [DataFieldLength(50)]
        public string PLACE { get; set; }

        [Description("导航属性：交班人")]
        [FormFieldEdit]
        public ICollection<T_FO_LEADER_WELL_RECORD_DETAIL_PREUSER> Nav_PreUsers { get; set; }

        [Description("导航属性：接班人")]
        [FormFieldEdit]
        public ICollection<T_FO_LEADER_WELL_RECORD_DETAIL_AFTERUSER> Nav_AfterUsers { get; set; }
    }
}
