department.dart 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. class Department {
  2. String? msg;
  3. int? code;
  4. List<Data>? data;
  5. Department({this.msg, this.code, this.data});
  6. Department.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? createBy;
  28. String? createTime;
  29. Null? updateBy;
  30. Null? updateTime;
  31. Null? remark;
  32. int? deptId;
  33. int? parentId;
  34. String? ancestors;
  35. String? deptName;
  36. int? orderNum;
  37. String? leader;
  38. String? phone;
  39. String? email;
  40. String? status;
  41. String? delFlag;
  42. Null? parentName;
  43. Data(
  44. {this.createBy,
  45. this.createTime,
  46. this.updateBy,
  47. this.updateTime,
  48. this.remark,
  49. this.deptId,
  50. this.parentId,
  51. this.ancestors,
  52. this.deptName,
  53. this.orderNum,
  54. this.leader,
  55. this.phone,
  56. this.email,
  57. this.status,
  58. this.delFlag,
  59. this.parentName});
  60. Data.fromJson(Map<String, dynamic> json) {
  61. createBy = json['createBy'];
  62. createTime = json['createTime'];
  63. updateBy = json['updateBy'];
  64. updateTime = json['updateTime'];
  65. remark = json['remark'];
  66. deptId = json['deptId'];
  67. parentId = json['parentId'];
  68. ancestors = json['ancestors'];
  69. deptName = json['deptName'];
  70. orderNum = json['orderNum'];
  71. leader = json['leader'];
  72. phone = json['phone'];
  73. email = json['email'];
  74. status = json['status'];
  75. delFlag = json['delFlag'];
  76. parentName = json['parentName'];
  77. }
  78. Map<String, dynamic> toJson() {
  79. final Map<String, dynamic> data = new Map<String, dynamic>();
  80. data['createBy'] = this.createBy;
  81. data['createTime'] = this.createTime;
  82. data['updateBy'] = this.updateBy;
  83. data['updateTime'] = this.updateTime;
  84. data['remark'] = this.remark;
  85. data['deptId'] = this.deptId;
  86. data['parentId'] = this.parentId;
  87. data['ancestors'] = this.ancestors;
  88. data['deptName'] = this.deptName;
  89. data['orderNum'] = this.orderNum;
  90. data['leader'] = this.leader;
  91. data['phone'] = this.phone;
  92. data['email'] = this.email;
  93. data['status'] = this.status;
  94. data['delFlag'] = this.delFlag;
  95. data['parentName'] = this.parentName;
  96. return data;
  97. }
  98. }