WCS_DeviceInfo.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using SqlSugar;
  2. using System.Collections.Generic;
  3. namespace WCS.Entity
  4. {
  5. /// <summary>
  6. /// 设备列表
  7. /// </summary>
  8. [SugarTable(nameof(WCS_DeviceInfo), "设备列表")]
  9. public class WCS_DeviceInfo : OBJ
  10. {
  11. [SugarColumn(IsIgnore = true)]
  12. public override int ID { get; set; }
  13. /// <summary>
  14. /// 设备编号
  15. /// </summary>
  16. [SugarColumn(IsPrimaryKey = true, ColumnDescription = "设备编号", Length = 50)]
  17. public string Code { get; set; }
  18. /// <summary>
  19. /// 设备名称
  20. /// </summary>
  21. [SugarColumn(Length = 50, ColumnDescription = "设备名称")]
  22. public string Name { get; set; }
  23. /// <summary>
  24. /// 设备可用协议集合
  25. /// </summary>
  26. [Navigate(NavigateType.OneToMany, nameof(WCS_DeviceProt.DeviceCode))]
  27. public List<WCS_DeviceProt> DeviceProtocol { get; set; }
  28. /// <summary>
  29. /// 上一个设备集合
  30. /// </summary>
  31. [Navigate(NavigateType.OneToMany, nameof(WCS_Route.NextCode))]
  32. public List<WCS_Route> FormerRoutes { get; set; }
  33. /// <summary>
  34. /// 下一个设备集合
  35. /// </summary>
  36. [Navigate(NavigateType.OneToMany, nameof(WCS_Route.DeviceCode))]
  37. public List<WCS_Route> NextRoutes { get; set; }
  38. /// <summary>
  39. /// 设备可用路径集合
  40. /// </summary>
  41. [Navigate(NavigateType.OneToMany, nameof(WCS_PathGrp.StartCode))]
  42. public List<WCS_PathGrp> Paths { get; set; }
  43. /// <summary>
  44. /// 设备对应设备组信息
  45. /// </summary>
  46. [Navigate(NavigateType.OneToMany, nameof(WCS_DeviceGrp.GroupCode))]
  47. public List<WCS_DeviceGrp> DeviceGroup { get; set; }
  48. public override string ToString()
  49. {
  50. return Code;
  51. }
  52. }
  53. }