vitalTeamRegion.m.dart 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. import 'liveConsultation.m.dart';
  2. import 'notification.m.dart';
  3. import 'device.m.dart';
  4. class CreateTeamRegionRequest extends TokenRequest{
  5. String? code;
  6. String? teamCode;
  7. String? fullName;
  8. String? regionCode;
  9. CreateTeamRegionRequest({
  10. this.code,
  11. this.teamCode,
  12. this.fullName,
  13. this.regionCode,
  14. String? token,
  15. }) : super(
  16. token: token,
  17. );
  18. factory CreateTeamRegionRequest.fromJson(Map<String, dynamic> map) {
  19. return CreateTeamRegionRequest(
  20. code: map['Code'],
  21. teamCode: map['TeamCode'],
  22. fullName: map['FullName'],
  23. regionCode: map['RegionCode'],
  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 (teamCode != null)
  32. map['TeamCode'] = teamCode;
  33. if (fullName != null)
  34. map['FullName'] = fullName;
  35. if (regionCode != null)
  36. map['RegionCode'] = regionCode;
  37. return map;
  38. }
  39. }
  40. class TeamRegionDTO extends BaseDTO{
  41. String? code;
  42. String? teamCode;
  43. String? fullName;
  44. String? regionCode;
  45. TeamRegionDTO({
  46. this.code,
  47. this.teamCode,
  48. this.fullName,
  49. this.regionCode,
  50. DateTime? createTime,
  51. DateTime? updateTime,
  52. }) : super(
  53. createTime: createTime,
  54. updateTime: updateTime,
  55. );
  56. factory TeamRegionDTO.fromJson(Map<String, dynamic> map) {
  57. return TeamRegionDTO(
  58. code: map['Code'],
  59. teamCode: map['TeamCode'],
  60. fullName: map['FullName'],
  61. regionCode: map['RegionCode'],
  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 (teamCode != null)
  71. map['TeamCode'] = teamCode;
  72. if (fullName != null)
  73. map['FullName'] = fullName;
  74. if (regionCode != null)
  75. map['RegionCode'] = regionCode;
  76. return map;
  77. }
  78. }
  79. class GetTeamRegionRequest extends TokenRequest{
  80. String? code;
  81. GetTeamRegionRequest({
  82. this.code,
  83. String? token,
  84. }) : super(
  85. token: token,
  86. );
  87. factory GetTeamRegionRequest.fromJson(Map<String, dynamic> map) {
  88. return GetTeamRegionRequest(
  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 GetTeamRegionByKeyRequest extends TokenRequest{
  101. String? key;
  102. String? value;
  103. GetTeamRegionByKeyRequest({
  104. this.key,
  105. this.value,
  106. String? token,
  107. }) : super(
  108. token: token,
  109. );
  110. factory GetTeamRegionByKeyRequest.fromJson(Map<String, dynamic> map) {
  111. return GetTeamRegionByKeyRequest(
  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 TeamRegionPageRequest extends PageRequest{
  127. TeamRegionPageRequest({
  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 TeamRegionPageRequest.fromJson(Map<String, dynamic> map) {
  137. return TeamRegionPageRequest(
  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 RemoveTeamRegionRequest extends TokenRequest{
  149. String? code;
  150. RemoveTeamRegionRequest({
  151. this.code,
  152. String? token,
  153. }) : super(
  154. token: token,
  155. );
  156. factory RemoveTeamRegionRequest.fromJson(Map<String, dynamic> map) {
  157. return RemoveTeamRegionRequest(
  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 GetTeamRegionListRequest extends TokenRequest{
  170. List<String>? codes;
  171. GetTeamRegionListRequest({
  172. this.codes,
  173. String? token,
  174. }) : super(
  175. token: token,
  176. );
  177. factory GetTeamRegionListRequest.fromJson(Map<String, dynamic> map) {
  178. return GetTeamRegionListRequest(
  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 UpdateTeamRegionRequest extends TokenRequest{
  191. String? code;
  192. String? teamCode;
  193. String? fullName;
  194. String? regionCode;
  195. UpdateTeamRegionRequest({
  196. this.code,
  197. this.teamCode,
  198. this.fullName,
  199. this.regionCode,
  200. String? token,
  201. }) : super(
  202. token: token,
  203. );
  204. factory UpdateTeamRegionRequest.fromJson(Map<String, dynamic> map) {
  205. return UpdateTeamRegionRequest(
  206. code: map['Code'],
  207. teamCode: map['TeamCode'],
  208. fullName: map['FullName'],
  209. regionCode: map['RegionCode'],
  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 (teamCode != null)
  218. map['TeamCode'] = teamCode;
  219. if (fullName != null)
  220. map['FullName'] = fullName;
  221. if (regionCode != null)
  222. map['RegionCode'] = regionCode;
  223. return map;
  224. }
  225. }