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.
diplomatic-quarter/lib/core/model/pharmacies/PointsAmountPerday.dart

42 lines
1.2 KiB
Dart

import 'PointsDetails.dart';
class PointsAmountPerday {
double amountPerDay;
String day;
List<PointsDetails> pointsDetails;
double pointsPerDay;
String transationDate;
PointsAmountPerday(
{this.amountPerDay,
this.day,
this.pointsDetails,
this.pointsPerDay,
this.transationDate});
PointsAmountPerday.fromJson(Map<String, dynamic> json) {
amountPerDay = json['AmountPerDay'];
day = json['Day'];
if (json['PointsDetails'] != null) {
pointsDetails = new List<PointsDetails>();
json['PointsDetails'].forEach((v) {
pointsDetails.add(new PointsDetails.fromJson(v));
});
}
pointsPerDay = json['PointsPerDay'];
transationDate = json['TransationDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AmountPerDay'] = this.amountPerDay;
data['Day'] = this.day;
if (this.pointsDetails != null) {
data['PointsDetails'] =
this.pointsDetails.map((v) => v.toJson()).toList();
}
data['PointsPerDay'] = this.pointsPerDay;
data['TransationDate'] = this.transationDate;
return data;
}
}