sai_you_yun_birthday_temp.dart
3.88 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
class SaiYouYunBirthdayModel {
final int? ret;
final List<SaiYouYunBirthdaySunModel>? data;
final String? msg;
const SaiYouYunBirthdayModel({this.ret, this.data, this.msg});
SaiYouYunBirthdayModel copyWith(
{int? ret, List<SaiYouYunBirthdaySunModel>? data, String? msg}) {
return SaiYouYunBirthdayModel(
ret: ret ?? this.ret, data: data ?? this.data, msg: msg ?? this.msg);
}
Map<String, Object?> toJson() {
return {
'ret': ret,
'data': data?.map<Map<String, dynamic>>((data) => data.toJson()).toList(),
'msg': msg
};
}
static SaiYouYunBirthdayModel fromJson(Map<dynamic, dynamic> json) {
return SaiYouYunBirthdayModel(
ret: json['ret'] == null ? null : json['ret'] as int?,
data: json['data'] == null
? null
: (json['data'] as List)
.map<SaiYouYunBirthdaySunModel>((data) =>
SaiYouYunBirthdaySunModel.fromJson(
data))
.toList(),
msg: json['msg'] == null ? null : json['msg'] as String?);
}
@override
String toString() {
return '''SaiYouYunBirthdayModel(
ret:$ret,
data:${data.toString()},
msg:$msg
) ''';
}
@override
bool operator ==(Object other) {
return other is SaiYouYunBirthdayModel &&
other.runtimeType == runtimeType &&
other.ret == ret &&
other.data == data &&
other.msg == msg;
}
@override
int get hashCode {
return Object.hash(runtimeType, ret, data, msg);
}
}
class SaiYouYunBirthdaySunModel {
final String? id;
final String? templateCode;
final String? templateParam;
final dynamic templateDemo;
final String? type;
final dynamic bestwish;
const SaiYouYunBirthdaySunModel({
this.id,
this.templateCode,
this.templateParam,
this.templateDemo,
this.type,
this.bestwish,
});
SaiYouYunBirthdaySunModel copyWith({
String? id,
String? templateCode,
String? templateParam,
dynamic templateDemo,
String? type,
dynamic bestwish,
}) {
return SaiYouYunBirthdaySunModel(
id: id ?? this.id,
templateCode: templateCode ?? this.templateCode,
templateParam: templateParam ?? this.templateParam,
templateDemo: templateDemo ?? this.templateDemo,
type: type ?? this.type,
bestwish: bestwish ?? this.bestwish,
);
}
Map<String, Object?> toJson() {
return {
'id': id,
'template_code': templateCode,
'template_param': templateParam,
'template_demo': templateDemo,
'type': type,
'bestwish': bestwish
};
}
static SaiYouYunBirthdaySunModel fromJson(Map<dynamic, dynamic> json) {
return SaiYouYunBirthdaySunModel(
id: json['id'] == null ? null : json['id'] as String?,
templateCode: json['template_code'] == null
? null
: json['template_code'] as String?,
templateParam: json['template_param'] == null
? null
: json['template_param'] as String?,
templateDemo: json['template_demo'] as dynamic,
type: json['type'] == null ? null : json['type'] as String?,
bestwish: json['bestwish'] as dynamic);
}
@override
String toString() {
return '''Data(
id:$id,
templateCode:$templateCode,
templateParam:$templateParam,
templateDemo:$templateDemo,
type:$type,
bestwish:$bestwish
) ''';
}
@override
bool operator ==(Object other) {
return other is SaiYouYunBirthdaySunModel &&
other.runtimeType == runtimeType &&
other.id == id &&
other.templateCode == templateCode &&
other.templateParam == templateParam &&
other.templateDemo == templateDemo &&
other.type == type &&
other.bestwish == bestwish;
}
@override
int get hashCode {
return Object.hash(runtimeType, id, templateCode, templateParam,
templateDemo, type, bestwish);
}
}