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.
74 lines
1.6 KiB
74 lines
1.6 KiB
1 month ago
|
import 'package:huixiang/data/coupon_list.dart';
|
||
|
import 'package:huixiang/data/promotion_info.dart';
|
||
|
import 'package:huixiang/data/set_meal_data.dart';
|
||
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
|
||
|
part 'shopping_cart.g.dart';
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class ShoppingCart {
|
||
|
int? cartSum = 0;
|
||
|
int? selectDiscount = 0;
|
||
|
int? numberOfPeople = 0;
|
||
|
int? selected = 0;
|
||
|
List<SkuItemList>? shoppingCartSkuItemList = [];
|
||
|
int? storeId = 0;
|
||
|
String? storeName = '';
|
||
|
String? tableId = '';
|
||
|
List<PromotionInfo>? promotionInfoList;
|
||
|
List<CouponList>? couponList;
|
||
|
|
||
|
ShoppingCart();
|
||
|
|
||
|
factory ShoppingCart.fromJson(Map<String, dynamic> json) => _$ShoppingCartFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$ShoppingCartToJson(this);
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class SkuItemList {
|
||
|
int? buyNum = 0;
|
||
|
String? createTime = '';
|
||
|
int? groupId = 0;
|
||
|
int? id = 0;
|
||
|
List<PlatterList>? platterList = [];
|
||
|
List<SetMealData>? setMealDataList = [];
|
||
|
String? productId = '';
|
||
|
String? productName = '';
|
||
|
int? selected = 0;
|
||
|
String? skuImg = '';
|
||
|
String? skuName = '';
|
||
|
String? skuPrice = '';
|
||
|
int? skuStock = 0;
|
||
|
int? storeId = 0;
|
||
|
int? tableId = 0;
|
||
|
|
||
|
SkuItemList();
|
||
|
|
||
|
factory SkuItemList.fromJson(Map<String, dynamic> json) => _$SkuItemListFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$SkuItemListToJson(this);
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class PlatterList {
|
||
|
bool? deleted = false;
|
||
|
int? id = 0;
|
||
|
int? productId = 0;
|
||
|
bool? required = false;
|
||
|
int? skuId = 0;
|
||
|
|
||
|
PlatterList();
|
||
|
|
||
|
factory PlatterList.fromJson(Map<String, dynamic> json) => _$PlatterListFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$PlatterListToJson(this);
|
||
|
|
||
|
|
||
|
}
|