EquipmentExtend.cs
800 Bytes
using FreeSql.DataAnnotations;
using HHECS.EquipmentModel;
using NotMapped = System.ComponentModel.DataAnnotations.Schema.NotMappedAttribute;
namespace HHECS.DAQClient.Model
{
[Table(Name = nameof(Equipment))]
[Index($"idx_{nameof(Equipment)}_{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; }
[NotMapped]
public new EquipmentPropExtend this[string key]
{
get
{
string key2 = key;
return EquipmentProps?.Find(t => t.EquipmentTypePropTemplateCode == key2);
}
}
}
}