using SqlSugar; using System; namespace WCS.Entity { [SugarTable("WCS_DATABLOCK","PLC DB块配置表")] public class WCS_DATABLOCK : OBJ { [SugarColumn(IsIgnore = true)] public override int ID { get; set; } [SugarColumn(IsPrimaryKey = true, Length = 20, ColumnDescription = "编号")] public string CODE { get; set; } [SugarColumn(Length = 20, ColumnDescription = "名称")] public string NAME { get; set; } public string PLCCODE { get; set; } //[Navigate(typeof(WCS_PLC), nameof(PLCCODE), nameof(WCS_PLC.CODE))] //public WCS_PLC PLC { get; set; } [Navigate(NavigateType.OneToOne, nameof(PLCCODE))] public WCS_PLC PLC { get; set; } /// /// 西门子:DB520,其它:D0 /// [SugarColumn(ColumnDescription = "编号")] public int NO { get; set; } [SugarColumn(ColumnDescription = "总长度")] public int LENGTH { get; set; } [SugarColumn(ColumnDescription = "结构体长度")] public int DATALENGTH { get; set; } [SugarColumn(Length = 200, ColumnDescription = "协议类型")] public string PROTOCOL { get; set; } [SugarColumn] public bool NOUPDATE { get; set; } public Type GetProtocolType() { return Type.GetType(PROTOCOL); } } }