package com.neusoft.smart.pos.dto.order.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author tongmg
 * @date 2019-12-04 16：43
 * @description 订单新增使用Request
 */
@Data
@ApiModel
public class PostCreateOrderRequest {

	//会员未登录，buyerId为空；会员登录，此处为会员Id或会员手机号
	@ApiModelProperty(name = "buyerId", value = "买家Id", dataType = "String")
	private String buyerId;

	@ApiModelProperty(name = "orderNumber", value = "订单编号", dataType = "String" ,example="947195829515")
	private String orderNumber;

	//后结订单时需要
	@ApiModelProperty(name = "locationNo", value = "位置编号(如桌号等)", dataType = "String" ,example="005")
	private String locationNo;

	@ApiModelProperty(name = "serialNo", value = "设备序列号", dataType = "String" ,example="15554512555")
	private String serialNo;

	@ApiModelProperty(name = "orderAmount", value = "订单总金额(单位分)", dataType = "Long", example = "1898")
	private Long orderAmount;

	@ApiModelProperty(name = "orderType", value = "订单类型@1正常订单@2POS端补录订单@3会员卡充值订单@4微信点餐订单", dataType = "String" ,example="1")
	private String orderType;

	@ApiModelProperty(name = "orderDetails", value = "购买商品明细", dataType = "list")
	private List<PostOrderDetailRequest> orderDetails;

    @ApiModelProperty(name = "orderSubType", value = "子订单类别：堂食(common_consume_order)/外卖(req_delivery_order)", dataType = "String")
    private String orderSubType = "common_consume_order";

    @ApiModelProperty(name = "deliveryInfo", value = "配送信息。当order_sub_type取值为req_delivery_order时，delivery_info中存储配送地址信息；当取值为common_consume_order时，解释为堂食所选餐厅", dataType = "DeliveryInfo")
    private DeliveryInfo deliveryInfo;

    @ApiModelProperty(name = "variableFees", value = "变动费用list", dataType = "list")
    private List<VariableFee> variableFees;

	@ApiModelProperty(name = "remark", value = "描述", dataType = "String" ,example="1")
	private String remark;

	//一般情况下通过设备SN获得
	@ApiModelProperty(name = "shopId", value = "卖家Id", dataType = "Integer")
	private Integer shopId;

	//一般情况下通过设备SN获得
	@ApiModelProperty(name = "orgId", value = "集团Id", dataType = "Integer")
	private Integer orgId;

	//订单序号
	private Integer seqNo;

	//创建者账户
	private String createdBy;

}
