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.
136 lines
4.5 KiB
136 lines
4.5 KiB
import 'package:huixiang/retrofit/data/down_order.dart'; |
|
import 'package:huixiang/retrofit/data/order_product_vo.dart'; |
|
import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; |
|
import 'package:huixiang/retrofit/data/shoppingCart.dart'; |
|
|
|
class PlaceOrderFirst { |
|
int cartNum; |
|
dynamic cartSum; |
|
dynamic addressId; |
|
bool isSubscribe; |
|
int isTakeOut; |
|
dynamic notes; |
|
dynamic id; |
|
dynamic numberOfPeople; |
|
int orderSource; |
|
dynamic orderType; |
|
int orderTypeId; |
|
dynamic parentCode; |
|
dynamic parentId; |
|
int payChannel; |
|
PromotionInfoDTOBean promotionInfoDTO; |
|
String recMobile; |
|
List<OrderProductVOList> orderProductVOList; |
|
List<OrderProductVOList> shoppingCartSkuItemList; |
|
List<dynamic> skuItemDTOList; |
|
int source; |
|
String storeId; |
|
String subcribeTime; |
|
String tableId; |
|
|
|
PlaceOrderFirst( |
|
{ |
|
this.cartNum, |
|
this.cartSum, |
|
this.addressId, |
|
this.isSubscribe, |
|
this.isTakeOut, |
|
this.notes, |
|
this.id, |
|
this.numberOfPeople, |
|
this.orderSource, |
|
this.orderType, |
|
this.orderTypeId, |
|
this.parentCode, |
|
this.parentId, |
|
this.payChannel, |
|
this.promotionInfoDTO, |
|
this.recMobile, |
|
this.orderProductVOList, |
|
this.shoppingCartSkuItemList, |
|
this.skuItemDTOList, |
|
this.source, |
|
this.storeId, |
|
this.subcribeTime, |
|
this.tableId}); |
|
|
|
static PlaceOrderFirst fromJson(Map<String, dynamic> json) { |
|
if (json == null) return null; |
|
PlaceOrderFirst placeOrderFirst = PlaceOrderFirst(); |
|
placeOrderFirst.cartNum = json['cartNum']; |
|
placeOrderFirst.cartSum = json['cartSum']; |
|
placeOrderFirst.addressId = json['addressId']; |
|
placeOrderFirst.isSubscribe = json['isSubscribe']; |
|
placeOrderFirst.isTakeOut = json['isTakeOut']; |
|
placeOrderFirst.notes = json['notes']; |
|
placeOrderFirst.id = json['id']; |
|
placeOrderFirst.numberOfPeople = json['numberOfPeople']; |
|
placeOrderFirst.orderSource = json['orderSource']; |
|
placeOrderFirst.orderType = json['orderType']; |
|
placeOrderFirst.orderTypeId = json['orderTypeId']; |
|
placeOrderFirst.parentCode = json['parentCode']; |
|
placeOrderFirst.parentId = json['parentId']; |
|
placeOrderFirst.payChannel = json['payChannel']; |
|
placeOrderFirst.promotionInfoDTO = |
|
PromotionInfoDTOBean.fromJson(json['promotionInfoDTO']); |
|
placeOrderFirst.recMobile = json['recMobile']; |
|
placeOrderFirst.shoppingCartSkuItemList = []..addAll( |
|
(json['shoppingCartSkuItemList'] as List ?? []) |
|
.map((o) => OrderProductVOList.fromJson(o))); |
|
placeOrderFirst.orderProductVOList = []..addAll( |
|
(json['orderProductVOList'] as List ?? []) |
|
.map((o) => OrderProductVOList.fromJson(o))); |
|
placeOrderFirst.skuItemDTOList = json['skuItemDTOList']; |
|
placeOrderFirst.source = json['source']; |
|
placeOrderFirst.storeId = json['storeId']; |
|
placeOrderFirst.subcribeTime = json['subcribeTime']; |
|
placeOrderFirst.tableId = json['tableId']; |
|
return placeOrderFirst; |
|
} |
|
|
|
Map<String, dynamic> toJson() => { |
|
"cartNum": cartNum, |
|
"cartSum": cartSum, |
|
"addressId": addressId, |
|
"isSubscribe": isSubscribe, |
|
"isTakeOut": isTakeOut, |
|
"notes": notes, |
|
"id": id, |
|
"numberOfPeople": numberOfPeople, |
|
"orderSource": orderSource, |
|
"orderType": orderType, |
|
"orderTypeId": orderTypeId, |
|
"parentCode": parentCode, |
|
"parentId": parentId, |
|
"payChannel": payChannel, |
|
"promotionInfoDTO": promotionInfoDTO == null ? null : promotionInfoDTO.toJson(), |
|
"recMobile": recMobile, |
|
"shoppingCartSkuItemList": shoppingCartSkuItemList == null ? null : shoppingCartSkuItemList.map((e) => e.toJson()).toList(), |
|
"orderProductVOList": orderProductVOList == null ? null : orderProductVOList.map((e) => e.toJson()).toList(), |
|
"skuItemDTOList": skuItemDTOList, |
|
"source": source, |
|
"storeId": storeId, |
|
"subcribeTime": subcribeTime, |
|
"tableId": tableId, |
|
}; |
|
} |
|
|
|
class PromotionInfoDTOBean { |
|
String couponId; |
|
String promotionId; |
|
|
|
PromotionInfoDTOBean({this.couponId, this.promotionId}); |
|
|
|
static PromotionInfoDTOBean fromJson(Map<String, dynamic> json) { |
|
if (json == null) return null; |
|
PromotionInfoDTOBean promotionInfoDTOBean = PromotionInfoDTOBean(); |
|
promotionInfoDTOBean.couponId = json['couponId']; |
|
promotionInfoDTOBean.promotionId = json['promotionId']; |
|
return promotionInfoDTOBean; |
|
} |
|
|
|
Map<String, dynamic> toJson() => { |
|
"couponId": couponId, |
|
"promotionId": promotionId, |
|
}; |
|
}
|
|
|