vitalUser.m.dart 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. import 'liveConsultation.m.dart';
  2. import 'notification.m.dart';
  3. import 'vitalResidence.m.dart';
  4. import 'device.m.dart';
  5. import 'vitalUserFeature.m.dart';
  6. class CreateUserRequest extends TokenRequest{
  7. String? code;
  8. String? userName;
  9. String? phone;
  10. String? cardNo;
  11. String? realName;
  12. String? headImageToken;
  13. String? organizationCode;
  14. String? teamCode;
  15. String? roleCode;
  16. String? secretPassword;
  17. String? rankName;
  18. String? signature;
  19. CreateUserRequest({
  20. this.code,
  21. this.userName,
  22. this.phone,
  23. this.cardNo,
  24. this.realName,
  25. this.headImageToken,
  26. this.organizationCode,
  27. this.teamCode,
  28. this.roleCode,
  29. this.secretPassword,
  30. this.rankName,
  31. this.signature,
  32. String? token,
  33. }) : super(
  34. token: token,
  35. );
  36. factory CreateUserRequest.fromJson(Map<String, dynamic> map) {
  37. return CreateUserRequest(
  38. code: map['Code'],
  39. userName: map['UserName'],
  40. phone: map['Phone'],
  41. cardNo: map['CardNo'],
  42. realName: map['RealName'],
  43. headImageToken: map['HeadImageToken'],
  44. organizationCode: map['OrganizationCode'],
  45. teamCode: map['TeamCode'],
  46. roleCode: map['RoleCode'],
  47. secretPassword: map['SecretPassword'],
  48. rankName: map['RankName'],
  49. signature: map['Signature'],
  50. token: map['Token'],
  51. );
  52. }
  53. Map<String, dynamic> toJson() {
  54. final map = super.toJson();
  55. if (code != null)
  56. map['Code'] = code;
  57. if (userName != null)
  58. map['UserName'] = userName;
  59. if (phone != null)
  60. map['Phone'] = phone;
  61. if (cardNo != null)
  62. map['CardNo'] = cardNo;
  63. if (realName != null)
  64. map['RealName'] = realName;
  65. if (headImageToken != null)
  66. map['HeadImageToken'] = headImageToken;
  67. if (organizationCode != null)
  68. map['OrganizationCode'] = organizationCode;
  69. if (teamCode != null)
  70. map['TeamCode'] = teamCode;
  71. if (roleCode != null)
  72. map['RoleCode'] = roleCode;
  73. if (secretPassword != null)
  74. map['SecretPassword'] = secretPassword;
  75. if (rankName != null)
  76. map['RankName'] = rankName;
  77. if (signature != null)
  78. map['Signature'] = signature;
  79. return map;
  80. }
  81. }
  82. class UserDTO2 extends BaseDTO{
  83. String? code;
  84. String? userName;
  85. String? phone;
  86. String? cardNo;
  87. String? realName;
  88. String? headImageToken;
  89. String? organizationCode;
  90. String? organizationName;
  91. String? organizationPhone;
  92. String? teamCode;
  93. String? teamName;
  94. String? roleCode;
  95. String? roleName;
  96. String? rankName;
  97. List<ResidenceDTO>? residence;
  98. String? principalCode;
  99. String? principalName;
  100. String? principalPhone;
  101. String? provinceCode;
  102. String? cityCode;
  103. String? districtCode;
  104. String? signature;
  105. UserDTO2({
  106. this.code,
  107. this.userName,
  108. this.phone,
  109. this.cardNo,
  110. this.realName,
  111. this.headImageToken,
  112. this.organizationCode,
  113. this.organizationName,
  114. this.organizationPhone,
  115. this.teamCode,
  116. this.teamName,
  117. this.roleCode,
  118. this.roleName,
  119. this.rankName,
  120. this.residence,
  121. this.principalCode,
  122. this.principalName,
  123. this.principalPhone,
  124. this.provinceCode,
  125. this.cityCode,
  126. this.districtCode,
  127. this.signature,
  128. DateTime? createTime,
  129. DateTime? updateTime,
  130. }) : super(
  131. createTime: createTime,
  132. updateTime: updateTime,
  133. );
  134. factory UserDTO2.fromJson(Map<String, dynamic> map) {
  135. return UserDTO2(
  136. code: map['Code'],
  137. userName: map['UserName'],
  138. phone: map['Phone'],
  139. cardNo: map['CardNo'],
  140. realName: map['RealName'],
  141. headImageToken: map['HeadImageToken'],
  142. organizationCode: map['OrganizationCode'],
  143. organizationName: map['OrganizationName'],
  144. organizationPhone: map['OrganizationPhone'],
  145. teamCode: map['TeamCode'],
  146. teamName: map['TeamName'],
  147. roleCode: map['RoleCode'],
  148. roleName: map['RoleName'],
  149. rankName: map['RankName'],
  150. residence: map['Residence'] != null ? (map['Residence'] as List).map((e)=>ResidenceDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  151. principalCode: map['PrincipalCode'],
  152. principalName: map['PrincipalName'],
  153. principalPhone: map['PrincipalPhone'],
  154. provinceCode: map['ProvinceCode'],
  155. cityCode: map['CityCode'],
  156. districtCode: map['DistrictCode'],
  157. signature: map['Signature'],
  158. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  159. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  160. );
  161. }
  162. Map<String, dynamic> toJson() {
  163. final map = super.toJson();
  164. if (code != null)
  165. map['Code'] = code;
  166. if (userName != null)
  167. map['UserName'] = userName;
  168. if (phone != null)
  169. map['Phone'] = phone;
  170. if (cardNo != null)
  171. map['CardNo'] = cardNo;
  172. if (realName != null)
  173. map['RealName'] = realName;
  174. if (headImageToken != null)
  175. map['HeadImageToken'] = headImageToken;
  176. if (organizationCode != null)
  177. map['OrganizationCode'] = organizationCode;
  178. if (organizationName != null)
  179. map['OrganizationName'] = organizationName;
  180. if (organizationPhone != null)
  181. map['OrganizationPhone'] = organizationPhone;
  182. if (teamCode != null)
  183. map['TeamCode'] = teamCode;
  184. if (teamName != null)
  185. map['TeamName'] = teamName;
  186. if (roleCode != null)
  187. map['RoleCode'] = roleCode;
  188. if (roleName != null)
  189. map['RoleName'] = roleName;
  190. if (rankName != null)
  191. map['RankName'] = rankName;
  192. if (residence != null)
  193. map['Residence'] = residence;
  194. if (principalCode != null)
  195. map['PrincipalCode'] = principalCode;
  196. if (principalName != null)
  197. map['PrincipalName'] = principalName;
  198. if (principalPhone != null)
  199. map['PrincipalPhone'] = principalPhone;
  200. if (provinceCode != null)
  201. map['ProvinceCode'] = provinceCode;
  202. if (cityCode != null)
  203. map['CityCode'] = cityCode;
  204. if (districtCode != null)
  205. map['DistrictCode'] = districtCode;
  206. if (signature != null)
  207. map['Signature'] = signature;
  208. return map;
  209. }
  210. }
  211. class GetUserRequest extends TokenRequest{
  212. String? code;
  213. GetUserRequest({
  214. this.code,
  215. String? token,
  216. }) : super(
  217. token: token,
  218. );
  219. factory GetUserRequest.fromJson(Map<String, dynamic> map) {
  220. return GetUserRequest(
  221. code: map['Code'],
  222. token: map['Token'],
  223. );
  224. }
  225. Map<String, dynamic> toJson() {
  226. final map = super.toJson();
  227. if (code != null)
  228. map['Code'] = code;
  229. return map;
  230. }
  231. }
  232. class GetUserByKeyRequest extends TokenRequest{
  233. String? key;
  234. String? value;
  235. GetUserByKeyRequest({
  236. this.key,
  237. this.value,
  238. String? token,
  239. }) : super(
  240. token: token,
  241. );
  242. factory GetUserByKeyRequest.fromJson(Map<String, dynamic> map) {
  243. return GetUserByKeyRequest(
  244. key: map['Key'],
  245. value: map['Value'],
  246. token: map['Token'],
  247. );
  248. }
  249. Map<String, dynamic> toJson() {
  250. final map = super.toJson();
  251. if (key != null)
  252. map['Key'] = key;
  253. if (value != null)
  254. map['Value'] = value;
  255. return map;
  256. }
  257. }
  258. class UserPageRequest extends PageRequest{
  259. UserPageRequest({
  260. int pageIndex = 0,
  261. int pageSize = 0,
  262. String? token,
  263. }) : super(
  264. pageIndex: pageIndex,
  265. pageSize: pageSize,
  266. token: token,
  267. );
  268. factory UserPageRequest.fromJson(Map<String, dynamic> map) {
  269. return UserPageRequest(
  270. pageIndex: map['PageIndex'],
  271. pageSize: map['PageSize'],
  272. token: map['Token'],
  273. );
  274. }
  275. Map<String, dynamic> toJson() {
  276. final map = super.toJson();
  277. return map;
  278. }
  279. }
  280. class RemoveUserRequest extends TokenRequest{
  281. String? code;
  282. RemoveUserRequest({
  283. this.code,
  284. String? token,
  285. }) : super(
  286. token: token,
  287. );
  288. factory RemoveUserRequest.fromJson(Map<String, dynamic> map) {
  289. return RemoveUserRequest(
  290. code: map['Code'],
  291. token: map['Token'],
  292. );
  293. }
  294. Map<String, dynamic> toJson() {
  295. final map = super.toJson();
  296. if (code != null)
  297. map['Code'] = code;
  298. return map;
  299. }
  300. }
  301. class GetUserListRequest2 extends TokenRequest{
  302. List<String>? codes;
  303. GetUserListRequest2({
  304. this.codes,
  305. String? token,
  306. }) : super(
  307. token: token,
  308. );
  309. factory GetUserListRequest2.fromJson(Map<String, dynamic> map) {
  310. return GetUserListRequest2(
  311. codes: map['Codes']?.cast<String>().toList(),
  312. token: map['Token'],
  313. );
  314. }
  315. Map<String, dynamic> toJson() {
  316. final map = super.toJson();
  317. if (codes != null)
  318. map['Codes'] = codes;
  319. return map;
  320. }
  321. }
  322. class UpdateUserRequest extends TokenRequest{
  323. String? code;
  324. String? phone;
  325. String? cardNo;
  326. String? realName;
  327. String? headImageToken;
  328. String? organizationCode;
  329. String? teamCode;
  330. String? roleCode;
  331. String? rankName;
  332. String? signature;
  333. UpdateUserRequest({
  334. this.code,
  335. this.phone,
  336. this.cardNo,
  337. this.realName,
  338. this.headImageToken,
  339. this.organizationCode,
  340. this.teamCode,
  341. this.roleCode,
  342. this.rankName,
  343. this.signature,
  344. String? token,
  345. }) : super(
  346. token: token,
  347. );
  348. factory UpdateUserRequest.fromJson(Map<String, dynamic> map) {
  349. return UpdateUserRequest(
  350. code: map['Code'],
  351. phone: map['Phone'],
  352. cardNo: map['CardNo'],
  353. realName: map['RealName'],
  354. headImageToken: map['HeadImageToken'],
  355. organizationCode: map['OrganizationCode'],
  356. teamCode: map['TeamCode'],
  357. roleCode: map['RoleCode'],
  358. rankName: map['RankName'],
  359. signature: map['Signature'],
  360. token: map['Token'],
  361. );
  362. }
  363. Map<String, dynamic> toJson() {
  364. final map = super.toJson();
  365. if (code != null)
  366. map['Code'] = code;
  367. if (phone != null)
  368. map['Phone'] = phone;
  369. if (cardNo != null)
  370. map['CardNo'] = cardNo;
  371. if (realName != null)
  372. map['RealName'] = realName;
  373. if (headImageToken != null)
  374. map['HeadImageToken'] = headImageToken;
  375. if (organizationCode != null)
  376. map['OrganizationCode'] = organizationCode;
  377. if (teamCode != null)
  378. map['TeamCode'] = teamCode;
  379. if (roleCode != null)
  380. map['RoleCode'] = roleCode;
  381. if (rankName != null)
  382. map['RankName'] = rankName;
  383. if (signature != null)
  384. map['Signature'] = signature;
  385. return map;
  386. }
  387. }
  388. class ResetUserNameRequest extends TokenRequest{
  389. String? code;
  390. String? userName;
  391. ResetUserNameRequest({
  392. this.code,
  393. this.userName,
  394. String? token,
  395. }) : super(
  396. token: token,
  397. );
  398. factory ResetUserNameRequest.fromJson(Map<String, dynamic> map) {
  399. return ResetUserNameRequest(
  400. code: map['Code'],
  401. userName: map['UserName'],
  402. token: map['Token'],
  403. );
  404. }
  405. Map<String, dynamic> toJson() {
  406. final map = super.toJson();
  407. if (code != null)
  408. map['Code'] = code;
  409. if (userName != null)
  410. map['UserName'] = userName;
  411. return map;
  412. }
  413. }
  414. class GetUserPageByOrganizationCodeRequest extends PageRequest{
  415. String? organizationCode;
  416. GetUserPageByOrganizationCodeRequest({
  417. this.organizationCode,
  418. int pageIndex = 0,
  419. int pageSize = 0,
  420. String? token,
  421. }) : super(
  422. pageIndex: pageIndex,
  423. pageSize: pageSize,
  424. token: token,
  425. );
  426. factory GetUserPageByOrganizationCodeRequest.fromJson(Map<String, dynamic> map) {
  427. return GetUserPageByOrganizationCodeRequest(
  428. organizationCode: map['OrganizationCode'],
  429. pageIndex: map['PageIndex'],
  430. pageSize: map['PageSize'],
  431. token: map['Token'],
  432. );
  433. }
  434. Map<String, dynamic> toJson() {
  435. final map = super.toJson();
  436. if (organizationCode != null)
  437. map['OrganizationCode'] = organizationCode;
  438. return map;
  439. }
  440. }
  441. class SetAreaOfResponsibilityRequest extends TokenRequest{
  442. String? code;
  443. List<String>? residenceCodes;
  444. SetAreaOfResponsibilityRequest({
  445. this.code,
  446. this.residenceCodes,
  447. String? token,
  448. }) : super(
  449. token: token,
  450. );
  451. factory SetAreaOfResponsibilityRequest.fromJson(Map<String, dynamic> map) {
  452. return SetAreaOfResponsibilityRequest(
  453. code: map['Code'],
  454. residenceCodes: map['ResidenceCodes']?.cast<String>().toList(),
  455. token: map['Token'],
  456. );
  457. }
  458. Map<String, dynamic> toJson() {
  459. final map = super.toJson();
  460. if (code != null)
  461. map['Code'] = code;
  462. if (residenceCodes != null)
  463. map['ResidenceCodes'] = residenceCodes;
  464. return map;
  465. }
  466. }
  467. class GetAreaOfResponsibilityRequest extends TokenRequest{
  468. String? code;
  469. GetAreaOfResponsibilityRequest({
  470. this.code,
  471. String? token,
  472. }) : super(
  473. token: token,
  474. );
  475. factory GetAreaOfResponsibilityRequest.fromJson(Map<String, dynamic> map) {
  476. return GetAreaOfResponsibilityRequest(
  477. code: map['Code'],
  478. token: map['Token'],
  479. );
  480. }
  481. Map<String, dynamic> toJson() {
  482. final map = super.toJson();
  483. if (code != null)
  484. map['Code'] = code;
  485. return map;
  486. }
  487. }
  488. class GetUserPageByTeamCodeRequest extends PageRequest{
  489. String? teamCode;
  490. GetUserPageByTeamCodeRequest({
  491. this.teamCode,
  492. int pageIndex = 0,
  493. int pageSize = 0,
  494. String? token,
  495. }) : super(
  496. pageIndex: pageIndex,
  497. pageSize: pageSize,
  498. token: token,
  499. );
  500. factory GetUserPageByTeamCodeRequest.fromJson(Map<String, dynamic> map) {
  501. return GetUserPageByTeamCodeRequest(
  502. teamCode: map['TeamCode'],
  503. pageIndex: map['PageIndex'],
  504. pageSize: map['PageSize'],
  505. token: map['Token'],
  506. );
  507. }
  508. Map<String, dynamic> toJson() {
  509. final map = super.toJson();
  510. if (teamCode != null)
  511. map['TeamCode'] = teamCode;
  512. return map;
  513. }
  514. }
  515. class SetSignatureRequest extends TokenRequest{
  516. String? code;
  517. String? signature;
  518. SetSignatureRequest({
  519. this.code,
  520. this.signature,
  521. String? token,
  522. }) : super(
  523. token: token,
  524. );
  525. factory SetSignatureRequest.fromJson(Map<String, dynamic> map) {
  526. return SetSignatureRequest(
  527. code: map['Code'],
  528. signature: map['Signature'],
  529. token: map['Token'],
  530. );
  531. }
  532. Map<String, dynamic> toJson() {
  533. final map = super.toJson();
  534. if (code != null)
  535. map['Code'] = code;
  536. if (signature != null)
  537. map['Signature'] = signature;
  538. return map;
  539. }
  540. }
  541. class GetMenuPermissionRequest extends TokenRequest{
  542. ApplicationTypeEnum appType;
  543. GetMenuPermissionRequest({
  544. this.appType = ApplicationTypeEnum.Web,
  545. String? token,
  546. }) : super(
  547. token: token,
  548. );
  549. factory GetMenuPermissionRequest.fromJson(Map<String, dynamic> map) {
  550. return GetMenuPermissionRequest(
  551. appType: ApplicationTypeEnum.values.firstWhere((e) => e.index == map['AppType']),
  552. token: map['Token'],
  553. );
  554. }
  555. Map<String, dynamic> toJson() {
  556. final map = super.toJson();
  557. map['AppType'] = appType.index;
  558. return map;
  559. }
  560. }
  561. class GetOperationPermissionRequest extends TokenRequest{
  562. ApplicationTypeEnum appType;
  563. GetOperationPermissionRequest({
  564. this.appType = ApplicationTypeEnum.Web,
  565. String? token,
  566. }) : super(
  567. token: token,
  568. );
  569. factory GetOperationPermissionRequest.fromJson(Map<String, dynamic> map) {
  570. return GetOperationPermissionRequest(
  571. appType: ApplicationTypeEnum.values.firstWhere((e) => e.index == map['AppType']),
  572. token: map['Token'],
  573. );
  574. }
  575. Map<String, dynamic> toJson() {
  576. final map = super.toJson();
  577. map['AppType'] = appType.index;
  578. return map;
  579. }
  580. }