WCS_DEVICE.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using System.Data.Common;
  6. using System.Text;
  7. namespace WCS.Entity
  8. {
  9. public enum DeviceType
  10. {
  11. }
  12. public class WCS_DEVICE
  13. {
  14. [Key]
  15. [Required]
  16. [Display(Name = "设备编号")]
  17. [StringLength(50)]
  18. public string CODE { get; set; }
  19. [Display(Name = "设备名称")]
  20. [StringLength(50)]
  21. [Required]
  22. public string NAME { get; set; }
  23. //[Display(Name = "设备类型")]
  24. //[StringLength(100)]
  25. //[Required]
  26. //public string TYPE { get; set; }
  27. [Display(Name = "可用")]
  28. public bool ENABLED { get; set; } = true;
  29. [MaxLength(50)]
  30. [Required]
  31. [Display(Name = "更新者")]
  32. public string UPDATEUSER { get; set; }
  33. [Display(Name = "更新时间")]
  34. public DateTime UPDATETIME { get; set; } = DateTime.Now;
  35. [Timestamp]
  36. [Display(Name = "版本")]
  37. public byte[] VER { get; set; }
  38. public List<WCS_DEVICEPROTOCOL> PROTOCOLS { get; set; } = new List<WCS_DEVICEPROTOCOL>();
  39. [InverseProperty("DEVICE")]
  40. public List<WCS_ROUTE> ROUTES { get; set; } = new List<WCS_ROUTE>();
  41. [InverseProperty("START")]
  42. public List<WCS_PATH> PATHS { get; set; } = new List<WCS_PATH>();
  43. public override string ToString()
  44. {
  45. return CODE;
  46. }
  47. }
  48. public class WCS_DEVICEPROTOCOL : OBJ
  49. {
  50. [Display(Name = "设备")]
  51. [Required]
  52. public WCS_DEVICE DEVICE { get; set; }
  53. [Display(Name = "DB块")]
  54. [Required]
  55. public WCS_DATABLOCK DB { get; set; }
  56. [Display(Name = "起始位置")]
  57. public Int16 POSITION { get; set; }
  58. }
  59. }