import 'package:json_annotation/json_annotation.dart'; part 'popular_sales.g.dart'; @JsonSerializable(explicitToJson: true) class PopularSales { List? dashMemberList = []; List? saleProductList = []; String? avgPrice = ''; int? orderNum = 0; List? storeDailyStatistics = []; String? orderSum = ''; ChangeData? changeData; String? paySum = ''; PopularSales(); factory PopularSales.fromJson(Map json) => _$PopularSalesFromJson(json); Map toJson() => _$PopularSalesToJson(this); } @JsonSerializable(explicitToJson: true) class DashMemberList { String? id = ''; String? name = ''; String? phone = ''; String? balance = ''; DashMemberList(); factory DashMemberList.fromJson(Map json) => _$DashMemberListFromJson(json); Map toJson() => _$DashMemberListToJson(this); } @JsonSerializable(explicitToJson: true) class SaleProductList { @JsonKey(name: "product_id") String? productId = ''; int? saleNum = 0; @JsonKey(name: "product_name") String? productName = ''; SaleProductList(); factory SaleProductList.fromJson(Map json) => _$SaleProductListFromJson(json); Map toJson() => _$SaleProductListToJson(this); } @JsonSerializable(explicitToJson: true) class ChangeData { double? addCartChangeRate; double? payCountChangeRate; String? sumAddCartCount = ''; String? sumSettleCount = ''; String? sumPaySuccessCount = ''; String? sumPV = ''; double? totalChangeRate; String? sumPayCount = ''; double? settleChangeRate; double? paySuccessChangeRate; ChangeData(); factory ChangeData.fromJson(Map json) => _$ChangeDataFromJson(json); Map toJson() => _$ChangeDataToJson(this); }