vitalLabel.m.dart 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. import 'liveConsultation.m.dart';
  2. import 'notification.m.dart';
  3. import 'device.m.dart';
  4. class CreateLabelRequest extends TokenRequest{
  5. String? code;
  6. String? labelName;
  7. String? organizationCode;
  8. String? labelTypeKey;
  9. CreateLabelRequest({
  10. this.code,
  11. this.labelName,
  12. this.organizationCode,
  13. this.labelTypeKey,
  14. String? token,
  15. }) : super(
  16. token: token,
  17. );
  18. factory CreateLabelRequest.fromJson(Map<String, dynamic> map) {
  19. return CreateLabelRequest(
  20. code: map['Code'],
  21. labelName: map['LabelName'],
  22. organizationCode: map['OrganizationCode'],
  23. labelTypeKey: map['LabelTypeKey'],
  24. token: map['Token'],
  25. );
  26. }
  27. Map<String, dynamic> toJson() {
  28. final map = super.toJson();
  29. if (code != null)
  30. map['Code'] = code;
  31. if (labelName != null)
  32. map['LabelName'] = labelName;
  33. if (organizationCode != null)
  34. map['OrganizationCode'] = organizationCode;
  35. if (labelTypeKey != null)
  36. map['LabelTypeKey'] = labelTypeKey;
  37. return map;
  38. }
  39. }
  40. class LabelDTO extends BaseDTO{
  41. String? code;
  42. String? labelName;
  43. String? organizationCode;
  44. String? labelTypeKey;
  45. LabelDTO({
  46. this.code,
  47. this.labelName,
  48. this.organizationCode,
  49. this.labelTypeKey,
  50. DateTime? createTime,
  51. DateTime? updateTime,
  52. }) : super(
  53. createTime: createTime,
  54. updateTime: updateTime,
  55. );
  56. factory LabelDTO.fromJson(Map<String, dynamic> map) {
  57. return LabelDTO(
  58. code: map['Code'],
  59. labelName: map['LabelName'],
  60. organizationCode: map['OrganizationCode'],
  61. labelTypeKey: map['LabelTypeKey'],
  62. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  63. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  64. );
  65. }
  66. Map<String, dynamic> toJson() {
  67. final map = super.toJson();
  68. if (code != null)
  69. map['Code'] = code;
  70. if (labelName != null)
  71. map['LabelName'] = labelName;
  72. if (organizationCode != null)
  73. map['OrganizationCode'] = organizationCode;
  74. if (labelTypeKey != null)
  75. map['LabelTypeKey'] = labelTypeKey;
  76. return map;
  77. }
  78. }
  79. class GetLabelRequest extends TokenRequest{
  80. String? code;
  81. GetLabelRequest({
  82. this.code,
  83. String? token,
  84. }) : super(
  85. token: token,
  86. );
  87. factory GetLabelRequest.fromJson(Map<String, dynamic> map) {
  88. return GetLabelRequest(
  89. code: map['Code'],
  90. token: map['Token'],
  91. );
  92. }
  93. Map<String, dynamic> toJson() {
  94. final map = super.toJson();
  95. if (code != null)
  96. map['Code'] = code;
  97. return map;
  98. }
  99. }
  100. class GetLabelByKeyRequest extends TokenRequest{
  101. String? key;
  102. String? value;
  103. GetLabelByKeyRequest({
  104. this.key,
  105. this.value,
  106. String? token,
  107. }) : super(
  108. token: token,
  109. );
  110. factory GetLabelByKeyRequest.fromJson(Map<String, dynamic> map) {
  111. return GetLabelByKeyRequest(
  112. key: map['Key'],
  113. value: map['Value'],
  114. token: map['Token'],
  115. );
  116. }
  117. Map<String, dynamic> toJson() {
  118. final map = super.toJson();
  119. if (key != null)
  120. map['Key'] = key;
  121. if (value != null)
  122. map['Value'] = value;
  123. return map;
  124. }
  125. }
  126. class LabelPageRequest extends PageRequest{
  127. LabelPageRequest({
  128. int pageIndex = 0,
  129. int pageSize = 0,
  130. String? token,
  131. }) : super(
  132. pageIndex: pageIndex,
  133. pageSize: pageSize,
  134. token: token,
  135. );
  136. factory LabelPageRequest.fromJson(Map<String, dynamic> map) {
  137. return LabelPageRequest(
  138. pageIndex: map['PageIndex'],
  139. pageSize: map['PageSize'],
  140. token: map['Token'],
  141. );
  142. }
  143. Map<String, dynamic> toJson() {
  144. final map = super.toJson();
  145. return map;
  146. }
  147. }
  148. class RemoveLabelRequest extends TokenRequest{
  149. String? code;
  150. RemoveLabelRequest({
  151. this.code,
  152. String? token,
  153. }) : super(
  154. token: token,
  155. );
  156. factory RemoveLabelRequest.fromJson(Map<String, dynamic> map) {
  157. return RemoveLabelRequest(
  158. code: map['Code'],
  159. token: map['Token'],
  160. );
  161. }
  162. Map<String, dynamic> toJson() {
  163. final map = super.toJson();
  164. if (code != null)
  165. map['Code'] = code;
  166. return map;
  167. }
  168. }
  169. class GetLabelListRequest extends TokenRequest{
  170. List<String>? codes;
  171. GetLabelListRequest({
  172. this.codes,
  173. String? token,
  174. }) : super(
  175. token: token,
  176. );
  177. factory GetLabelListRequest.fromJson(Map<String, dynamic> map) {
  178. return GetLabelListRequest(
  179. codes: map['Codes']?.cast<String>().toList(),
  180. token: map['Token'],
  181. );
  182. }
  183. Map<String, dynamic> toJson() {
  184. final map = super.toJson();
  185. if (codes != null)
  186. map['Codes'] = codes;
  187. return map;
  188. }
  189. }
  190. class UpdateLabelRequest extends TokenRequest{
  191. String? code;
  192. String? labelName;
  193. String? organizationCode;
  194. String? labelTypeKey;
  195. UpdateLabelRequest({
  196. this.code,
  197. this.labelName,
  198. this.organizationCode,
  199. this.labelTypeKey,
  200. String? token,
  201. }) : super(
  202. token: token,
  203. );
  204. factory UpdateLabelRequest.fromJson(Map<String, dynamic> map) {
  205. return UpdateLabelRequest(
  206. code: map['Code'],
  207. labelName: map['LabelName'],
  208. organizationCode: map['OrganizationCode'],
  209. labelTypeKey: map['LabelTypeKey'],
  210. token: map['Token'],
  211. );
  212. }
  213. Map<String, dynamic> toJson() {
  214. final map = super.toJson();
  215. if (code != null)
  216. map['Code'] = code;
  217. if (labelName != null)
  218. map['LabelName'] = labelName;
  219. if (organizationCode != null)
  220. map['OrganizationCode'] = organizationCode;
  221. if (labelTypeKey != null)
  222. map['LabelTypeKey'] = labelTypeKey;
  223. return map;
  224. }
  225. }
  226. class GetLabelListByKeyRequest extends TokenRequest{
  227. String? key;
  228. GetLabelListByKeyRequest({
  229. this.key,
  230. String? token,
  231. }) : super(
  232. token: token,
  233. );
  234. factory GetLabelListByKeyRequest.fromJson(Map<String, dynamic> map) {
  235. return GetLabelListByKeyRequest(
  236. key: map['Key'],
  237. token: map['Token'],
  238. );
  239. }
  240. Map<String, dynamic> toJson() {
  241. final map = super.toJson();
  242. if (key != null)
  243. map['Key'] = key;
  244. return map;
  245. }
  246. }