free_meal_config_model.dart
2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import 'package:one_key/models/recharge_list_model.dart';
import 'dart:convert' as convert;
class FreeMealConfigModel {
int? ret;
List<FreeMealConfigSunModel>? data;
String? msg;
FreeMealConfigModel({this.ret, this.data, this.msg});
FreeMealConfigModel.fromJson(Map<dynamic, dynamic> json) {
ret = json['ret'];
if (json['data'] != null) {
data = <FreeMealConfigSunModel>[];
json['data'].forEach((v) {
data!.add(new FreeMealConfigSunModel.fromJson(v));
});
}
msg = json['msg'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
}
}
class FreeMealConfigSunModel {
String? id;
String? sellerid;
String? uid;
String? type;
String? multiple;
RechargeListDataModel? rechargeList;
String? explain;
String? isOpen;
FreeMealConfigSunModel(
{this.id,
this.sellerid,
this.uid,
this.type,
this.multiple,
this.rechargeList,
this.explain,
this.isOpen});
FreeMealConfigSunModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
sellerid = json['sellerid'];
uid = json['uid'];
type = json['type'];
multiple = json['multiple'];
rechargeList = json['recharge_list'] == null
? null
: json['recharge_list'] is Map
? RechargeListDataModel.fromJson(json['recharge_list'])
: RechargeListDataModel.fromJson(convert
.jsonDecode(json['recharge_list']) as Map<String, dynamic>);
explain = json['explain'];
isOpen = json['is_open'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['sellerid'] = this.sellerid;
data['uid'] = this.uid;
data['type'] = this.type;
data['multiple'] = this.multiple;
data['recharge_list'] = this.rechargeList;
data['explain'] = this.explain;
data['is_open'] = this.isOpen;
return data;
}
}