EquipmentExtend.cs
1023 Bytes
using FreeSql.DataAnnotations;
using HHECS.EquipmentModel;
using NotMapped = System.ComponentModel.DataAnnotations.Schema.NotMappedAttribute;
namespace HHECS.RobotTool.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; } = null!;
/// <summary>
/// 机器人默认参数Id
/// </summary>
public int RobotConfigId { get; set; }
[NotMapped]
public RobotConfig RobotConfig { get; set; } = null!;
[NotMapped]
public new EquipmentPropExtend this[string key]
{
get
{
string key2 = key;
return EquipmentProps?.Find(t => t.EquipmentTypePropTemplateCode == key2)!;
}
}
}
}