first commit
This commit is contained in:
19
lib/data/tenant/get_tenant_res.dart
Normal file
19
lib/data/tenant/get_tenant_res.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
import '../../modules/tenant/get_tenant.dart';
|
||||
|
||||
class CustomerTenantResponse {
|
||||
final Customer customer;
|
||||
final List<Tenant> tenants;
|
||||
|
||||
CustomerTenantResponse({required this.customer, required this.tenants});
|
||||
|
||||
factory CustomerTenantResponse.fromJson(Map<String, dynamic> json) {
|
||||
return CustomerTenantResponse(
|
||||
customer: Customer.fromJson(json['data']['customer']),
|
||||
tenants: (json['data']['tenants'] as List)
|
||||
.map((e) => Tenant.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user