favourite_doctor_list.dart 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. class FavouriteDoctorListEntity {
  2. String? msg;
  3. int? code;
  4. List<Data>? data;
  5. FavouriteDoctorListEntity({this.msg, this.code, this.data});
  6. FavouriteDoctorListEntity.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? doctorId;
  28. String? avatar;
  29. String? doctorName;
  30. String? postName;
  31. String? label;
  32. String? briefIntroduction;
  33. Data(
  34. {this.doctorId,
  35. this.avatar,
  36. this.doctorName,
  37. this.postName,
  38. this.label,
  39. this.briefIntroduction});
  40. Data.fromJson(Map<String, dynamic> json) {
  41. doctorId = json['doctorId'];
  42. avatar = json['avatar'];
  43. doctorName = json['doctorName'];
  44. postName = json['postName'];
  45. label = json['label'];
  46. briefIntroduction = json['briefIntroduction'];
  47. }
  48. Map<String, dynamic> toJson() {
  49. final Map<String, dynamic> data = new Map<String, dynamic>();
  50. data['doctorId'] = this.doctorId;
  51. data['avatar'] = this.avatar;
  52. data['doctorName'] = this.doctorName;
  53. data['postName'] = this.postName;
  54. data['label'] = this.label;
  55. data['briefIntroduction'] = this.briefIntroduction;
  56. return data;
  57. }
  58. }