WCS_DEVICE.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using SqlSugar;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace WCS.Entity
  6. {
  7. /// <summary>
  8. /// 设备列表
  9. /// </summary>
  10. [SugarTable("WCS_DEVICE", "设备列表")]
  11. public class WCS_DEVICE
  12. {
  13. [SugarColumn(IsPrimaryKey = true, ColumnDescription = "设备编号", Length = 50)]
  14. public string CODE { get; set; }
  15. [SugarColumn(Length = 50, ColumnDescription = "设备名称")]
  16. public string NAME { get; set; }
  17. [SugarColumn(Length = 50, ColumnDescription = "是否可用")]
  18. public bool ENABLED { get; set; } = true;
  19. [SugarColumn(Length = 50, ColumnDescription = "更新者")]
  20. public string UPDATEUSER { get; set; }
  21. [SugarColumn(ColumnDescription = "更新时间")]
  22. public DateTime UPDATETIME { get; set; } = DateTime.Now;
  23. [SugarColumn(ColumnDescription = "版本")]
  24. public byte[] VER { get; set; }
  25. [SugarColumn(ColumnDescription = "读写协议")]
  26. public int DEVICEPROTOCOLIDS { get; set; }
  27. [Navigate(NavigateType.OneToMany, nameof(DEVICEPROTOCOLIDS))]
  28. public List<WCS_DEVICEPROTOCOL> DEVICEPROTOCOLS { get; set; } = new List<WCS_DEVICEPROTOCOL>();
  29. [SugarColumn()]
  30. public int DEVICE { get; set; }
  31. [InverseProperty("DEVICE")]
  32. public List<WCS_ROUTE> ROUTES { get; set; } = new List<WCS_ROUTE>();
  33. [InverseProperty("START")]
  34. public List<WCS_PATH> PATHS { get; set; } = new List<WCS_PATH>();
  35. /// <summary>
  36. /// 设备组中的内容
  37. /// </summary>
  38. [InverseProperty("GROUP")]
  39. public List<WCS_GROUPMEMBER> DEVICEGROUP { get; set; } = new List<WCS_GROUPMEMBER>();
  40. public override string ToString()
  41. {
  42. return CODE;
  43. }
  44. }
  45. }