WCS_DATABLOCK.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using SqlSugar;
  2. using System;
  3. namespace WCS.Entity
  4. {
  5. [SugarTable("WCS_DATABLOCK","PLC DB块配置表")]
  6. public class WCS_DATABLOCK : OBJ
  7. {
  8. [SugarColumn(IsIgnore = true)]
  9. public override int ID { get; set; }
  10. [SugarColumn(IsPrimaryKey = true, Length = 20, ColumnDescription = "编号")]
  11. public string CODE { get; set; }
  12. [SugarColumn(Length = 20, ColumnDescription = "名称")]
  13. public string NAME { get; set; }
  14. public string PLCCODE { get; set; }
  15. //[Navigate(typeof(WCS_PLC), nameof(PLCCODE), nameof(WCS_PLC.CODE))]
  16. //public WCS_PLC PLC { get; set; }
  17. [Navigate(NavigateType.OneToOne, nameof(PLCCODE))]
  18. public WCS_PLC PLC { get; set; }
  19. /// <summary>
  20. /// 西门子:DB520,其它:D0
  21. /// </summary>
  22. [SugarColumn(ColumnDescription = "编号")]
  23. public int NO { get; set; }
  24. [SugarColumn(ColumnDescription = "总长度")]
  25. public int LENGTH { get; set; }
  26. [SugarColumn(ColumnDescription = "结构体长度")]
  27. public int DATALENGTH { get; set; }
  28. [SugarColumn(Length = 200, ColumnDescription = "协议类型")]
  29. public string PROTOCOL { get; set; }
  30. [SugarColumn]
  31. public bool NOUPDATE { get; set; }
  32. public Type GetProtocolType()
  33. {
  34. return Type.GetType(PROTOCOL);
  35. }
  36. }
  37. }