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.
82 lines
1.9 KiB
82 lines
1.9 KiB
import 'package:huixiang/data/coupon_list.dart'; |
|
import 'package:huixiang/data/promotion_info.dart'; |
|
import 'package:huixiang/data/set_meal_data.dart'; |
|
import 'package:huixiang/generated/json/base/json_field.dart'; |
|
import 'package:huixiang/generated/json/shopping_cart.g.dart'; |
|
import 'dart:convert'; |
|
export 'package:huixiang/generated/json/shopping_cart.g.dart'; |
|
|
|
@JsonSerializable() |
|
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); |
|
|
|
@override |
|
String toString() { |
|
return jsonEncode(this); |
|
} |
|
} |
|
|
|
@JsonSerializable() |
|
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); |
|
|
|
@override |
|
String toString() { |
|
return jsonEncode(this); |
|
} |
|
} |
|
|
|
@JsonSerializable() |
|
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); |
|
|
|
@override |
|
String toString() { |
|
return jsonEncode(this); |
|
} |
|
} |