vitalPatient.m.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. import 'liveConsultation.m.dart';
  2. import 'vitalDiagnosis.m.dart';
  3. import 'vitalContractRecord.m.dart';
  4. import 'notification.m.dart';
  5. import 'device.m.dart';
  6. import 'package:fis_jsonrpc/utils.dart';
  7. class CreatePatientRequest2 extends TokenRequest{
  8. String? code;
  9. String? patientName;
  10. String? phone;
  11. String? cardNo;
  12. String? nationality;
  13. DateTime? birthday;
  14. List<String>? crowdLabels;
  15. CardTypeEnum cardType;
  16. GenderEnum patientGender;
  17. String? patientAddress;
  18. String? permanentResidenceAddress;
  19. String? teamRegionCode;
  20. String? contractedDoctor;
  21. CreatePatientRequest2({
  22. this.code,
  23. this.patientName,
  24. this.phone,
  25. this.cardNo,
  26. this.nationality,
  27. this.birthday,
  28. this.crowdLabels,
  29. this.cardType = CardTypeEnum.Identity,
  30. this.patientGender = GenderEnum.Unknown,
  31. this.patientAddress,
  32. this.permanentResidenceAddress,
  33. this.teamRegionCode,
  34. this.contractedDoctor,
  35. String? token,
  36. }) : super(
  37. token: token,
  38. );
  39. factory CreatePatientRequest2.fromJson(Map<String, dynamic> map) {
  40. return CreatePatientRequest2(
  41. code: map['Code'],
  42. patientName: map['PatientName'],
  43. phone: map['Phone'],
  44. cardNo: map['CardNo'],
  45. nationality: map['Nationality'],
  46. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  47. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  48. cardType: CardTypeEnum.values.firstWhere((e) => e.index == map['CardType']),
  49. patientGender: GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']),
  50. patientAddress: map['PatientAddress'],
  51. permanentResidenceAddress: map['PermanentResidenceAddress'],
  52. teamRegionCode: map['TeamRegionCode'],
  53. contractedDoctor: map['ContractedDoctor'],
  54. token: map['Token'],
  55. );
  56. }
  57. Map<String, dynamic> toJson() {
  58. final map = super.toJson();
  59. if (code != null)
  60. map['Code'] = code;
  61. if (patientName != null)
  62. map['PatientName'] = patientName;
  63. if (phone != null)
  64. map['Phone'] = phone;
  65. if (cardNo != null)
  66. map['CardNo'] = cardNo;
  67. if (nationality != null)
  68. map['Nationality'] = nationality;
  69. if (birthday != null)
  70. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  71. if (crowdLabels != null)
  72. map['CrowdLabels'] = crowdLabels;
  73. map['CardType'] = cardType.index;
  74. map['PatientGender'] = patientGender.index;
  75. if (patientAddress != null)
  76. map['PatientAddress'] = patientAddress;
  77. if (permanentResidenceAddress != null)
  78. map['PermanentResidenceAddress'] = permanentResidenceAddress;
  79. if (teamRegionCode != null)
  80. map['TeamRegionCode'] = teamRegionCode;
  81. if (contractedDoctor != null)
  82. map['ContractedDoctor'] = contractedDoctor;
  83. return map;
  84. }
  85. }
  86. enum PatientStatusEnum {
  87. Created,
  88. Cancellation,
  89. }
  90. class PatientDTO extends BaseDTO{
  91. String? code;
  92. String? recordNo;
  93. String? patientName;
  94. String? phone;
  95. String? cardNo;
  96. String? nationality;
  97. DateTime? birthday;
  98. List<String>? crowdLabels;
  99. CardTypeEnum cardType;
  100. GenderEnum patientGender;
  101. String? patientAddress;
  102. String? permanentResidenceAddress;
  103. String? teamRegionCode;
  104. String? createdDoctor;
  105. String? contractedDoctor;
  106. List<String>? labelNames;
  107. String? createdDoctorName;
  108. String? createdOrgName;
  109. String? createdTeamName;
  110. PatientStatusEnum status;
  111. String? createdOrgCode;
  112. String? createdTeamCode;
  113. String? contractedDoctorName;
  114. ContractStateEnum contractState;
  115. List<String>? photos;
  116. PatientDTO({
  117. this.code,
  118. this.recordNo,
  119. this.patientName,
  120. this.phone,
  121. this.cardNo,
  122. this.nationality,
  123. this.birthday,
  124. this.crowdLabels,
  125. this.cardType = CardTypeEnum.Identity,
  126. this.patientGender = GenderEnum.Unknown,
  127. this.patientAddress,
  128. this.permanentResidenceAddress,
  129. this.teamRegionCode,
  130. this.createdDoctor,
  131. this.contractedDoctor,
  132. this.labelNames,
  133. this.createdDoctorName,
  134. this.createdOrgName,
  135. this.createdTeamName,
  136. this.status = PatientStatusEnum.Created,
  137. this.createdOrgCode,
  138. this.createdTeamCode,
  139. this.contractedDoctorName,
  140. this.contractState = ContractStateEnum.Unsigned,
  141. this.photos,
  142. DateTime? createTime,
  143. DateTime? updateTime,
  144. }) : super(
  145. createTime: createTime,
  146. updateTime: updateTime,
  147. );
  148. factory PatientDTO.fromJson(Map<String, dynamic> map) {
  149. return PatientDTO(
  150. code: map['Code'],
  151. recordNo: map['RecordNo'],
  152. patientName: map['PatientName'],
  153. phone: map['Phone'],
  154. cardNo: map['CardNo'],
  155. nationality: map['Nationality'],
  156. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  157. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  158. cardType: CardTypeEnum.values.firstWhere((e) => e.index == map['CardType']),
  159. patientGender: GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']),
  160. patientAddress: map['PatientAddress'],
  161. permanentResidenceAddress: map['PermanentResidenceAddress'],
  162. teamRegionCode: map['TeamRegionCode'],
  163. createdDoctor: map['CreatedDoctor'],
  164. contractedDoctor: map['ContractedDoctor'],
  165. labelNames: map['LabelNames']?.cast<String>().toList(),
  166. createdDoctorName: map['CreatedDoctorName'],
  167. createdOrgName: map['CreatedOrgName'],
  168. createdTeamName: map['CreatedTeamName'],
  169. status: PatientStatusEnum.values.firstWhere((e) => e.index == map['Status']),
  170. createdOrgCode: map['CreatedOrgCode'],
  171. createdTeamCode: map['CreatedTeamCode'],
  172. contractedDoctorName: map['ContractedDoctorName'],
  173. contractState: ContractStateEnum.values.firstWhere((e) => e.index == map['ContractState']),
  174. photos: map['Photos']?.cast<String>().toList(),
  175. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  176. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  177. );
  178. }
  179. Map<String, dynamic> toJson() {
  180. final map = super.toJson();
  181. if (code != null)
  182. map['Code'] = code;
  183. if (recordNo != null)
  184. map['RecordNo'] = recordNo;
  185. if (patientName != null)
  186. map['PatientName'] = patientName;
  187. if (phone != null)
  188. map['Phone'] = phone;
  189. if (cardNo != null)
  190. map['CardNo'] = cardNo;
  191. if (nationality != null)
  192. map['Nationality'] = nationality;
  193. if (birthday != null)
  194. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  195. if (crowdLabels != null)
  196. map['CrowdLabels'] = crowdLabels;
  197. map['CardType'] = cardType.index;
  198. map['PatientGender'] = patientGender.index;
  199. if (patientAddress != null)
  200. map['PatientAddress'] = patientAddress;
  201. if (permanentResidenceAddress != null)
  202. map['PermanentResidenceAddress'] = permanentResidenceAddress;
  203. if (teamRegionCode != null)
  204. map['TeamRegionCode'] = teamRegionCode;
  205. if (createdDoctor != null)
  206. map['CreatedDoctor'] = createdDoctor;
  207. if (contractedDoctor != null)
  208. map['ContractedDoctor'] = contractedDoctor;
  209. if (labelNames != null)
  210. map['LabelNames'] = labelNames;
  211. if (createdDoctorName != null)
  212. map['CreatedDoctorName'] = createdDoctorName;
  213. if (createdOrgName != null)
  214. map['CreatedOrgName'] = createdOrgName;
  215. if (createdTeamName != null)
  216. map['CreatedTeamName'] = createdTeamName;
  217. map['Status'] = status.index;
  218. if (createdOrgCode != null)
  219. map['CreatedOrgCode'] = createdOrgCode;
  220. if (createdTeamCode != null)
  221. map['CreatedTeamCode'] = createdTeamCode;
  222. if (contractedDoctorName != null)
  223. map['ContractedDoctorName'] = contractedDoctorName;
  224. map['ContractState'] = contractState.index;
  225. if (photos != null)
  226. map['Photos'] = photos;
  227. return map;
  228. }
  229. }
  230. class GetPatientRequest extends TokenRequest{
  231. String? code;
  232. GetPatientRequest({
  233. this.code,
  234. String? token,
  235. }) : super(
  236. token: token,
  237. );
  238. factory GetPatientRequest.fromJson(Map<String, dynamic> map) {
  239. return GetPatientRequest(
  240. code: map['Code'],
  241. token: map['Token'],
  242. );
  243. }
  244. Map<String, dynamic> toJson() {
  245. final map = super.toJson();
  246. if (code != null)
  247. map['Code'] = code;
  248. return map;
  249. }
  250. }
  251. class GetPatientByKeyRequest extends TokenRequest{
  252. String? key;
  253. String? value;
  254. GetPatientByKeyRequest({
  255. this.key,
  256. this.value,
  257. String? token,
  258. }) : super(
  259. token: token,
  260. );
  261. factory GetPatientByKeyRequest.fromJson(Map<String, dynamic> map) {
  262. return GetPatientByKeyRequest(
  263. key: map['Key'],
  264. value: map['Value'],
  265. token: map['Token'],
  266. );
  267. }
  268. Map<String, dynamic> toJson() {
  269. final map = super.toJson();
  270. if (key != null)
  271. map['Key'] = key;
  272. if (value != null)
  273. map['Value'] = value;
  274. return map;
  275. }
  276. }
  277. class PatientPageRequest extends PageRequest{
  278. List<String>? crowdLabels;
  279. PatientPageRequest({
  280. this.crowdLabels,
  281. int pageIndex = 0,
  282. int pageSize = 0,
  283. String? token,
  284. }) : super(
  285. pageIndex: pageIndex,
  286. pageSize: pageSize,
  287. token: token,
  288. );
  289. factory PatientPageRequest.fromJson(Map<String, dynamic> map) {
  290. return PatientPageRequest(
  291. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  292. pageIndex: map['PageIndex'],
  293. pageSize: map['PageSize'],
  294. token: map['Token'],
  295. );
  296. }
  297. Map<String, dynamic> toJson() {
  298. final map = super.toJson();
  299. if (crowdLabels != null)
  300. map['CrowdLabels'] = crowdLabels;
  301. return map;
  302. }
  303. }
  304. class RemovePatientRequest extends TokenRequest{
  305. String? code;
  306. RemovePatientRequest({
  307. this.code,
  308. String? token,
  309. }) : super(
  310. token: token,
  311. );
  312. factory RemovePatientRequest.fromJson(Map<String, dynamic> map) {
  313. return RemovePatientRequest(
  314. code: map['Code'],
  315. token: map['Token'],
  316. );
  317. }
  318. Map<String, dynamic> toJson() {
  319. final map = super.toJson();
  320. if (code != null)
  321. map['Code'] = code;
  322. return map;
  323. }
  324. }
  325. class GetPatientListRequest extends TokenRequest{
  326. List<String>? codes;
  327. GetPatientListRequest({
  328. this.codes,
  329. String? token,
  330. }) : super(
  331. token: token,
  332. );
  333. factory GetPatientListRequest.fromJson(Map<String, dynamic> map) {
  334. return GetPatientListRequest(
  335. codes: map['Codes']?.cast<String>().toList(),
  336. token: map['Token'],
  337. );
  338. }
  339. Map<String, dynamic> toJson() {
  340. final map = super.toJson();
  341. if (codes != null)
  342. map['Codes'] = codes;
  343. return map;
  344. }
  345. }
  346. class UpdatePatientRequest2 extends TokenRequest{
  347. String? code;
  348. String? patientName;
  349. String? phone;
  350. String? cardNo;
  351. String? nationality;
  352. DateTime? birthday;
  353. List<String>? crowdLabels;
  354. CardTypeEnum? cardType;
  355. GenderEnum? patientGender;
  356. String? patientAddress;
  357. String? permanentResidenceAddress;
  358. String? teamRegionCode;
  359. String? contractedDoctor;
  360. UpdatePatientRequest2({
  361. this.code,
  362. this.patientName,
  363. this.phone,
  364. this.cardNo,
  365. this.nationality,
  366. this.birthday,
  367. this.crowdLabels,
  368. this.cardType,
  369. this.patientGender,
  370. this.patientAddress,
  371. this.permanentResidenceAddress,
  372. this.teamRegionCode,
  373. this.contractedDoctor,
  374. String? token,
  375. }) : super(
  376. token: token,
  377. );
  378. factory UpdatePatientRequest2.fromJson(Map<String, dynamic> map) {
  379. return UpdatePatientRequest2(
  380. code: map['Code'],
  381. patientName: map['PatientName'],
  382. phone: map['Phone'],
  383. cardNo: map['CardNo'],
  384. nationality: map['Nationality'],
  385. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  386. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  387. cardType: map['CardType'] != null ? CardTypeEnum.values.firstWhere((e) => e.index == map['CardType']) : null,
  388. patientGender: map['PatientGender'] != null ? GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']) : null,
  389. patientAddress: map['PatientAddress'],
  390. permanentResidenceAddress: map['PermanentResidenceAddress'],
  391. teamRegionCode: map['TeamRegionCode'],
  392. contractedDoctor: map['ContractedDoctor'],
  393. token: map['Token'],
  394. );
  395. }
  396. Map<String, dynamic> toJson() {
  397. final map = super.toJson();
  398. if (code != null)
  399. map['Code'] = code;
  400. if (patientName != null)
  401. map['PatientName'] = patientName;
  402. if (phone != null)
  403. map['Phone'] = phone;
  404. if (cardNo != null)
  405. map['CardNo'] = cardNo;
  406. if (nationality != null)
  407. map['Nationality'] = nationality;
  408. if (birthday != null)
  409. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  410. if (crowdLabels != null)
  411. map['CrowdLabels'] = crowdLabels;
  412. if (cardType != null)
  413. map['CardType'] = cardType;
  414. if (patientGender != null)
  415. map['PatientGender'] = patientGender;
  416. if (patientAddress != null)
  417. map['PatientAddress'] = patientAddress;
  418. if (permanentResidenceAddress != null)
  419. map['PermanentResidenceAddress'] = permanentResidenceAddress;
  420. if (teamRegionCode != null)
  421. map['TeamRegionCode'] = teamRegionCode;
  422. if (contractedDoctor != null)
  423. map['ContractedDoctor'] = contractedDoctor;
  424. return map;
  425. }
  426. }
  427. class SetCrowdLabelsRequest extends TokenRequest{
  428. String? code;
  429. List<String>? crowdLabels;
  430. SetCrowdLabelsRequest({
  431. this.code,
  432. this.crowdLabels,
  433. String? token,
  434. }) : super(
  435. token: token,
  436. );
  437. factory SetCrowdLabelsRequest.fromJson(Map<String, dynamic> map) {
  438. return SetCrowdLabelsRequest(
  439. code: map['Code'],
  440. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  441. token: map['Token'],
  442. );
  443. }
  444. Map<String, dynamic> toJson() {
  445. final map = super.toJson();
  446. if (code != null)
  447. map['Code'] = code;
  448. if (crowdLabels != null)
  449. map['CrowdLabels'] = crowdLabels;
  450. return map;
  451. }
  452. }
  453. class UpdatePatientPhotosRequest extends TokenRequest{
  454. String? code;
  455. List<String>? photos;
  456. UpdatePatientPhotosRequest({
  457. this.code,
  458. this.photos,
  459. String? token,
  460. }) : super(
  461. token: token,
  462. );
  463. factory UpdatePatientPhotosRequest.fromJson(Map<String, dynamic> map) {
  464. return UpdatePatientPhotosRequest(
  465. code: map['Code'],
  466. photos: map['Photos']?.cast<String>().toList(),
  467. token: map['Token'],
  468. );
  469. }
  470. Map<String, dynamic> toJson() {
  471. final map = super.toJson();
  472. if (code != null)
  473. map['Code'] = code;
  474. if (photos != null)
  475. map['Photos'] = photos;
  476. return map;
  477. }
  478. }
  479. enum FaceScanErrorTypeEnum2 {
  480. Success,
  481. NoCreated,
  482. APIError,
  483. }
  484. class PatientBaseDTO {
  485. bool isSuccess;
  486. FaceScanErrorTypeEnum2 faceScanErrorType;
  487. String? errorMessage;
  488. String? cardNo;
  489. String? patientName;
  490. String? nationality;
  491. DateTime? birthday;
  492. GenderEnum patientGender;
  493. String? patientAddress;
  494. PatientBaseDTO({
  495. this.isSuccess = false,
  496. this.faceScanErrorType = FaceScanErrorTypeEnum2.Success,
  497. this.errorMessage,
  498. this.cardNo,
  499. this.patientName,
  500. this.nationality,
  501. this.birthday,
  502. this.patientGender = GenderEnum.Unknown,
  503. this.patientAddress,
  504. });
  505. factory PatientBaseDTO.fromJson(Map<String, dynamic> map) {
  506. return PatientBaseDTO(
  507. isSuccess: map['IsSuccess'],
  508. faceScanErrorType: FaceScanErrorTypeEnum2.values.firstWhere((e) => e.index == map['FaceScanErrorType']),
  509. errorMessage: map['ErrorMessage'],
  510. cardNo: map['CardNo'],
  511. patientName: map['PatientName'],
  512. nationality: map['Nationality'],
  513. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  514. patientGender: GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']),
  515. patientAddress: map['PatientAddress'],
  516. );
  517. }
  518. Map<String, dynamic> toJson() {
  519. final map = Map<String, dynamic>();
  520. map['IsSuccess'] = isSuccess;
  521. map['FaceScanErrorType'] = faceScanErrorType.index;
  522. if (errorMessage != null) {
  523. map['ErrorMessage'] = errorMessage;
  524. }
  525. if (cardNo != null) {
  526. map['CardNo'] = cardNo;
  527. }
  528. if (patientName != null) {
  529. map['PatientName'] = patientName;
  530. }
  531. if (nationality != null) {
  532. map['Nationality'] = nationality;
  533. }
  534. if (birthday != null) {
  535. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  536. }
  537. map['PatientGender'] = patientGender.index;
  538. if (patientAddress != null) {
  539. map['PatientAddress'] = patientAddress;
  540. }
  541. return map;
  542. }
  543. }
  544. class GetPatientBaseByImageRequest extends TokenRequest{
  545. String? image;
  546. GetPatientBaseByImageRequest({
  547. this.image,
  548. String? token,
  549. }) : super(
  550. token: token,
  551. );
  552. factory GetPatientBaseByImageRequest.fromJson(Map<String, dynamic> map) {
  553. return GetPatientBaseByImageRequest(
  554. image: map['Image'],
  555. token: map['Token'],
  556. );
  557. }
  558. Map<String, dynamic> toJson() {
  559. final map = super.toJson();
  560. if (image != null)
  561. map['Image'] = image;
  562. return map;
  563. }
  564. }
  565. class GetPatientBaseByFaceImageRequest extends TokenRequest{
  566. String? image;
  567. GetPatientBaseByFaceImageRequest({
  568. this.image,
  569. String? token,
  570. }) : super(
  571. token: token,
  572. );
  573. factory GetPatientBaseByFaceImageRequest.fromJson(Map<String, dynamic> map) {
  574. return GetPatientBaseByFaceImageRequest(
  575. image: map['Image'],
  576. token: map['Token'],
  577. );
  578. }
  579. Map<String, dynamic> toJson() {
  580. final map = super.toJson();
  581. if (image != null)
  582. map['Image'] = image;
  583. return map;
  584. }
  585. }
  586. class SavePersonDTO {
  587. bool success;
  588. String? bindCardNo;
  589. String? errMessage;
  590. SavePersonDTO({
  591. this.success = false,
  592. this.bindCardNo,
  593. this.errMessage,
  594. });
  595. factory SavePersonDTO.fromJson(Map<String, dynamic> map) {
  596. return SavePersonDTO(
  597. success: map['Success'],
  598. bindCardNo: map['BindCardNo'],
  599. errMessage: map['ErrMessage'],
  600. );
  601. }
  602. Map<String, dynamic> toJson() {
  603. final map = Map<String, dynamic>();
  604. map['Success'] = success;
  605. if (bindCardNo != null) {
  606. map['BindCardNo'] = bindCardNo;
  607. }
  608. if (errMessage != null) {
  609. map['ErrMessage'] = errMessage;
  610. }
  611. return map;
  612. }
  613. }
  614. class SavePatientBaseByFaceImageRequest extends TokenRequest{
  615. String? cardNo;
  616. String? image;
  617. SavePatientBaseByFaceImageRequest({
  618. this.cardNo,
  619. this.image,
  620. String? token,
  621. }) : super(
  622. token: token,
  623. );
  624. factory SavePatientBaseByFaceImageRequest.fromJson(Map<String, dynamic> map) {
  625. return SavePatientBaseByFaceImageRequest(
  626. cardNo: map['CardNo'],
  627. image: map['Image'],
  628. token: map['Token'],
  629. );
  630. }
  631. Map<String, dynamic> toJson() {
  632. final map = super.toJson();
  633. if (cardNo != null)
  634. map['CardNo'] = cardNo;
  635. if (image != null)
  636. map['Image'] = image;
  637. return map;
  638. }
  639. }
  640. class DeletePersonDTO {
  641. bool success;
  642. String? errMessage;
  643. DeletePersonDTO({
  644. this.success = false,
  645. this.errMessage,
  646. });
  647. factory DeletePersonDTO.fromJson(Map<String, dynamic> map) {
  648. return DeletePersonDTO(
  649. success: map['Success'],
  650. errMessage: map['ErrMessage'],
  651. );
  652. }
  653. Map<String, dynamic> toJson() {
  654. final map = Map<String, dynamic>();
  655. map['Success'] = success;
  656. if (errMessage != null) {
  657. map['ErrMessage'] = errMessage;
  658. }
  659. return map;
  660. }
  661. }
  662. class UnbindAndCreateByFaceImageRequest extends TokenRequest{
  663. String? oldCardNo;
  664. String? newCardNo;
  665. String? image;
  666. UnbindAndCreateByFaceImageRequest({
  667. this.oldCardNo,
  668. this.newCardNo,
  669. this.image,
  670. String? token,
  671. }) : super(
  672. token: token,
  673. );
  674. factory UnbindAndCreateByFaceImageRequest.fromJson(Map<String, dynamic> map) {
  675. return UnbindAndCreateByFaceImageRequest(
  676. oldCardNo: map['OldCardNo'],
  677. newCardNo: map['NewCardNo'],
  678. image: map['Image'],
  679. token: map['Token'],
  680. );
  681. }
  682. Map<String, dynamic> toJson() {
  683. final map = super.toJson();
  684. if (oldCardNo != null)
  685. map['OldCardNo'] = oldCardNo;
  686. if (newCardNo != null)
  687. map['NewCardNo'] = newCardNo;
  688. if (image != null)
  689. map['Image'] = image;
  690. return map;
  691. }
  692. }
  693. class UnbindByCardNoRequest extends TokenRequest{
  694. String? cardNo;
  695. UnbindByCardNoRequest({
  696. this.cardNo,
  697. String? token,
  698. }) : super(
  699. token: token,
  700. );
  701. factory UnbindByCardNoRequest.fromJson(Map<String, dynamic> map) {
  702. return UnbindByCardNoRequest(
  703. cardNo: map['CardNo'],
  704. token: map['Token'],
  705. );
  706. }
  707. Map<String, dynamic> toJson() {
  708. final map = super.toJson();
  709. if (cardNo != null)
  710. map['CardNo'] = cardNo;
  711. return map;
  712. }
  713. }