import 'package:json_annotation/json_annotation.dart'; part 'tenant_package.g.dart'; @JsonSerializable(explicitToJson: true) class TenantPackage { String? id = ''; String? createTime = ''; String? createUser = ''; String? updateTime = ''; String? updateUser = ''; String? name = ''; int? status = 0; String? remark = ''; dynamic packagePrice; dynamic packageDiscount; dynamic duration; bool? enableSale = false; int? sort = 0; bool? isDefault = false; int? isDelete = 0; List? tenantPackageSale = []; TenantPackage(); factory TenantPackage.fromJson(Map json) => _$TenantPackageFromJson(json); Map toJson() => _$TenantPackageToJson(this); } @JsonSerializable(explicitToJson: true) class TenantPackageSale { String? packagePrice = ''; String? originalPackagePrice = ''; int? duration = 0; int? packageDiscount = 0; bool? isRecommend = false; String? saleName = ''; bool? canDiscount = false; TenantPackageSale(); factory TenantPackageSale.fromJson(Map json) => _$TenantPackageSaleFromJson(json); Map toJson() => _$TenantPackageSaleToJson(this); }