using APT.BaseData.Domain.Entities;
using APT.BaseData.Domain.Entities.FM;
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.TI
{
    /// <summary>
    /// 安全生产费用使用记录表
    /// </summary>
    [Description("安全生产费用使用记录表")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_TI_SAFE_PDT_COST_RECORD : MesEntityBase
    {
        /// <summary>
        /// 使用日期
        /// </summary>
        [Description("使用日期")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public DateTime? USETIME { get; set; }

        /// <summary>
        /// 使用部门ID
        /// </summary>
        [Description("使用部门ID")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 导航: 使用部门
        /// </summary>
        [Description("导航: 使用部门")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }

        /// <summary>
        /// 记录人
        /// </summary>
        [Description("记录人")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }

        /// <summary>
        /// 导航: 记录人
        /// </summary>
        [Description("导航: 记录人")]
        public T_FM_USER Nav_User { get; set; }

        /// <summary>
        /// 使用项目
        /// </summary>
        [Description("使用项目")]
        [FormFieldTable]
        [FormFieldEdit]
        public string PROJECT { get; set; }

        /// <summary>
        /// 导航: 费用类型
        /// </summary>
        [Description("导航: 费用类型")]
        [FormFieldEdit]
        public ICollection<T_TI_SAFE_PDT_COST_RECORD_TYPE> Nav_SafePdtCostRecordType { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        [Description("物料名称")]
        [FormFieldTable]
        [DataFieldLength(200)]
        [FormFieldEdit]
        public string PROCTNAME { get; set; }

        /// <summary>
        /// 用途
        /// </summary>
        [Description("用途")]
        [FormFieldTable]
        [DataFieldLength(500)]
        [FormFieldEdit]
        public string PURPOSE { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [Description("单位")]
        [FormFieldTable]
        [DataFieldLength(200)]
        [FormFieldEdit]
        public string UNIT { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [Description("数量")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public int? COUNT { get; set; }

        /// <summary>
        /// 使用金额（万元）
        /// </summary>
        [Description("使用金额")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public decimal? USE_AMOUNT { get; set; }

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

        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        public PFStandardStatus STATUS { get; set; }

        /// <summary>
        /// 审批流
        /// </summary>
        [Description("审批流")]
        [DataFieldForeignKey("Nav_Approve")]
        public Guid? APPROVE_ID { get; set; }

        /// <summary>
        /// 审批流
        /// </summary>
        [Description("会议发起审批流")]
        public T_PF_APPROVE Nav_Approve { get; set; }
    }
}
