user_list.dart 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. class UserListEntity {
  2. String? msg;
  3. int? code;
  4. List<Data>? data;
  5. UserListEntity({this.msg, this.code, this.data});
  6. UserListEntity.fromJson(Map<String, dynamic> json) {
  7. msg = json['msg'];
  8. code = json['code'];
  9. if (json['data'] != null) {
  10. data = <Data>[];
  11. json['data'].forEach((v) {
  12. data!.add(new Data.fromJson(v));
  13. });
  14. }
  15. }
  16. Map<String, dynamic> toJson() {
  17. final Map<String, dynamic> data = new Map<String, dynamic>();
  18. data['msg'] = this.msg;
  19. data['code'] = this.code;
  20. if (this.data != null) {
  21. data['data'] = this.data!.map((v) => v.toJson()).toList();
  22. }
  23. return data;
  24. }
  25. }
  26. class Data {
  27. String? patientId;
  28. String? userRelationship;
  29. String? patientName;
  30. String? identificationCard;
  31. int? documentType;
  32. String? allergyHistory;
  33. String? pastHistory;
  34. String? familyHistory;
  35. String? patientPhone;
  36. String? homeAddress;
  37. int? isDefault;
  38. Data(
  39. {this.patientId,
  40. this.userRelationship,
  41. this.patientName,
  42. this.identificationCard,
  43. this.documentType,
  44. this.allergyHistory,
  45. this.pastHistory,
  46. this.familyHistory,
  47. this.patientPhone,
  48. this.homeAddress,
  49. this.isDefault});
  50. Data.fromJson(Map<String, dynamic> json) {
  51. patientId = json['patientId'];
  52. userRelationship = json['userRelationship'];
  53. patientName = json['patientName'];
  54. identificationCard = json['identificationCard'];
  55. documentType = json['documentType'];
  56. allergyHistory = json['allergyHistory'];
  57. pastHistory = json['pastHistory'];
  58. familyHistory = json['familyHistory'];
  59. patientPhone = json['patientPhone'];
  60. homeAddress = json['homeAddress'];
  61. isDefault = json['isDefault'];
  62. }
  63. Map<String, dynamic> toJson() {
  64. final Map<String, dynamic> data = new Map<String, dynamic>();
  65. data['patientId'] = this.patientId;
  66. data['userRelationship'] = this.userRelationship;
  67. data['patientName'] = this.patientName;
  68. data['identificationCard'] = this.identificationCard;
  69. data['documentType'] = this.documentType;
  70. data['allergyHistory'] = this.allergyHistory;
  71. data['pastHistory'] = this.pastHistory;
  72. data['familyHistory'] = this.familyHistory;
  73. data['patientPhone'] = this.patientPhone;
  74. data['homeAddress'] = this.homeAddress;
  75. data['isDefault'] = this.isDefault;
  76. return data;
  77. }
  78. }