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.
491 lines
12 KiB
491 lines
12 KiB
import 'package:huixiang/retrofit/data/shoppingCart.dart'; |
|
|
|
/// addressId : 0 |
|
/// isSubscribe : true |
|
/// isTakeOut : 0 |
|
/// notes : "" |
|
/// numberOfPeople : 0 |
|
/// orderSource : 0 |
|
/// orderType : 0 |
|
/// orderTypeId : 0 |
|
/// parentCode : "" |
|
/// parentId : 0 |
|
/// payChannel : 0 |
|
/// promotionInfoDTO : {"couponId":0,"promotionId":0} |
|
/// recMobile : "" |
|
/// shoppingCartSkuItemList : [] |
|
/// skuItemDTOList : [{"buyNum":0,"couponId":0,"couponName":"","discountPercent":0,"orderId":0,"orderProductId":0,"platterList":[{"deleted":true,"id":0,"productId":0,"required":true,"skuId":0}],"promotionId":0,"promotionName":"","refundNum":0,"skuId":0}] |
|
/// source : 0 |
|
/// storeId : 0 |
|
/// subcribeTime : "" |
|
/// tableId : 0 |
|
|
|
class PlaceOrderFirst { |
|
PlaceOrderFirst({ |
|
String addressId, |
|
bool isSubscribe, |
|
int isTakeOut, |
|
String notes, |
|
String numberOfPeople, |
|
int orderSource, |
|
int orderType, |
|
int orderTypeId, |
|
String parentCode, |
|
int parentId, |
|
int payChannel, |
|
PlaceOrderFirstPromotionInfoDTO promotionInfoDTO, |
|
String recMobile, |
|
List<ShoppingCartSkuItemListBean> shoppingCartSkuItemList, |
|
List<SkuItemDTOList> skuItemDTOList, |
|
int source, |
|
String storeId, |
|
String subcribeTime, |
|
int tableId,}){ |
|
_addressId = addressId; |
|
_isSubscribe = isSubscribe; |
|
_isTakeOut = isTakeOut; |
|
_notes = notes; |
|
_numberOfPeople = numberOfPeople; |
|
_orderSource = orderSource; |
|
_orderType = orderType; |
|
_orderTypeId = orderTypeId; |
|
_parentCode = parentCode; |
|
_parentId = parentId; |
|
_payChannel = payChannel; |
|
_promotionInfoDTO = promotionInfoDTO; |
|
_recMobile = recMobile; |
|
_skuItemDTOList = skuItemDTOList; |
|
_shoppingCartSkuItemList = shoppingCartSkuItemList; |
|
_source = source; |
|
_storeId = storeId; |
|
_subcribeTime = subcribeTime; |
|
_tableId = tableId; |
|
} |
|
|
|
PlaceOrderFirst.fromJson(dynamic json) { |
|
_addressId = json['addressId']; |
|
_isSubscribe = json['isSubscribe']; |
|
_isTakeOut = json['isTakeOut']; |
|
_notes = json['notes']; |
|
_numberOfPeople = json['numberOfPeople']; |
|
_orderSource = json['orderSource']; |
|
_orderType = json['orderType']; |
|
_orderTypeId = json['orderTypeId']; |
|
_parentCode = json['parentCode']; |
|
_parentId = json['parentId']; |
|
_payChannel = json['payChannel']; |
|
_promotionInfoDTO = json['promotionInfoDTO'] != null ? PlaceOrderFirstPromotionInfoDTO.fromJson(json['promotionInfoDTO']) : null; |
|
_recMobile = json['recMobile']; |
|
if (json['skuItemDTOList'] != null) { |
|
_skuItemDTOList = []; |
|
json['skuItemDTOList'].forEach((v) { |
|
_skuItemDTOList.add(SkuItemDTOList.fromJson(v)); |
|
}); |
|
} |
|
if (json['shoppingCartSkuItemList'] != null) { |
|
_shoppingCartSkuItemList = []; |
|
json['shoppingCartSkuItemList'].forEach((v) { |
|
_shoppingCartSkuItemList.add(ShoppingCartSkuItemListBean.fromJson(v)); |
|
}); |
|
} |
|
_source = json['source']; |
|
_storeId = json['storeId']; |
|
_subcribeTime = json['subcribeTime']; |
|
_tableId = json['tableId']; |
|
} |
|
String _addressId; |
|
bool _isSubscribe; |
|
int _isTakeOut; |
|
String _notes; |
|
String _numberOfPeople; |
|
int _orderSource; |
|
int _orderType; |
|
int _orderTypeId; |
|
String _parentCode; |
|
int _parentId; |
|
int _payChannel; |
|
PlaceOrderFirstPromotionInfoDTO _promotionInfoDTO; |
|
String _recMobile; |
|
List<SkuItemDTOList> _skuItemDTOList; |
|
List<ShoppingCartSkuItemListBean> _shoppingCartSkuItemList; |
|
int _source; |
|
String _storeId; |
|
String _subcribeTime; |
|
int _tableId; |
|
|
|
set addressId(String value) { |
|
_addressId = value; |
|
} |
|
|
|
String get addressId => _addressId; |
|
bool get isSubscribe => _isSubscribe; |
|
int get isTakeOut => _isTakeOut; |
|
String get notes => _notes; |
|
String get numberOfPeople => _numberOfPeople; |
|
int get orderSource => _orderSource; |
|
int get orderType => _orderType; |
|
int get orderTypeId => _orderTypeId; |
|
String get parentCode => _parentCode; |
|
int get parentId => _parentId; |
|
int get payChannel => _payChannel; |
|
PlaceOrderFirstPromotionInfoDTO get promotionInfoDTO => _promotionInfoDTO; |
|
String get recMobile => _recMobile; |
|
List<SkuItemDTOList> get skuItemDTOList => _skuItemDTOList; |
|
List<ShoppingCartSkuItemListBean> get shoppingCartSkuItemList => _shoppingCartSkuItemList; |
|
int get source => _source; |
|
String get storeId => _storeId; |
|
String get subcribeTime => _subcribeTime; |
|
int get tableId => _tableId; |
|
|
|
Map<String, dynamic> toJson() { |
|
final map = <String, dynamic>{}; |
|
map['addressId'] = _addressId; |
|
map['isSubscribe'] = _isSubscribe; |
|
map['isTakeOut'] = _isTakeOut; |
|
map['notes'] = _notes; |
|
map['numberOfPeople'] = _numberOfPeople; |
|
map['orderSource'] = _orderSource; |
|
map['orderType'] = _orderType; |
|
map['orderTypeId'] = _orderTypeId; |
|
map['parentCode'] = _parentCode; |
|
map['parentId'] = _parentId; |
|
map['payChannel'] = _payChannel; |
|
if (_promotionInfoDTO != null) { |
|
map['promotionInfoDTO'] = _promotionInfoDTO.toJson(); |
|
} |
|
map['recMobile'] = _recMobile; |
|
if (_skuItemDTOList != null) { |
|
map['skuItemDTOList'] = _skuItemDTOList.map((v) => v.toJson()).toList(); |
|
} |
|
if (_shoppingCartSkuItemList != null) { |
|
map['shoppingCartSkuItemList'] = _shoppingCartSkuItemList.map((v) => v.toJson()).toList(); |
|
} |
|
map['source'] = _source; |
|
map['storeId'] = _storeId; |
|
map['subcribeTime'] = _subcribeTime; |
|
map['tableId'] = _tableId; |
|
return map; |
|
} |
|
|
|
set isSubscribe(bool value) { |
|
_isSubscribe = value; |
|
} |
|
|
|
set isTakeOut(int value) { |
|
_isTakeOut = value; |
|
} |
|
|
|
set notes(String value) { |
|
_notes = value; |
|
} |
|
|
|
set numberOfPeople(String value) { |
|
_numberOfPeople = value; |
|
} |
|
|
|
set orderSource(int value) { |
|
_orderSource = value; |
|
} |
|
|
|
set orderType(int value) { |
|
_orderType = value; |
|
} |
|
|
|
set orderTypeId(int value) { |
|
_orderTypeId = value; |
|
} |
|
|
|
set parentCode(String value) { |
|
_parentCode = value; |
|
} |
|
|
|
set parentId(int value) { |
|
_parentId = value; |
|
} |
|
|
|
set payChannel(int value) { |
|
_payChannel = value; |
|
} |
|
|
|
set promotionInfoDTO(PlaceOrderFirstPromotionInfoDTO value) { |
|
_promotionInfoDTO = value; |
|
} |
|
|
|
set recMobile(String value) { |
|
_recMobile = value; |
|
} |
|
|
|
set skuItemDTOList(List<SkuItemDTOList> value) { |
|
_skuItemDTOList = value; |
|
} |
|
|
|
set shoppingCartSkuItemList(List<ShoppingCartSkuItemListBean> value) { |
|
_shoppingCartSkuItemList = value; |
|
} |
|
|
|
set source(int value) { |
|
_source = value; |
|
} |
|
|
|
set storeId(String value) { |
|
_storeId = value; |
|
} |
|
|
|
set subcribeTime(String value) { |
|
_subcribeTime = value; |
|
} |
|
|
|
set tableId(int value) { |
|
_tableId = value; |
|
} |
|
} |
|
|
|
/// buyNum : 0 |
|
/// couponId : 0 |
|
/// couponName : "" |
|
/// discountPercent : 0 |
|
/// orderId : 0 |
|
/// orderProductId : 0 |
|
/// platterList : [{"deleted":true,"id":0,"productId":0,"required":true,"skuId":0}] |
|
/// promotionId : 0 |
|
/// promotionName : "" |
|
/// refundNum : 0 |
|
/// skuId : 0 |
|
|
|
class SkuItemDTOList { |
|
SkuItemDTOList({ |
|
int buyNum, |
|
int couponId, |
|
String couponName, |
|
int discountPercent, |
|
int orderId, |
|
int orderProductId, |
|
List<PlatterList> platterList, |
|
int promotionId, |
|
String promotionName, |
|
int refundNum, |
|
String skuId,}){ |
|
_buyNum = buyNum; |
|
_couponId = couponId; |
|
_couponName = couponName; |
|
_discountPercent = discountPercent; |
|
_orderId = orderId; |
|
_orderProductId = orderProductId; |
|
_platterList = platterList; |
|
_promotionId = promotionId; |
|
_promotionName = promotionName; |
|
_refundNum = refundNum; |
|
_skuId = skuId; |
|
} |
|
|
|
SkuItemDTOList.fromJson(dynamic json) { |
|
_buyNum = json['buyNum']; |
|
_couponId = json['couponId']; |
|
_couponName = json['couponName']; |
|
_discountPercent = json['discountPercent']; |
|
_orderId = json['orderId']; |
|
_orderProductId = json['orderProductId']; |
|
if (json['platterList'] != null) { |
|
_platterList = []; |
|
json['platterList'].forEach((v) { |
|
_platterList.add(PlatterList.fromJson(v)); |
|
}); |
|
} |
|
_promotionId = json['promotionId']; |
|
_promotionName = json['promotionName']; |
|
_refundNum = json['refundNum']; |
|
_skuId = json['skuId']; |
|
} |
|
int _buyNum; |
|
int _couponId; |
|
String _couponName; |
|
int _discountPercent; |
|
int _orderId; |
|
int _orderProductId; |
|
List<PlatterList> _platterList; |
|
int _promotionId; |
|
String _promotionName; |
|
int _refundNum; |
|
String _skuId; |
|
|
|
int get buyNum => _buyNum; |
|
int get couponId => _couponId; |
|
String get couponName => _couponName; |
|
int get discountPercent => _discountPercent; |
|
int get orderId => _orderId; |
|
int get orderProductId => _orderProductId; |
|
List<PlatterList> get platterList => _platterList; |
|
int get promotionId => _promotionId; |
|
String get promotionName => _promotionName; |
|
int get refundNum => _refundNum; |
|
String get skuId => _skuId; |
|
|
|
set buyNum(int value) { |
|
_buyNum = value; |
|
} |
|
|
|
Map<String, dynamic> toJson() { |
|
final map = <String, dynamic>{}; |
|
map['buyNum'] = _buyNum; |
|
map['couponId'] = _couponId; |
|
map['couponName'] = _couponName; |
|
map['discountPercent'] = _discountPercent; |
|
map['orderId'] = _orderId; |
|
map['orderProductId'] = _orderProductId; |
|
if (_platterList != null) { |
|
map['platterList'] = _platterList.map((v) => v.toJson()).toList(); |
|
} |
|
map['promotionId'] = _promotionId; |
|
map['promotionName'] = _promotionName; |
|
map['refundNum'] = _refundNum; |
|
map['skuId'] = _skuId; |
|
return map; |
|
} |
|
|
|
set couponId(int value) { |
|
_couponId = value; |
|
} |
|
|
|
set couponName(String value) { |
|
_couponName = value; |
|
} |
|
|
|
set discountPercent(int value) { |
|
_discountPercent = value; |
|
} |
|
|
|
set orderId(int value) { |
|
_orderId = value; |
|
} |
|
|
|
set orderProductId(int value) { |
|
_orderProductId = value; |
|
} |
|
|
|
set platterList(List<PlatterList> value) { |
|
_platterList = value; |
|
} |
|
|
|
set promotionId(int value) { |
|
_promotionId = value; |
|
} |
|
|
|
set promotionName(String value) { |
|
_promotionName = value; |
|
} |
|
|
|
set refundNum(int value) { |
|
_refundNum = value; |
|
} |
|
|
|
set skuId(String value) { |
|
_skuId = value; |
|
} |
|
} |
|
|
|
/// deleted : true |
|
/// id : 0 |
|
/// productId : 0 |
|
/// required : true |
|
/// skuId : 0 |
|
|
|
class PlatterList { |
|
PlatterList({ |
|
bool deleted, |
|
int id, |
|
String productId, |
|
bool required, |
|
String skuId,}){ |
|
_deleted = deleted; |
|
_id = id; |
|
_productId = productId; |
|
_required = required; |
|
_skuId = skuId; |
|
} |
|
|
|
PlatterList.fromJson(dynamic json) { |
|
_deleted = json['deleted']; |
|
_id = json['id']; |
|
_productId = json['productId']; |
|
_required = json['required']; |
|
_skuId = json['skuId']; |
|
} |
|
bool _deleted; |
|
int _id; |
|
String _productId; |
|
bool _required; |
|
String _skuId; |
|
|
|
bool get deleted => _deleted; |
|
int get id => _id; |
|
String get productId => _productId; |
|
bool get required => _required; |
|
String get skuId => _skuId; |
|
|
|
set deleted(bool value) { |
|
_deleted = value; |
|
} |
|
|
|
Map<String, dynamic> toJson() { |
|
final map = <String, dynamic>{}; |
|
map['deleted'] = _deleted; |
|
map['id'] = _id; |
|
map['productId'] = _productId; |
|
map['required'] = _required; |
|
map['skuId'] = _skuId; |
|
return map; |
|
} |
|
|
|
set id(int value) { |
|
_id = value; |
|
} |
|
|
|
set productId(String value) { |
|
_productId = value; |
|
} |
|
|
|
set required(bool value) { |
|
_required = value; |
|
} |
|
|
|
set skuId(String value) { |
|
_skuId = value; |
|
} |
|
} |
|
|
|
/// couponId : 0 |
|
/// promotionId : 0 |
|
|
|
class PlaceOrderFirstPromotionInfoDTO { |
|
PlaceOrderFirstPromotionInfoDTO({ |
|
String couponId, |
|
String promotionId,}){ |
|
_couponId = couponId; |
|
_promotionId = promotionId; |
|
} |
|
|
|
PlaceOrderFirstPromotionInfoDTO.fromJson(dynamic json) { |
|
_couponId = json['couponId']; |
|
_promotionId = json['promotionId']; |
|
} |
|
String _couponId; |
|
String _promotionId; |
|
|
|
set couponId(String value) { |
|
_couponId = value; |
|
} |
|
|
|
String get couponId => _couponId; |
|
String get promotionId => _promotionId; |
|
|
|
Map<String, dynamic> toJson() { |
|
final map = <String, dynamic>{}; |
|
map['couponId'] = _couponId; |
|
map['promotionId'] = _promotionId; |
|
return map; |
|
} |
|
|
|
set promotionId(String value) { |
|
_promotionId = value; |
|
} |
|
} |