EquipmentExtend.cs
1017 Bytes
using FreeSql.DataAnnotations;
using HHECS.EquipmentModel;
using NotMapped = System.ComponentModel.DataAnnotations.Schema.NotMappedAttribute;
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; }
[NotMapped]
public new EquipmentPropExtend this[string key]
{
get
{
string key2 = key;
return EquipmentProps?.Find(t => t.EquipmentTypePropTemplateCode == key2);
}
}
}
}