using SqlSugar; using System; namespace WCS.Entity { /// /// PLC DB块配置表 /// [SugarTable(nameof(WCS_DATABLOCK), "PLC DB块配置表")] public class WCS_DATABLOCK : OBJ { /// /// ID /// [SugarColumn(IsIgnore = true)] [Obsolete] 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; } /// /// 关联PLC信息编号 /// [SugarColumn(ColumnDescription = "关联PLC信息编号")] public string PLCCODE { get; set; } /// /// 关联PLC信息 /// [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(ColumnDescription = "无更新")] public bool NOUPDATE { get; set; } public Type GetProtocolType() { return Type.GetType(PROTOCOL); } } }