|
|
|
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;
|
|
|
|
String cartSum;
|
|
|
|
String addressId;
|
|
|
|
bool isSubscribe;
|
|
|
|
num isTakeOut;
|
|
|
|
String notes;
|
|
|
|
String id;
|
|
|
|
String numberOfPeople;
|
|
|
|
num orderSource;
|
|
|
|
String orderType;
|
|
|
|
num orderTypeId;
|
|
|
|
String parentCode;
|
|
|
|
String parentId;
|
|
|
|
num payChannel;
|
|
|
|
PromotionInfoDTOBean promotionInfoDTO;
|
|
|
|
String recMobile;
|
|
|
|
List<OrderProductVOList> orderProductVOList;
|
|
|
|
List<OrderProductListBean> shoppingCartSkuItemList;
|
|
|
|
List<dynamic> skuItemDTOList;
|
|
|
|
num 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) => OrderProductListBean.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,
|
|
|
|
};
|
|
|
|
}
|