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.

137 lines
4.5 KiB

3 years ago
import 'package:huixiang/retrofit/data/down_order.dart';
import 'package:huixiang/retrofit/data/order_product_vo.dart';
3 years ago
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
3 years ago
import 'package:huixiang/retrofit/data/shoppingCart.dart';
class PlaceOrderFirst {
3 years ago
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;
3 years ago
List<OrderProductListBean> shoppingCartSkuItemList;
3 years ago
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 ?? [])
3 years ago
.map((o) => OrderProductListBean.fromJson(o)));
3 years ago
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,
};
3 years ago
}
3 years ago
class PromotionInfoDTOBean {
String couponId;
String promotionId;
3 years ago
3 years ago
PromotionInfoDTOBean({this.couponId, this.promotionId});
3 years ago
3 years ago
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;
3 years ago
}
3 years ago
Map<String, dynamic> toJson() => {
"couponId": couponId,
"promotionId": promotionId,
};
3 years ago
}