71 lines
1.5 KiB
Dart
71 lines
1.5 KiB
Dart
class BillingsHistoryModel {
|
|
List<Billings>? billings;
|
|
|
|
BillingsHistoryModel({this.billings});
|
|
|
|
BillingsHistoryModel.fromJson(Map<String, dynamic> json) {
|
|
if (json['billings'] != null) {
|
|
billings = <Billings>[];
|
|
json['billings'].forEach((v) {
|
|
billings!.add(Billings.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
if (billings != null) {
|
|
data['billings'] = billings!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class PaginationBillings {
|
|
final int page;
|
|
final List<Billings> billings;
|
|
|
|
PaginationBillings({required this.page, required this.billings});
|
|
}
|
|
|
|
class Billings {
|
|
int? id;
|
|
int? credit;
|
|
int? amount;
|
|
String? refId;
|
|
String? type;
|
|
String? status;
|
|
String? createdAt;
|
|
|
|
Billings(
|
|
{this.id,
|
|
this.credit,
|
|
this.amount,
|
|
this.refId,
|
|
this.type,
|
|
this.status,
|
|
this.createdAt});
|
|
|
|
Billings.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
credit = json['credit'];
|
|
amount = json['amount'];
|
|
refId = json['ref_id'];
|
|
type = json['type'];
|
|
status = json['status'];
|
|
createdAt = json['created_at'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['credit'] = credit;
|
|
data['amount'] = amount;
|
|
data['ref_id'] = refId;
|
|
data['type'] = type;
|
|
data['status'] = status;
|
|
data['created_at'] = createdAt;
|
|
return data;
|
|
}
|
|
}
|