20 lines
507 B
Dart
20 lines
507 B
Dart
|
|
|
|
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(),
|
|
);
|
|
}
|
|
}
|