using APT.BaseData.Domain.Entities;
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.HM
{
    [DataRuleField("DEPARTMENT_ID")]
    [Description("作业任务识别表")]
    public class T_HM_JOBTASK_IDENTIFY : MesEntityBase
    {
        [Description("编号")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        public string CODE { get; set; }

        [Description("完成时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime? COMPLETE_DATE { get; set; }

        [Description("发起部门")]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("导航属性：发起部门表")]
        public virtual T_FM_DEPARTMENT Nav_Department { get; set; }

        [Description("导航属性：任务识别人员表")]
        [FormFieldEdit]
        public ICollection<T_HM_JOBTASK_IDENTIFY_USER> Nav_IdentifyUser { get; set; }

        [Description("导航属性：任务明细表")]
        [FormFieldEdit]
        public ICollection<T_HM_JOBTASK_IDENTIFY_DETAIL> Nav_Details { get; set; }

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

        [Description("导航属性：审批")]
        [DataFieldIngore]
        public virtual ICollection<T_PF_APPROVE_DETAIL> Nav_ApproveDetails { get; set; }
        
        [Description("导航属性：创建人")]
        public virtual T_FM_USER Nav_CreateUser { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("表单状态")]
        [EnumName("FOPreMeetingStatusEnum")]
        public FOPreMeetingStatusEnum IS_PUBLISH { get; set; }
        [Description("回调接口")]
        [DataFieldIngore]
        public string CALLBACK_INTERFACE { get; set; }

        [Description("自定义参数")]
        [DataFieldIngore]
        public string PARAM { get; set; }

        [Description("自定义参数")]
        [DataFieldIngore]
        public string FORM_CODE { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
        [Description("驳回意见")]
        [DataFieldIngore]
        public string CONTEXT { get; set; }
    }
}
