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

namespace APT.MS.Domain.Entities.CM
{
    /// <summary>
    /// 应急物资库
    /// </summary>
    [Description("应急物资库")]
    public class T_CM_MATERIAL_LIBRARY : MesEntityBase
    {
        /// <summary>
        /// 物资编号
        /// </summary>
        [Description("物资编号")]
        [CodeRule((int)PFCodeRuleType.应急管理)]
        [CUnique]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(50)]
        public string CODE { get; set; }

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

        /// <summary>
        /// 类型ID
        /// </summary>
        [Description("类型")]
        [DataFieldForeignKey("Nav_MaterialType")]
        public Guid MATERIAL_TYPE_ID { get; set; }

        /// <summary>
        /// 导航属性：类型
        /// </summary>
        [Description("导航属性：类型")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public virtual T_CM_MATERIAL_TYPE Nav_MaterialType { get; set; }

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

        /// <summary>
        /// 规格/型号
        /// </summary>
        [Description("规格/型号")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(100)]
        public string SPECIFICATION { get; set; }

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

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

        /// <summary>
        /// 存放位置
        /// </summary>
        [Description("存放位置")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(100)]
        public string LOCATION { get; set; }

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

        /// <summary>
        /// 管理部门ID
        /// </summary>
        [Description("管理部门ID")]
        [DataFieldForeignKey("Nav_Department")]
        public Guid DEPARMTNET_ID { get; set; }

        /// <summary>
        /// 管理部门
        /// </summary>
        [Description("导航：管理部门")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public virtual T_FM_DEPARTMENT Nav_Department { get; set; }

        /// <summary>
        /// 管理责任人ID
        /// </summary>
        [Description("管理责任人ID")]
        [DataFieldForeignKey("Nav_User")]
        public Guid USER_ID { get; set; }

        /// <summary>
        /// 管理责任人
        /// </summary>
        [Description("导航：管理责任人")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public virtual T_FM_USER Nav_User { get; set; }

        /// <summary>
        /// 主要技术参数
        /// </summary>
        [Description("主要技术参数")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(200)]
        public string MAIN_TEC_PARAMS { get; set; }

        /// <summary>
        /// 导航属性：设备资料附件
        /// </summary>
        [Description("导航属性：设备资料附件")]
        public ICollection<T_CM_MATERIAL_LIBRARY_FILE> Nav_Files { get; set; }
    }
}