EquipmentExtend.cs 979 Bytes
using FreeSql.DataAnnotations;
using HHECS.EquipmentModel;

namespace HHECS.DAQShared.Models
{
    [Table(Name = "daq_equipment")]
    [Index($"uk_{nameof(Code)}", $"{nameof(Code)}", true)]
    public class EquipmentExtend : Equipment
    {
        public new List<EquipmentPropExtend> EquipmentProps { get; set; } = new List<EquipmentPropExtend>();

        public new EquipmentTypeExtend EquipmentType { get; set; }

        /// <summary>
        /// 项目编号
        /// </summary>
        public string ProjectCode { get; set; }

        /// <summary>
        /// 仓库编号
        /// </summary>
        public string FactoryCode { get; set; }

        [System.ComponentModel.DataAnnotations.Schema.NotMapped]
        public new EquipmentPropExtend this[string key]
        {
            get
            {
                string key2 = key;
                return EquipmentProps?.Find(t => t.EquipmentTypePropTemplateCode == key2);
            }
        }
    }
}