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.
79 lines
1.8 KiB
79 lines
1.8 KiB
1 month ago
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
|
||
|
part 'popular_sales.g.dart';
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
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);
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
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);
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
@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<String, dynamic> json) => _$SaleProductListFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> 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<String, dynamic> json) => _$ChangeDataFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$ChangeDataToJson(this);
|
||
|
|
||
|
|
||
|
}
|