You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
2.8 KiB

4 years ago
class UserIncomeModel {
4 years ago
num amount;
num all;
num team;
num recommend;
num reward;
4 years ago
List<Detail> detail;
4 years ago
UserIncomeModel(
{this.amount,
this.all,
this.detail,
this.team,
this.recommend,
this.reward});
4 years ago
UserIncomeModel.zero() {
this.amount = 0;
this.all = 0;
4 years ago
this.team = 0;
this.recommend = 0;
this.reward = 0;
4 years ago
this.detail = [];
}
UserIncomeModel.fromJson(Map<String, dynamic> json) {
amount = json['amount'];
all = json['all'];
4 years ago
team = json['team'];
recommend = json['recommend'];
reward = json['reward'];
4 years ago
if (json['detail'] != null) {
detail = [];
json['detail'].forEach((v) {
detail.add(new Detail.fromJson(v));
});
} else {
detail = [];
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['amount'] = this.amount;
data['all'] = this.all;
4 years ago
data['team'] = this.team;
data['recommend'] = this.recommend;
data['reward'] = this.reward;
4 years ago
if (this.detail != null) {
data['detail'] = this.detail.map((v) => v.toJson()).toList();
}
return data;
}
}
class Detail {
num date;
num sale;
num count;
num coin;
List<Detail1> detail;
Detail({this.date, this.sale, this.count, this.coin, this.detail});
Detail.zero({this.date = 0, this.sale = 0, this.count = 0, this.coin = 0});
Detail.fromJson(Map<String, dynamic> json) {
date = json['date'];
sale = json['sale'];
count = json['count'];
coin = json['coin'];
if (json['detail'] != null) {
detail = [];
json['detail'].forEach((v) {
detail.add(new Detail1.fromJson(v));
});
} else {
detail = [];
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['date'] = this.date;
data['sale'] = this.sale;
data['count'] = this.count;
data['coin'] = this.coin;
if (this.detail != null) {
data['detail'] = this.detail.map((v) => v.toJson()).toList();
}
return data;
}
}
class Detail1 {
4 years ago
num id;
4 years ago
num date;
num sale;
num count;
num coin;
4 years ago
Detail1({this.id, this.date, this.sale, this.count, this.coin});
4 years ago
4 years ago
Detail1.zero(
{this.id = 0,
this.date = 0,
this.sale = 0,
this.count = 0,
this.coin = 0});
4 years ago
Detail1.fromJson(Map<String, dynamic> json) {
4 years ago
id = json['id'];
4 years ago
date = json['date'];
sale = json['sale'];
count = json['count'];
coin = json['coin'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
4 years ago
data['id'] = this.id;
4 years ago
data['date'] = this.date;
data['sale'] = this.sale;
data['count'] = this.count;
data['coin'] = this.coin;
return data;
}
}