25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.7 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using Newtonsoft.Json;
  6. namespace importer.RestObjects
  7. {
  8. [JsonObject(MemberSerialization.OptIn)]
  9. public class WorkOrder
  10. {
  11. [JsonProperty(PropertyName = "ID")]
  12. public int ID { get; set; }
  13. [JsonProperty(PropertyName = "CustomerID")]
  14. public int CustomerID { get { return this.Customer != null ? this.Customer.ID : 0; } set { value = this.Customer != null ? this.Customer.ID : 0; } }
  15. [JsonProperty(PropertyName = "PriorityID")]
  16. public int PriorityID
  17. {
  18. get { return this.Priority != null ? this.Priority.ID : 0; }
  19. set { value = this.Priority != null ? this.Priority.ID : 0; }
  20. }
  21. [JsonProperty(PropertyName = "StatusID")]
  22. public int StatusID
  23. {
  24. get { return this.Status != null ? this.Status.ID : 0; }
  25. set { value = this.Status != null ? this.Status.ID : 0; }
  26. }
  27. [JsonProperty(PropertyName = "EquipmentID")]
  28. public int EquipmentID
  29. {
  30. get { return this.Equipment != null ? this.Equipment.ID : 0; }
  31. set { value = this.Equipment != null ? this.Equipment.ID : 0; }
  32. }
  33. [JsonProperty(PropertyName = "ReasonID")]
  34. public int? ReasonID
  35. {
  36. get { return this.Reason != null ? this.Reason.ID : null; }
  37. set { value = this.Reason != null ? this.Reason.ID : null; }
  38. }
  39. [JsonProperty(PropertyName = "IncompleteReasonID")]
  40. public int? IncompleteReasonID { get; set; }
  41. [JsonProperty(PropertyName = "TechnicianUserID")]
  42. public int TechnicianUserID
  43. {
  44. get { return this.Technician != null ? this.Technician.ID : 0; }
  45. set { value = this.Technician != null ? this.Technician.ID : 0; }
  46. }
  47. [JsonProperty(PropertyName = "Number")]
  48. public string Number { get; set; }
  49. [JsonProperty(PropertyName = "MeterReading")]
  50. public decimal? MeterReading { get; set; }
  51. [JsonProperty(PropertyName = "Odometer")]
  52. public decimal? Odometer { get; set; }
  53. [JsonProperty(PropertyName = "SpecialInstructions")]
  54. public string SpecialInstructions { get; set; }
  55. [JsonProperty(PropertyName = "ScheduledStartDate")]
  56. public DateTime ScheduledStartDate { get; set; }
  57. [JsonProperty(PropertyName = "ScheduledEndDate")]
  58. public DateTime ScheduledEndDate { get; set; }
  59. [JsonProperty(PropertyName = "StartDate")]
  60. public DateTime? StartDate { get; set; }
  61. [JsonProperty(PropertyName = "EndDate")]
  62. public DateTime? EndDate { get; set; }
  63. [JsonProperty(PropertyName = "ApprovedDate")]
  64. public DateTime? ApprovedDate { get; set; }
  65. [JsonProperty(PropertyName = "CreateDate")]
  66. public DateTime CreateDate { get; set; }
  67. [JsonProperty(PropertyName = "CreateUserID")]
  68. public int CreateUserID { get; set; }
  69. [JsonProperty(PropertyName = "UpdateDate")]
  70. public DateTime UpdateDate { get; set; }
  71. [JsonProperty(PropertyName = "UpdateUserID")]
  72. public int UpdateUserID { get; set; }
  73. [JsonProperty(PropertyName = "Customer")]
  74. public Customer Customer { get; set; }
  75. [JsonProperty(PropertyName = "Priority")]
  76. public Priority Priority { get; set; }
  77. [JsonProperty(PropertyName = "Status")]
  78. public Status Status { get; set; }
  79. [JsonProperty(PropertyName = "Equipment")]
  80. public Equipment Equipment { get; set; }
  81. [JsonProperty(PropertyName = "Reason")]
  82. public Reason Reason { get; set; }
  83. [JsonProperty(PropertyName = "Technician")]
  84. public User Technician { get; set; }
  85. }
  86. }