using SqlSugar; using System; using System.Collections.Generic; namespace Intend { [SugarTable("DeviceWarrantyRequestForm")] public class MainModel : ModelContext { /// /// 主键编号 (原则:300000000 - 399999999) /// [SugarColumn(ColumnName = "AutoID", IsPrimaryKey = true, IsIdentity = true)] public int AutoID { get; set; } /// /// 唯一编号 /// [SugarColumn(ColumnName = "GUID")] public Guid GUID { get; set; } /// /// 设备表主键编号 /// [SugarColumn(ColumnName = "EquipmentPK")] public int EquipmentPK { get; set; } /// /// 设备编号 /// [SugarColumn(ColumnName = "EquipmentID", Length = 50)] public string EquipmentID { get; set; } /// /// 设备名称 /// [SugarColumn(ColumnName = "EquipmentName", Length = 200, ColumnDataType = "nvarchar")] public string EquipmentName { get; set; } /// /// 发生地点 /// [SugarColumn(ColumnName = "Location")] public int Location { get; set; } /// /// 发生地点 /// [SugarColumn(ColumnName = "LocationName")] public string LocationName { get; set; } /// /// 是否有在途生产单 /// [SugarColumn(ColumnName = "InProduction")] public bool InProduction { get; set; } /// /// 批次号 /// [SugarColumn(ColumnName = "Batch", Length = 30)] public string Batch { get; set; } /// /// 故障现象 /// [SugarColumn(ColumnName = "FaultSymptoms")] public string FaultSymptoms { get; set; } /// /// 设备设施部 /// [SugarColumn(ColumnName = "ReceivingDep")] public string ReceivingDep { get; set; } /// /// 停机状态(是、否) /// [SugarColumn(ColumnName = "IsDown")] public bool IsDown { get; set; } /// /// 文档版本 /// [SugarColumn(ColumnName = "FormVer")] public int FormVer { get; set; } /// /// 申请时间 /// [SugarColumn(ColumnName = "CreatOn")] public DateTime? CreatOn { get; set; } /// /// 申请人 /// [SugarColumn(ColumnName = "CreatBy")] public int? CreatBy { get; set; } /// /// 申请人姓名 /// [SugarColumn(ColumnName = "CreatorName")] public string CreatorName { get; set; } /// /// 申请部门 /// [SugarColumn(ColumnName = "CreatDept")] public int? CreatDept { get; set; } /// /// 申请部门名称 /// public string CreatDeptName { get; set; } /// /// 修改时间 /// [SugarColumn(ColumnName = "ModifyOn")] public DateTime? ModifyOn { get; set; } /// /// 修改人 /// [SugarColumn(ColumnName = "ModifyBy")] public int? ModifyBy { get; set; } [SugarColumn(IsIgnore = true)] public List MaintaionItems { get { return base.CreateMapping().Where(x => x.FormID == this.AutoID).ToList(); } } [SugarColumn(IsIgnore = true)] public List EvaluatorItems { get { return base.CreateMapping().Where(x => x.FormID == this.AutoID).ToList(); } } } }