import 'package:huixiang/generated/json/base/json_field.dart'; import 'package:huixiang/generated/json/popular_sales.g.dart'; import 'dart:convert'; export 'package:huixiang/generated/json/popular_sales.g.dart'; @JsonSerializable() 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); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class DashMemberList { String? id = ''; String? name = ''; String? phone = ''; String? balance = ''; DashMemberList(); factory DashMemberList.fromJson(Map json) => $DashMemberListFromJson(json); Map toJson() => $DashMemberListToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class SaleProductList { @JSONField(name: "product_id") String? productId = ''; int? saleNum = 0; @JSONField(name: "product_name") String? productName = ''; SaleProductList(); factory SaleProductList.fromJson(Map json) => $SaleProductListFromJson(json); Map toJson() => $SaleProductListToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() 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); @override String toString() { return jsonEncode(this); } }