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_TEAM_ACTIVITY : MesEntityBase
    {

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

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

        //------------------------------------------------------------------------
        [Description("活动日期")]
        [FormFieldEdit]
        [FormFieldTable]    //在列表中会出现该字段
        [FormFieldQuery]    //在查询条件中出现该字段
        public DateTime ACTIVITY_TIME { get; set; }

        //------------------------------------------------------------------------
        [Description("活动地点")]   //字段描述
        [FormFieldEdit]     //代表在编辑页面出现
        [DataFieldLength(100)]  //文本长度
        [FormFieldTable]    //在列表中会出现该字段
        public string ADDRESS { get; set; }

        //------------------------------------------------------------------------
        [Description("活动时长")]   //字段描述
        [FormFieldEdit]     //代表在编辑页面出现
        [DataFieldLength(20)]  //文本长度
        [FormFieldTable]    //在列表中会出现该字段
        public string DURATION { get; set; }

        //---------------------------------------------------
        [Description("状态")]
        [FormFieldEdit]
        [EnumName("FOTeamActivityState")]     //为枚举（0草稿 1签到中 2已归档）
        public int TA_STATUS { get; set; }


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

        public Guid NOTE_AKER_ID { get; set; }
        [Description("记录人")]
        [FormFieldEdit]     //代表在编辑页面出现
        public virtual T_FM_USER Nav_User { get; set; }

        //------------------------------------------------------------------------
        [Description("班组名称")]
        [DataFieldForeignKey("Nav_Taem")]     //外键（数据库中建立FK外键）
        public Guid? TEAM_ID { get; set; }

        [Description("班组名称")]    //导航属性
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public virtual T_FM_TEAM Nav_Taem { get; set; }


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

        //------------------------------------------------------------------------
        [Description("操作类型")]   //字段描述
        [DataFieldIngore]//非数据库字段
        public int OpType { get; set; }


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


        //-------------------------------------------------------------------------
        [Description("参会人员")]    //导航属性
        [FormFieldEdit]
        public virtual ICollection<T_FO_TEAM_ACTIVITY_USER> Nav_TeamActivityUser { get; set; }     //Nav_TeamActivityUser为用户表的导航属性
        [Description("是否超时")]//0-未统计,1-未超时,2-超时
        public FOISOVERTIME OVERTIME { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }

        [DataFieldIngore]
        public Guid? DEPARTMENT_ID { get; set; }
    }
}
