save before flutter upgrade
This commit is contained in:
34
lib/models/billing/billing_process.dart
Normal file
34
lib/models/billing/billing_process.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class BillingProcess {
|
||||
BillingProcess({
|
||||
required this.billingProcessId,
|
||||
required this.createdAt,
|
||||
required this.createdBy,
|
||||
required this.status,
|
||||
required this.customersBilled,
|
||||
required this.totalBilled,
|
||||
});
|
||||
|
||||
int billingProcessId;
|
||||
DateTime createdAt;
|
||||
String createdBy;
|
||||
String status;
|
||||
int customersBilled;
|
||||
num totalBilled;
|
||||
|
||||
factory BillingProcess.fromJson(String str) => BillingProcess.fromMap(json.decode(str));
|
||||
|
||||
factory BillingProcess.fromMap(Map<String, dynamic> json) {
|
||||
BillingProcess billingProcess = BillingProcess(
|
||||
billingProcessId: json["billing_process_id"],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
createdBy: json['created_by'],
|
||||
status: json['status'],
|
||||
customersBilled: json['customers_billed'],
|
||||
totalBilled: json['total_billed'],
|
||||
);
|
||||
|
||||
return billingProcess;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user