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.

146 lines
4.9 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;
3 years ago
dynamic cartSum;
dynamic addressId;
3 years ago
bool isSubscribe;
3 years ago
int isTakeOut;
dynamic notes;
dynamic id;
dynamic numberOfPeople;
int orderSource;
dynamic orderType;
int orderTypeId;
dynamic parentCode;
dynamic parentId;
int payChannel;
3 years ago
PromotionInfoDTOBean promotionInfoDTO;
String recMobile;
List<OrderProductVOList> orderProductVOList;
3 years ago
List<OrderProductVOList> shoppingCartSkuItemList;
3 years ago
List<dynamic> skuItemDTOList;
3 years ago
int source;
3 years ago
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) => OrderProductVOList.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;
bool useVipPrice;
bool useBenefit;
String discountType;
3 years ago
PromotionInfoDTOBean({this.couponId, this.promotionId,this.useVipPrice,this.useBenefit,this.discountType});
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'];
promotionInfoDTOBean.useVipPrice = json['useVipPrice'];
promotionInfoDTOBean.useBenefit = json['useBenefit'];
promotionInfoDTOBean.discountType = json['discountType'];
3 years ago
return promotionInfoDTOBean;
3 years ago
}
3 years ago
Map<String, dynamic> toJson() => {
"couponId": couponId,
"promotionId": promotionId,
"useVipPrice":useVipPrice,
"useBenefit": useBenefit,
"discountType":discountType,
3 years ago
};
3 years ago
}