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

namespace APT.MS.Domain.Entities.TL
{
    /// <summary>
    /// 单项工程记录管理
    /// </summary>
    [Description("单项工程记录管理")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_TL_PROJECT_RECORD : MesEntityBase
    {
        /// <summary>
        /// 尾矿库名称 冗余
        /// </summary>
        [Description("尾矿库名称")]
        [FormFieldTable]
        [FormFieldQuery]
        [DataFieldLength(200)]
        public string TAILING_NAME { get; set; }

        /// <summary>
        /// 尾矿库名称
        /// </summary>
        [Description("尾矿库名称")]
        [DataFieldForeignKey("Nav_Tailing")]
        public Guid? TAILING_ID { get; set; }

        /// <summary>
        /// 尾矿库
        /// </summary>
        [Description("尾矿库")]
        [FormFieldEdit]
        public T_TL_TAILING Nav_Tailing { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [Description("项目名称")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(200)]
        public string NAME { get; set; }

        /// <summary>
        /// 项目编号
        /// </summary>
        [Description("项目编号")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(50)]
        public string CODE { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        [Description("部门")]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        [Description("部门")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public T_FM_DEPARTMENT Nav_Department { get; set; }

        /// <summary>
        /// 提交人
        /// </summary>
        [Description("提交人")]
        [DataFieldForeignKey("Nav_User")]
        public Guid USER_ID { get; set; }

        /// <summary>
        /// 提交人
        /// </summary>
        [Description("提交人")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public T_FM_USER Nav_User { get; set; }

        /// <summary>
        /// 施工记录
        /// </summary>
        [Description("施工记录")]
        public ICollection<T_TL_PROJECT_RECORD_FILE> Nav_Files { get; set; }

        /// <summary>
        /// 监理记录
        /// </summary>
        [Description("监理记录")]
        public ICollection<T_TL_PROJECT_RECORD_CHECK_FILE> Nav_FilesWatch { get; set; }

        /// <summary>
        /// 验收记录
        /// </summary>
        [Description("验收记录")]
        public ICollection<T_TL_PROJECT_RECORD_WATCH_FILE> Nav_FilesCheck { get; set; }

        /// <summary>
        /// 施工结果
        /// </summary>
        [Description("施工是否满足规程及安全、健康要求")]
        [FormFieldEdit]
        public Result? RESULT { get; set; }

        /// <summary>
        /// 不满足描述 (施工是否满足规程及安全、健康要求)
        /// </summary>
        [DataFieldLength(500)]
        [Description("不满足描述")]
        public string RESULT_REASON { get; set; }

        /// <summary>
        /// 验收结果
        /// </summary>
        [Description("安全设施是否与主体工程同时设计、同时施工、同时投入生产和使用")]
        [FormFieldEdit]
        public Result? RESULT_CHECK { get; set; }

        /// <summary>
        /// 不同时描述 (安全设施是否与主体工程同时设计、同时施工、同时投入生产和使用)
        /// </summary>
        [DataFieldLength(500)]
        [Description("不同时描述")]
        public string RESULT_CHECK_REASON { get; set; }

        /// <summary>
        /// 监理结果
        /// </summary>
        [Description("验收是否按照规程进行")]
        [FormFieldEdit]
        public Result? RESULT_WATCH { get; set; }

        /// <summary>
        /// 未遵守描述 (验收是否按照规程进行)
        /// </summary>
        [DataFieldLength(500)]
        [Description("未遵守描述")]
        public string RESULT_WATCH_REASON { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        [FormFieldQuery]
        public PFStandardStatus STATUS { get; set; }
    }
}