Files
energymedia_content_manager/lib/models/billing/billing_process.dart
2025-07-15 16:40:14 -07:00

35 lines
894 B
Dart

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;
}
}