You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.0 KiB
91 lines
2.0 KiB
10 months ago
|
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>? dashMemberList = [];
|
||
|
List<SaleProductList>? saleProductList = [];
|
||
|
String? avgPrice = '';
|
||
|
int? orderNum = 0;
|
||
|
List<dynamic>? storeDailyStatistics = [];
|
||
|
String? orderSum = '';
|
||
|
ChangeData? changeData;
|
||
|
String? paySum = '';
|
||
|
|
||
|
PopularSales();
|
||
|
|
||
|
factory PopularSales.fromJson(Map<String, dynamic> json) => $PopularSalesFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> 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<String, dynamic> json) => $DashMemberListFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> 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<String, dynamic> json) => $SaleProductListFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> 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<String, dynamic> json) => $ChangeDataFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => $ChangeDataToJson(this);
|
||
|
|
||
|
@override
|
||
|
String toString() {
|
||
|
return jsonEncode(this);
|
||
|
}
|
||
|
}
|