SchoolProduct.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Text;
  5. using System.Text.Json.Serialization;
  6. using TEAMModelOS.SDK.Context.Attributes.Azure;
  7. using TEAMModelOS.SDK.DI;
  8. namespace TEAMModelOS.SDK.Models
  9. {
  10. public class SchoolProduct : CosmosEntity
  11. {
  12. public SchoolProduct()
  13. {
  14. pk = "Base";
  15. }
  16. public List<SerialInfoBaseWithdeviceBound> serial { get; set; }
  17. public ProductService service { get; set; }
  18. public List<ProductHard> hard { get; set; }
  19. public Aclassone aclassone { get; set; }
  20. }
  21. public class Aclassone
  22. {
  23. public List<string> ids { get; set; } //固定分配的學生ID
  24. public List<string> outids { get; set; } //過期被回收的學生ID(無法使用,待數量購足後回復移至ids)
  25. public int total { get; set; }
  26. public int used { get; set; }
  27. }
  28. public class SerialInfoBase
  29. {
  30. public string id { get; set; }
  31. public string serial { get; set; }
  32. public string prodCode { get; set; }
  33. public int clientQty { get; set; }
  34. public long regDate { get; set; }
  35. public long startDate { get; set; }
  36. public long endDate { get; set; }
  37. public int deviceMax { get; set; }
  38. public object aprule { get; set; }
  39. public string expireStatus { get; set; }
  40. public int status { get; set; }
  41. }
  42. public class SerialInfoBaseWithdeviceBound : SerialInfoBase
  43. {
  44. public List<deviceBound> deviceBound { get; set; }
  45. }
  46. public class SerialInfoBaseWithdeviceBoundExt : SerialInfoBase
  47. {
  48. public List<deviceBoundExt> deviceBound { get; set; }
  49. }
  50. public class deviceBound
  51. {
  52. public string uuid { get; set; }
  53. public string uuid2 { get; set; }
  54. public string deviceId { get; set; }
  55. public string classId { get; set; }
  56. }
  57. public class deviceBoundRich : deviceBound
  58. {
  59. public string serial { get; set; }
  60. }
  61. public class deviceForCoreService
  62. {
  63. public string uuid1 { get; set; }
  64. public string uuid2 { get; set; }
  65. public string device_id { get; set; }
  66. public string class_id { get; set; }
  67. public string sn { get; set; }
  68. }
  69. public class deviceFromCoreService
  70. {
  71. public string uuid1 { get; set; }
  72. public string uuid2 { get; set; }
  73. public string device_id { get; set; }
  74. public string sn { get; set; }
  75. public string os { get; set; }
  76. public string os_ver { get; set; }
  77. public string local_ip { get; set; }
  78. public string product_ver { get; set; }
  79. public string cpu { get; set; }
  80. public string pc_name { get; set; }
  81. }
  82. public class deviceBoundExt : deviceBound
  83. {
  84. public string ip { get; set; }
  85. public string pcname { get; set; }
  86. public string os { get; set; }
  87. public string cpu { get; set; }
  88. public string osver { get; set; }
  89. }
  90. public class ProductService
  91. {
  92. public List<ServiceMainPeriod> mainperiod { get; set; }
  93. public List<ServicePeriod> period { get; set; }
  94. public List<ServiceProduct> product { get; set; }
  95. }
  96. public class ServiceMainPeriod
  97. {
  98. public string mainPeriodId { get; set; }
  99. public string mainPeriodtype { get; set; }
  100. public long startDate { get; set; }
  101. public long endDate { get; set; }
  102. public bool active { get; set; }
  103. }
  104. public class ServicePeriod
  105. {
  106. public string mainPeriodId { get; set; }
  107. public string periodId { get; set; }
  108. public long startDate { get; set; }
  109. public long endDate { get; set; }
  110. public bool active { get; set; }
  111. }
  112. public class ServiceProduct
  113. {
  114. public string prodCode { get; set; }
  115. public bool noperiod { get; set; }
  116. public string serviceType { get; set; }
  117. public List<ServiceProductAuth> auth { get; set; }
  118. public int avaliable { get; set; }
  119. }
  120. public class ServiceProductResult
  121. {
  122. public string prodCode { get; set; }
  123. public bool noperiod { get; set; }
  124. public string serviceType { get; set; }
  125. public long startDate { get; set; }
  126. public long endDate { get; set; }
  127. public int avaliable { get; set; }
  128. }
  129. public class ServiceProductAclassoneResult : ServiceProductResult
  130. {
  131. public int staUsed { get; set; }
  132. public int dynUsed { get; set; }
  133. }
  134. public class ServiceProductAuth
  135. {
  136. public string orderId { get; set; }
  137. public string periodId { get; set; }
  138. public int number { get; set; }
  139. public string unit { get; set; }
  140. }
  141. public class ServiceProductAuthHistoryBasic
  142. {
  143. public string orderId { get; set; }
  144. public long orderDate { get; set; }
  145. public int number { get; set; }
  146. public string unit { get; set; }
  147. }
  148. public class ServiceProductAuthHistory : ServiceProductAuthHistoryBasic
  149. {
  150. public List<string> periodIdList { get; set; }
  151. }
  152. public class ServiceProductAuthHistoryStartEnd : ServiceProductAuthHistoryBasic
  153. {
  154. public long startDate { get; set; }
  155. public long endDate { get; set; }
  156. }
  157. public class ProductHard
  158. {
  159. public string prodCode { get; set; }
  160. public string model { get; set; }
  161. public string serial { get; set; }
  162. }
  163. public class CoreUuid
  164. {
  165. public string serial { get; set; }
  166. public string os { get; set; }
  167. public string ip { get; set; }
  168. public string uuid { get; set; }
  169. public string uuid2 { get; set; }
  170. public string deviceId { get; set; }
  171. public string pcname { get; set; }
  172. public string cpu { get; set; }
  173. public int ram { get; set; }
  174. }
  175. public class periodZone
  176. {
  177. public long startDate { get; set; }
  178. public long endDate { get; set; }
  179. }
  180. }