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.
app/lib/pages/user/model/user_income_model1.dart

89 lines
2.0 KiB

4 years ago
class UserIncomeModel1 {
4 years ago
num amount;
num all;
List<Detial> detial;
4 years ago
4 years ago
UserIncomeModel1({this.amount, this.all, this.detial});
4 years ago
UserIncomeModel1.fromJson(Map<String, dynamic> json) {
amount = json['amount'];
all = json['all'];
4 years ago
if (json['detial'] != null) {
detial = new List<Detial>();
json['detial'].forEach((v) {
detial.add(new Detial.fromJson(v));
});
}
4 years ago
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['amount'] = this.amount;
data['all'] = this.all;
4 years ago
if (this.detial != null) {
data['detial'] = this.detial.map((v) => v.toJson()).toList();
4 years ago
}
return data;
}
}
4 years ago
class Detial {
4 years ago
int date;
num sale;
int count;
num coin;
4 years ago
List<Detail> detail;
4 years ago
4 years ago
Detial({this.date, this.sale, this.count, this.coin, this.detail});
4 years ago
4 years ago
Detial.fromJson(Map<String, dynamic> json) {
4 years ago
date = json['date'];
sale = json['sale'];
count = json['count'];
coin = json['coin'];
4 years ago
if (json['detail'] != null) {
detail = new List<Detail>();
json['detail'].forEach((v) {
detail.add(new Detail.fromJson(v));
});
}
4 years ago
}
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) {
4 years ago
data['detail'] = this.detail.map((v) => v.toJson()).toList();
4 years ago
}
return data;
}
}
class Detail {
int date;
num sale;
int count;
num coin;
Detail({this.date, this.sale, this.count, this.coin});
Detail.fromJson(Map<String, dynamic> json) {
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>();
data['date'] = this.date;
data['sale'] = this.sale;
data['count'] = this.count;
data['coin'] = this.coin;
return data;
}
}