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

namespace APT.MS.Domain.Entities.FO
{
    /// <summary>
    /// 作业方案讨论记录
    /// </summary>
    [Description("作业方案讨论记录")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_FO_PRE_OPER_SCH : MesEntityBase
    {

        //------------------------------------------------------------------------
        [Description("文件名称")]   //字段描述
        [FormFieldEdit]     //代表在编辑页面出现
        [DataFieldLength(100)]  //文本长度
        [FormFieldTable]    //在列表中会出现该字段
        [FormFieldQuery]    //在查询条件中出现该字段
        public string FILE_NAME { get; set; }


        //------------------------------------------------------------------------
        [Description("发起时间")]
        [FormFieldEdit]
        [FormFieldTable]    //在列表中会出现该字段
        [FormFieldQuery]    //在查询条件中出现该字段
        public DateTime LANUNCH_TIME { get; set; }

        //------------------------------------------------------------------------
        [Description("发起人员ID")]   //字段描述
        [DataFieldForeignKey("Nav_User")]     //外键（数据库中建立FK外键）

        public Guid LANUNCH_USER_ID { get; set; }
        [Description("发起用户")]
        [FormFieldEdit]     //代表在编辑页面出现
        [FormFieldTable]    //在列表中会出现该字段
        [FormFieldQuery]    //在查询条件中出现该字段
        public virtual T_FM_USER Nav_User { get; set; }


        //------------------------------------------------------------------------
        [Description("讨论记录")]   //字段描述
        [DataFieldLength(500)]  //文本长度
        [FormFieldEdit]     //代表在编辑页面出现
        //[FormFieldTable]    //在列表中会出现该字段
        //[FormFieldQuery]    //在查询条件中出现该字段
        public string CONTENT { get; set; }


        //------------------------------------------------------------------------
        [Description("发起部门ID")] 
        [DataFieldForeignKey("Nav_Department")]     //外键（数据库中建立FK外键）
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("发起部门")]    //导航属性
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public virtual T_FM_DEPARTMENT Nav_Department { get; set; }


        [Description("附件")]    //导航属性
        public virtual ICollection<T_FO_PRE_OPER_SCH_FILE> Nav_PreOperSchFile { get; set; }     //Nav_PreOperSchFile为附件表的导航属性


        [Description("参会人员")]    //导航属性
        [FormFieldEdit]
        public virtual ICollection<T_FO_PRE_OPER_SCH_USER> Nav_PreOperSchUser { get; set; }     //Nav_PreOperSchFile为附件表的导航属性

        /// <summary>
        /// 表单状态
        /// </summary>
        [EnumName("FOTeamActivityState")]
        [Description("表单状态")]
        [FormFieldTable]
        [FormFieldQuery]
        public int FORM_STATUS { get; set; }

        [Description("提交并通知")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
    }
}
