dropdown_list.dart 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. class DropdownList {
  2. String? msg;
  3. int? code;
  4. List<Data>? data;
  5. DropdownList({this.msg, this.code, this.data});
  6. DropdownList.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? id;
  28. int? isDel;
  29. String? createDate;
  30. String? createUser;
  31. String? updateDate;
  32. String? updateUser;
  33. String? tenantId;
  34. int? dictSort;
  35. String? dictName;
  36. String? dictValue;
  37. String? dictType;
  38. int? dictStatus;
  39. Data(
  40. {this.id,
  41. this.isDel,
  42. this.createDate,
  43. this.createUser,
  44. this.updateDate,
  45. this.updateUser,
  46. this.tenantId,
  47. this.dictSort,
  48. this.dictName,
  49. this.dictValue,
  50. this.dictType,
  51. this.dictStatus});
  52. Data.fromJson(Map<String, dynamic> json) {
  53. id = json['id'];
  54. isDel = json['isDel'];
  55. createDate = json['createDate'];
  56. createUser = json['createUser'];
  57. updateDate = json['updateDate'];
  58. updateUser = json['updateUser'];
  59. tenantId = json['tenantId'];
  60. dictSort = json['dictSort'];
  61. dictName = json['dictName'];
  62. dictValue = json['dictValue'];
  63. dictType = json['dictType'];
  64. dictStatus = json['dictStatus'];
  65. }
  66. Map<String, dynamic> toJson() {
  67. final Map<String, dynamic> data = new Map<String, dynamic>();
  68. data['id'] = this.id;
  69. data['isDel'] = this.isDel;
  70. data['createDate'] = this.createDate;
  71. data['createUser'] = this.createUser;
  72. data['updateDate'] = this.updateDate;
  73. data['updateUser'] = this.updateUser;
  74. data['tenantId'] = this.tenantId;
  75. data['dictSort'] = this.dictSort;
  76. data['dictName'] = this.dictName;
  77. data['dictValue'] = this.dictValue;
  78. data['dictType'] = this.dictType;
  79. data['dictStatus'] = this.dictStatus;
  80. return data;
  81. }
  82. }