|
|
|
|
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
|
|
|
|
|
|
|
|
|
|
/// cartSum : 0
|
|
|
|
|
/// selectDiscount:2
|
|
|
|
|
/// numberOfPeople : 0
|
|
|
|
|
/// selected : 0
|
|
|
|
|
/// shoppingCartSkuItemList : [{"buyNum":0,"createTime":"","groupId":0,"id":0,"platterList":[{"deleted":true,"id":0,"productId":0,"required":true,"skuId":0}],"productId":0,"productName":"","selected":0,"skuImg":"","skuName":"","skuPrice":0,"skuStock":0,"storeId":0,"tableId":0}]
|
|
|
|
|
/// storeId : 0
|
|
|
|
|
/// storeName : ""
|
|
|
|
|
/// tableId : 0
|
|
|
|
|
|
|
|
|
|
class ShoppingCart {
|
|
|
|
|
String cartSum;
|
|
|
|
|
int numberOfPeople;
|
|
|
|
|
int selected;
|
|
|
|
|
List<ShoppingCartSkuItemListBean> shoppingCartSkuItemList;
|
|
|
|
|
String storeId;
|
|
|
|
|
int selectDiscount;
|
|
|
|
|
String storeName;
|
|
|
|
|
String tableId;
|
|
|
|
|
List<PromotionInfoListBeans> promotionInfoList;
|
|
|
|
|
List<CouponListBeans> couponList;
|
|
|
|
|
|
|
|
|
|
static ShoppingCart fromJson(Map<String, dynamic> map) {
|
|
|
|
|
if (map == null) return null;
|
|
|
|
|
ShoppingCart shoppingCartBean = ShoppingCart();
|
|
|
|
|
shoppingCartBean.cartSum = map['cartSum'];
|
|
|
|
|
shoppingCartBean.numberOfPeople = map['numberOfPeople'];
|
|
|
|
|
shoppingCartBean.selected = map['selected'];
|
|
|
|
|
shoppingCartBean.shoppingCartSkuItemList = []..addAll(
|
|
|
|
|
(map['shoppingCartSkuItemList'] as List ?? []).map((o) => ShoppingCartSkuItemListBean.fromJson(o))
|
|
|
|
|
);
|
|
|
|
|
shoppingCartBean.storeId = map['storeId'];
|
|
|
|
|
shoppingCartBean.storeName = map['storeName'];
|
|
|
|
|
shoppingCartBean.selectDiscount = map['selectDiscount'];
|
|
|
|
|
shoppingCartBean.tableId = map['tableId'];
|
|
|
|
|
shoppingCartBean.promotionInfoList = List()..addAll(
|
|
|
|
|
(map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBeans.fromJson(o))
|
|
|
|
|
);
|
|
|
|
|
shoppingCartBean.couponList = List()..addAll(
|
|
|
|
|
(map['couponList'] as List ?? []).map((o) => CouponListBeans.fromJson(o))
|
|
|
|
|
);
|
|
|
|
|
return shoppingCartBean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
|
"cartSum": cartSum,
|
|
|
|
|
"numberOfPeople": numberOfPeople,
|
|
|
|
|
"selected": selected,
|
|
|
|
|
"shoppingCartSkuItemList": shoppingCartSkuItemList == null ? null : shoppingCartSkuItemList.map((e) => e.toJson()).toList(),
|
|
|
|
|
"storeId": storeId,
|
|
|
|
|
"storeName": storeName,
|
|
|
|
|
"selectDiscount" : selectDiscount,
|
|
|
|
|
"tableId": tableId,
|
|
|
|
|
"promotionInfoList": promotionInfoList,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// buyNum : 0
|
|
|
|
|
/// createTime : ""
|
|
|
|
|
/// groupId : 0
|
|
|
|
|
/// id : 0
|
|
|
|
|
/// platterList : [{"deleted":true,"id":0,"productId":0,"required":true,"skuId":0}]
|
|
|
|
|
/// productId : 0
|
|
|
|
|
/// productName : ""
|
|
|
|
|
/// selected : 0
|
|
|
|
|
/// skuImg : ""
|
|
|
|
|
/// skuName : ""
|
|
|
|
|
/// skuPrice : 0
|
|
|
|
|
/// skuStock : 0
|
|
|
|
|
/// storeId : 0
|
|
|
|
|
/// tableId : 0
|
|
|
|
|
|
|
|
|
|
class ShoppingCartSkuItemListBean {
|
|
|
|
|
int buyNum;
|
|
|
|
|
String createTime;
|
|
|
|
|
String groupId;
|
|
|
|
|
String id;
|
|
|
|
|
List<PlatterListBean> platterList;
|
|
|
|
|
List<SetMealDataList> setMealDataList;
|
|
|
|
|
String productId;
|
|
|
|
|
String productName;
|
|
|
|
|
String skuId;
|
|
|
|
|
int selected;
|
|
|
|
|
String skuImg;
|
|
|
|
|
String skuName;
|
|
|
|
|
String skuPrice;
|
|
|
|
|
int skuStock;
|
|
|
|
|
String storeId;
|
|
|
|
|
String tableId;
|
|
|
|
|
int minQty;
|
|
|
|
|
|
|
|
|
|
static ShoppingCartSkuItemListBean fromJson(Map<String, dynamic> map) {
|
|
|
|
|
if (map == null) return null;
|
|
|
|
|
ShoppingCartSkuItemListBean shoppingCartSkuItemListBean = ShoppingCartSkuItemListBean();
|
|
|
|
|
shoppingCartSkuItemListBean.buyNum = map['buyNum'];
|
|
|
|
|
shoppingCartSkuItemListBean.createTime = map['createTime'];
|
|
|
|
|
shoppingCartSkuItemListBean.groupId = map['groupId'];
|
|
|
|
|
shoppingCartSkuItemListBean.id = map['id'];
|
|
|
|
|
shoppingCartSkuItemListBean.platterList = []..addAll(
|
|
|
|
|
(map['platterList'] as List ?? []).map((o) => PlatterListBean.fromJson(o))
|
|
|
|
|
);
|
|
|
|
|
shoppingCartSkuItemListBean.setMealDataList = []..addAll(
|
|
|
|
|
(map['setMealDataList'] as List ?? []).map((o) => SetMealDataList.fromJson(o))
|
|
|
|
|
);
|
|
|
|
|
shoppingCartSkuItemListBean.productId = map['productId'];
|
|
|
|
|
shoppingCartSkuItemListBean.skuId = map['skuId'];
|
|
|
|
|
shoppingCartSkuItemListBean.productName = map['productName'];
|
|
|
|
|
shoppingCartSkuItemListBean.selected = map['selected'];
|
|
|
|
|
shoppingCartSkuItemListBean.skuImg = map['skuImg'];
|
|
|
|
|
shoppingCartSkuItemListBean.skuName = map['skuName'];
|
|
|
|
|
shoppingCartSkuItemListBean.skuPrice = map['skuPrice'];
|
|
|
|
|
shoppingCartSkuItemListBean.skuStock = map['skuStock'];
|
|
|
|
|
shoppingCartSkuItemListBean.storeId = map['storeId'];
|
|
|
|
|
shoppingCartSkuItemListBean.tableId = map['tableId'];
|
|
|
|
|
shoppingCartSkuItemListBean.minQty = map['minQty'];
|
|
|
|
|
return shoppingCartSkuItemListBean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map toJson() => {
|
|
|
|
|
"buyNum": buyNum,
|
|
|
|
|
"createTime": createTime,
|
|
|
|
|
"groupId": groupId,
|
|
|
|
|
"id": id,
|
|
|
|
|
"platterList": platterList,
|
|
|
|
|
"setMealDataList":setMealDataList,
|
|
|
|
|
"productId": productId,
|
|
|
|
|
"skuId": skuId,
|
|
|
|
|
"productName": productName,
|
|
|
|
|
"selected": selected,
|
|
|
|
|
"skuImg": skuImg,
|
|
|
|
|
"skuName": skuName,
|
|
|
|
|
"skuPrice": skuPrice,
|
|
|
|
|
"skuStock": skuStock,
|
|
|
|
|
"storeId": storeId,
|
|
|
|
|
"tableId": tableId,
|
|
|
|
|
"minQty": minQty,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// deleted : true
|
|
|
|
|
/// id : 0
|
|
|
|
|
/// productId : 0
|
|
|
|
|
/// required : true
|
|
|
|
|
/// skuId : 0
|
|
|
|
|
|
|
|
|
|
class PlatterListBean {
|
|
|
|
|
bool deleted;
|
|
|
|
|
int id;
|
|
|
|
|
int productId;
|
|
|
|
|
bool required;
|
|
|
|
|
String skuId;
|
|
|
|
|
|
|
|
|
|
static PlatterListBean fromJson(Map<String, dynamic> map) {
|
|
|
|
|
if (map == null) return null;
|
|
|
|
|
PlatterListBean platterListBean = PlatterListBean();
|
|
|
|
|
platterListBean.deleted = map['deleted'];
|
|
|
|
|
platterListBean.id = map['id'];
|
|
|
|
|
platterListBean.productId = map['productId'];
|
|
|
|
|
platterListBean.required = map['required'];
|
|
|
|
|
platterListBean.skuId = map['skuId'];
|
|
|
|
|
return platterListBean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map toJson() => {
|
|
|
|
|
"deleted": deleted,
|
|
|
|
|
"id": id,
|
|
|
|
|
"productId": productId,
|
|
|
|
|
"required": required,
|
|
|
|
|
"skuId": skuId,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
/// groupName : "锅底2选1"
|
|
|
|
|
/// productInfoList : [{"skuId":"1491652895857180672","skuName":"中辣","buyNumber":1,"productId":"1315903449707053056","sellPrice":48.0,"productName":"牛棒骨汤鸳鸯锅"}]
|
|
|
|
|
|
|
|
|
|
class SetMealDataList {
|
|
|
|
|
SetMealDataList({
|
|
|
|
|
String groupName,
|
|
|
|
|
List<ProductInfoList> productInfoList,}){
|
|
|
|
|
_groupName = groupName;
|
|
|
|
|
_productInfoList = productInfoList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SetMealDataList.fromJson(dynamic json) {
|
|
|
|
|
_groupName = json['groupName'];
|
|
|
|
|
if (json['productInfoList'] != null) {
|
|
|
|
|
_productInfoList = [];
|
|
|
|
|
json['productInfoList'].forEach((v) {
|
|
|
|
|
_productInfoList.add(ProductInfoList.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String _groupName;
|
|
|
|
|
List<ProductInfoList> _productInfoList;
|
|
|
|
|
SetMealDataList copyWith({ String groupName,
|
|
|
|
|
List<ProductInfoList> productInfoList,
|
|
|
|
|
}) => SetMealDataList( groupName: groupName ?? _groupName,
|
|
|
|
|
productInfoList: productInfoList ?? _productInfoList,
|
|
|
|
|
);
|
|
|
|
|
String get groupName => _groupName;
|
|
|
|
|
List<ProductInfoList> get productInfoList => _productInfoList;
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
map['groupName'] = _groupName;
|
|
|
|
|
if (_productInfoList != null) {
|
|
|
|
|
map['productInfoList'] = _productInfoList.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// skuId : "1491652895857180672"
|
|
|
|
|
/// skuName : "中辣"
|
|
|
|
|
/// buyNumber : 1
|
|
|
|
|
/// productId : "1315903449707053056"
|
|
|
|
|
/// sellPrice : 48.0
|
|
|
|
|
/// productName : "牛棒骨汤鸳鸯锅"
|
|
|
|
|
|
|
|
|
|
class ProductInfoList {
|
|
|
|
|
ProductInfoList({
|
|
|
|
|
String skuId,
|
|
|
|
|
String skuName,
|
|
|
|
|
int buyNumber,
|
|
|
|
|
String productId,
|
|
|
|
|
dynamic sellPrice,
|
|
|
|
|
String productName,}){
|
|
|
|
|
_skuId = skuId;
|
|
|
|
|
_skuName = skuName;
|
|
|
|
|
_buyNumber = buyNumber;
|
|
|
|
|
_productId = productId;
|
|
|
|
|
_sellPrice = sellPrice;
|
|
|
|
|
_productName = productName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ProductInfoList.fromJson(dynamic json) {
|
|
|
|
|
_skuId = json['skuId'];
|
|
|
|
|
_skuName = json['skuName'];
|
|
|
|
|
_buyNumber = json['buyNumber'];
|
|
|
|
|
_productId = json['productId'];
|
|
|
|
|
_sellPrice = json['sellPrice'];
|
|
|
|
|
_productName = json['productName'];
|
|
|
|
|
}
|
|
|
|
|
String _skuId;
|
|
|
|
|
String _skuName;
|
|
|
|
|
int _buyNumber;
|
|
|
|
|
String _productId;
|
|
|
|
|
dynamic _sellPrice;
|
|
|
|
|
String _productName;
|
|
|
|
|
ProductInfoList copyWith({ String skuId,
|
|
|
|
|
String skuName,
|
|
|
|
|
int buyNumber,
|
|
|
|
|
String productId,
|
|
|
|
|
dynamic sellPrice,
|
|
|
|
|
String productName,
|
|
|
|
|
}) => ProductInfoList( skuId: skuId ?? _skuId,
|
|
|
|
|
skuName: skuName ?? _skuName,
|
|
|
|
|
buyNumber: buyNumber ?? _buyNumber,
|
|
|
|
|
productId: productId ?? _productId,
|
|
|
|
|
sellPrice: sellPrice ?? _sellPrice,
|
|
|
|
|
productName: productName ?? _productName,
|
|
|
|
|
);
|
|
|
|
|
String get skuId => _skuId;
|
|
|
|
|
String get skuName => _skuName;
|
|
|
|
|
int get buyNumber => _buyNumber;
|
|
|
|
|
String get productId => _productId;
|
|
|
|
|
dynamic get sellPrice => _sellPrice;
|
|
|
|
|
String get productName => _productName;
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
map['skuId'] = _skuId;
|
|
|
|
|
map['skuName'] = _skuName;
|
|
|
|
|
map['buyNumber'] = _buyNumber;
|
|
|
|
|
map['productId'] = _productId;
|
|
|
|
|
map['sellPrice'] = _sellPrice;
|
|
|
|
|
map['productName'] = _productName;
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// id : "1437254523520286720"
|
|
|
|
|
/// createTime : "2021-09-13 11:19:16"
|
|
|
|
|
/// createUser : "1333246101196636160"
|
|
|
|
|
/// updateTime : "2021-09-13 17:30:00"
|
|
|
|
|
/// updateUser : "0"
|
|
|
|
|
/// storeId : "1433719074906439680"
|
|
|
|
|
/// name : "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>"
|
|
|
|
|
/// image : "https://pos.upload.gznl.top/1175/2021/09/44d60dab-0ae3-4d07-b624-50b8ab99d0fc.jpg"
|
|
|
|
|
/// description : "1"
|
|
|
|
|
/// status : 4
|
|
|
|
|
/// applyStartTime : "2021-09-13 11:19:16"
|
|
|
|
|
/// applyEndTime : "2021-09-13 11:19:16"
|
|
|
|
|
/// activityStartTime : "2021-09-01 00:00:00"
|
|
|
|
|
/// activityEndTime : "2021-10-30 00:00:00"
|
|
|
|
|
/// doStartTime : null
|
|
|
|
|
/// doEndTime : null
|
|
|
|
|
/// isNeedSecurityDeposit : 0
|
|
|
|
|
/// securityDeposit : "0"
|
|
|
|
|
/// tag : "11"
|
|
|
|
|
/// promotionType : 1
|
|
|
|
|
/// promotionPlan : 0
|
|
|
|
|
/// promotionDetail : [{"limitTime":"0","discountRate":"0","discountAmount":"0","fullAmount":"0","collageNumber":"0","fullNumber":"1"}]
|
|
|
|
|
/// channels : ["MINI","POS"]
|
|
|
|
|
/// isVip : false
|
|
|
|
|
/// isDelete : 0
|
|
|
|
|
/// tenantCode : "1175"
|
|
|
|
|
/// canPartake : true
|
|
|
|
|
/// isMaxPromotion : true
|
|
|
|
|
/// promotionProuctList : null
|
|
|
|
|
|
|
|
|
|
class PromotionInfoListBeans {
|
|
|
|
|
String id;
|
|
|
|
|
String createTime;
|
|
|
|
|
String createUser;
|
|
|
|
|
String updateTime;
|
|
|
|
|
String updateUser;
|
|
|
|
|
String storeId;
|
|
|
|
|
String name;
|
|
|
|
|
String image;
|
|
|
|
|
String description;
|
|
|
|
|
int status;
|
|
|
|
|
String applyStartTime;
|
|
|
|
|
String applyEndTime;
|
|
|
|
|
String activityStartTime;
|
|
|
|
|
String activityEndTime;
|
|
|
|
|
dynamic doStartTime;
|
|
|
|
|
dynamic doEndTime;
|
|
|
|
|
int isNeedSecurityDeposit;
|
|
|
|
|
String securityDeposit;
|
|
|
|
|
String tag;
|
|
|
|
|
int promotionType;
|
|
|
|
|
int promotionPlan;
|
|
|
|
|
List<PromotionDetailBean> promotionDetail;
|
|
|
|
|
List<String> channels;
|
|
|
|
|
bool isVip;
|
|
|
|
|
int isDelete;
|
|
|
|
|
String tenantCode;
|
|
|
|
|
bool canPartake;
|
|
|
|
|
bool isMaxPromotion;
|
|
|
|
|
dynamic promotionProuctList;
|
|
|
|
|
|
|
|
|
|
static PromotionInfoListBeans fromJson(Map<String, dynamic> map) {
|
|
|
|
|
if (map == null) return null;
|
|
|
|
|
PromotionInfoListBeans promotionInfoListBeans = PromotionInfoListBeans();
|
|
|
|
|
promotionInfoListBeans.id = map['id'];
|
|
|
|
|
promotionInfoListBeans.createTime = map['createTime'];
|
|
|
|
|
promotionInfoListBeans.createUser = map['createUser'];
|
|
|
|
|
promotionInfoListBeans.updateTime = map['updateTime'];
|
|
|
|
|
promotionInfoListBeans.updateUser = map['updateUser'];
|
|
|
|
|
promotionInfoListBeans.storeId = map['storeId'];
|
|
|
|
|
promotionInfoListBeans.name = map['name'];
|
|
|
|
|
promotionInfoListBeans.image = map['image'];
|
|
|
|
|
promotionInfoListBeans.description = map['description'];
|
|
|
|
|
promotionInfoListBeans.status = map['status'];
|
|
|
|
|
promotionInfoListBeans.applyStartTime = map['applyStartTime'];
|
|
|
|
|
promotionInfoListBeans.applyEndTime = map['applyEndTime'];
|
|
|
|
|
promotionInfoListBeans.activityStartTime = map['activityStartTime'];
|
|
|
|
|
promotionInfoListBeans.activityEndTime = map['activityEndTime'];
|
|
|
|
|
promotionInfoListBeans.doStartTime = map['doStartTime'];
|
|
|
|
|
promotionInfoListBeans.doEndTime = map['doEndTime'];
|
|
|
|
|
promotionInfoListBeans.isNeedSecurityDeposit = map['isNeedSecurityDeposit'];
|
|
|
|
|
promotionInfoListBeans.securityDeposit = map['securityDeposit'];
|
|
|
|
|
promotionInfoListBeans.tag = map['tag'];
|
|
|
|
|
promotionInfoListBeans.promotionType = map['promotionType'];
|
|
|
|
|
promotionInfoListBeans.promotionPlan = map['promotionPlan'];
|
|
|
|
|
promotionInfoListBeans.promotionDetail = List()..addAll(
|
|
|
|
|
(map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o))
|
|
|
|
|
);
|
|
|
|
|
promotionInfoListBeans.channels = List()..addAll(
|
|
|
|
|
(map['channels'] as List ?? []).map((o) => o.toString())
|
|
|
|
|
);
|
|
|
|
|
promotionInfoListBeans.isVip = map['isVip'];
|
|
|
|
|
promotionInfoListBeans.isDelete = map['isDelete'];
|
|
|
|
|
promotionInfoListBeans.tenantCode = map['tenantCode'];
|
|
|
|
|
promotionInfoListBeans.canPartake = map['canPartake'];
|
|
|
|
|
promotionInfoListBeans.isMaxPromotion = map['isMaxPromotion'];
|
|
|
|
|
promotionInfoListBeans.promotionProuctList = map['promotionProuctList'];
|
|
|
|
|
return promotionInfoListBeans;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map toJson() => {
|
|
|
|
|
"id": id,
|
|
|
|
|
"createTime": createTime,
|
|
|
|
|
"createUser": createUser,
|
|
|
|
|
"updateTime": updateTime,
|
|
|
|
|
"updateUser": updateUser,
|
|
|
|
|
"storeId": storeId,
|
|
|
|
|
"name": name,
|
|
|
|
|
"image": image,
|
|
|
|
|
"description": description,
|
|
|
|
|
"status": status,
|
|
|
|
|
"applyStartTime": applyStartTime,
|
|
|
|
|
"applyEndTime": applyEndTime,
|
|
|
|
|
"activityStartTime": activityStartTime,
|
|
|
|
|
"activityEndTime": activityEndTime,
|
|
|
|
|
"doStartTime": doStartTime,
|
|
|
|
|
"doEndTime": doEndTime,
|
|
|
|
|
"isNeedSecurityDeposit": isNeedSecurityDeposit,
|
|
|
|
|
"securityDeposit": securityDeposit,
|
|
|
|
|
"tag": tag,
|
|
|
|
|
"promotionType": promotionType,
|
|
|
|
|
"promotionPlan": promotionPlan,
|
|
|
|
|
"promotionDetail": promotionDetail,
|
|
|
|
|
"channels": channels,
|
|
|
|
|
"isVip": isVip,
|
|
|
|
|
"isDelete": isDelete,
|
|
|
|
|
"tenantCode": tenantCode,
|
|
|
|
|
"canPartake": canPartake,
|
|
|
|
|
"isMaxPromotion": isMaxPromotion,
|
|
|
|
|
"promotionProuctList": promotionProuctList,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// id : "1448907890034212864"
|
|
|
|
|
/// storeId : "1333246101343436800"
|
|
|
|
|
/// bizType : 1
|
|
|
|
|
/// fullAmount : "10.00"
|
|
|
|
|
/// discountAmount : "8.00"
|
|
|
|
|
/// fullNumber : 1
|
|
|
|
|
/// discountPercent : 100
|
|
|
|
|
/// bizId : ""
|
|
|
|
|
/// publishStartTime : "2021-10-01"
|
|
|
|
|
/// publishEndTime : "2021-10-29"
|
|
|
|
|
/// useStartTime : "2021-10-02"
|
|
|
|
|
/// useEndTime : "2021-10-31"
|
|
|
|
|
/// promotionId : "0"
|
|
|
|
|
/// mid : "1438443365845696512"
|
|
|
|
|
/// couponId : "1448902034085380096"
|
|
|
|
|
/// receiveTime : "2021-10-15"
|
|
|
|
|
/// useTime : null
|
|
|
|
|
/// status : 1
|
|
|
|
|
/// tenantCode : "1175"
|
|
|
|
|
/// type : 1
|
|
|
|
|
/// promotionName : "<EFBFBD><EFBFBD>10-8"
|
|
|
|
|
/// usable : true
|
|
|
|
|
/// allProduct : true
|
|
|
|
|
/// isMaxCoupon:true
|
|
|
|
|
/// productList : null
|
|
|
|
|
|
|
|
|
|
class CouponListBeans {
|
|
|
|
|
String id;
|
|
|
|
|
String storeId;
|
|
|
|
|
int bizType;
|
|
|
|
|
String fullAmount;
|
|
|
|
|
String discountAmount;
|
|
|
|
|
int fullNumber;
|
|
|
|
|
int discountPercent;
|
|
|
|
|
String bizId;
|
|
|
|
|
String publishStartTime;
|
|
|
|
|
String publishEndTime;
|
|
|
|
|
String useStartTime;
|
|
|
|
|
String useEndTime;
|
|
|
|
|
String promotionId;
|
|
|
|
|
dynamic mid;
|
|
|
|
|
String couponId;
|
|
|
|
|
String receiveTime;
|
|
|
|
|
dynamic useTime;
|
|
|
|
|
int status;
|
|
|
|
|
String tenantCode;
|
|
|
|
|
int type;
|
|
|
|
|
String promotionName;
|
|
|
|
|
bool usable;
|
|
|
|
|
bool allProduct;
|
|
|
|
|
bool isMaxCoupon;
|
|
|
|
|
dynamic productList;
|
|
|
|
|
bool isEx;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static CouponListBeans fromJson(Map<String, dynamic> map) {
|
|
|
|
|
if (map == null) return null;
|
|
|
|
|
CouponListBeans couponListBeans = CouponListBeans();
|
|
|
|
|
couponListBeans.id = map['id'];
|
|
|
|
|
couponListBeans.storeId = map['storeId'];
|
|
|
|
|
couponListBeans.bizType = map['bizType'];
|
|
|
|
|
couponListBeans.fullAmount = map['fullAmount'];
|
|
|
|
|
couponListBeans.discountAmount = map['discountAmount'];
|
|
|
|
|
couponListBeans.fullNumber = map['fullNumber'];
|
|
|
|
|
couponListBeans.discountPercent = map['discountPercent'];
|
|
|
|
|
couponListBeans.bizId = map['bizId'];
|
|
|
|
|
couponListBeans.publishStartTime = map['publishStartTime'];
|
|
|
|
|
couponListBeans.publishEndTime = map['publishEndTime'];
|
|
|
|
|
couponListBeans.useStartTime = map['useStartTime'];
|
|
|
|
|
couponListBeans.useEndTime = map['useEndTime'];
|
|
|
|
|
couponListBeans.promotionId = map['promotionId'];
|
|
|
|
|
couponListBeans.mid = map['mid'];
|
|
|
|
|
couponListBeans.couponId = map['couponId'];
|
|
|
|
|
couponListBeans.receiveTime = map['receiveTime'];
|
|
|
|
|
couponListBeans.useTime = map['useTime'];
|
|
|
|
|
couponListBeans.status = map['status'];
|
|
|
|
|
couponListBeans.tenantCode = map['tenantCode'];
|
|
|
|
|
couponListBeans.type = map['type'];
|
|
|
|
|
couponListBeans.promotionName = map['promotionName'];
|
|
|
|
|
couponListBeans.usable = map['usable'];
|
|
|
|
|
couponListBeans.allProduct = map['allProduct'];
|
|
|
|
|
couponListBeans.isMaxCoupon = map['isMaxCoupon'];
|
|
|
|
|
couponListBeans.productList = map['productList'];
|
|
|
|
|
return couponListBeans;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map toJson() => {
|
|
|
|
|
"id": id,
|
|
|
|
|
"storeId": storeId,
|
|
|
|
|
"bizType": bizType,
|
|
|
|
|
"fullAmount": fullAmount,
|
|
|
|
|
"discountAmount": discountAmount,
|
|
|
|
|
"fullNumber": fullNumber,
|
|
|
|
|
"discountPercent": discountPercent,
|
|
|
|
|
"bizId": bizId,
|
|
|
|
|
"publishStartTime": publishStartTime,
|
|
|
|
|
"publishEndTime": publishEndTime,
|
|
|
|
|
"useStartTime": useStartTime,
|
|
|
|
|
"useEndTime": useEndTime,
|
|
|
|
|
"promotionId": promotionId,
|
|
|
|
|
"mid": mid,
|
|
|
|
|
"couponId": couponId,
|
|
|
|
|
"receiveTime": receiveTime,
|
|
|
|
|
"useTime": useTime,
|
|
|
|
|
"status": status,
|
|
|
|
|
"tenantCode": tenantCode,
|
|
|
|
|
"type": type,
|
|
|
|
|
"promotionName": promotionName,
|
|
|
|
|
"usable": usable,
|
|
|
|
|
"allProduct": allProduct,
|
|
|
|
|
"isMaxCoupon": isMaxCoupon,
|
|
|
|
|
"productList": productList,
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
}
|