12345678910111213141516171819202122 |
- class BaseModel {
- int id = 0;
- }
- class BaseEntity {
- int code = 0;
- String msg = "";
- BaseModel? data;
- BaseEntity({required this.code, required this.msg, this.data});
- BaseEntity.fromJson(Map<String, dynamic> json) {
- code = json['code'];
- msg = json['msg'];
- data = json['data'];
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = <String, dynamic>{};
- data['code'] = code;
- data['msg'] = msg;
- data['data'] = this.data;
- return data;
- }
- }
|