import '../../modules/tenant/get_tenant.dart'; class CustomerTenantResponse { final Customer customer; final List tenants; CustomerTenantResponse({required this.customer, required this.tenants}); factory CustomerTenantResponse.fromJson(Map json) { return CustomerTenantResponse( customer: Customer.fromJson(json['data']['customer']), tenants: (json['data']['tenants'] as List) .map((e) => Tenant.fromJson(e)) .toList(), ); } }