You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
Dart
43 lines
1.2 KiB
Dart
import 'PointsAmountPerday.dart';
|
|
|
|
class PointsAmountPerMonth {
|
|
double amountPerMonth;
|
|
String month;
|
|
int monthNumber;
|
|
List<PointsAmountPerday> pointsAmountPerday;
|
|
double pointsPerMonth;
|
|
|
|
PointsAmountPerMonth(
|
|
{this.amountPerMonth,
|
|
this.month,
|
|
this.monthNumber,
|
|
this.pointsAmountPerday,
|
|
this.pointsPerMonth});
|
|
|
|
PointsAmountPerMonth.fromJson(Map<String, dynamic> json) {
|
|
amountPerMonth = json['AmountPerMonth'];
|
|
month = json['Month'];
|
|
monthNumber = json['MonthNumber'];
|
|
if (json['PointsAmountPerday'] != null) {
|
|
pointsAmountPerday = new List<PointsAmountPerday>();
|
|
json['PointsAmountPerday'].forEach((v) {
|
|
pointsAmountPerday.add(new PointsAmountPerday.fromJson(v));
|
|
});
|
|
}
|
|
pointsPerMonth = json['PointsPerMonth'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['AmountPerMonth'] = this.amountPerMonth;
|
|
data['Month'] = this.month;
|
|
data['MonthNumber'] = this.monthNumber;
|
|
if (this.pointsAmountPerday != null) {
|
|
data['PointsAmountPerday'] =
|
|
this.pointsAmountPerday.map((v) => v.toJson()).toList();
|
|
}
|
|
data['PointsPerMonth'] = this.pointsPerMonth;
|
|
return data;
|
|
}
|
|
}
|