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

import com.neusoft.smart.pos.constants.DictionaryConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @author zcf
 * @date 2018-10-10 10：43
 * @description 订单打印新增使用Request
 */
@Data
@ApiModel

public class PostPrinterOrderRequest {
	
	@ApiModelProperty(name = "templateType", value = "模板类型@1:后结下单模板@2:前结结算模板@3:后结结算模板", dataType = "String" ,example="1")
	public String templateType = "";
	
	@ApiModelProperty(name = "orgId", value = "集团Id", dataType = "Integer" ,example="1")
	public Integer orgId;

	@ApiModelProperty(name = "shopId", value = "门店Id", dataType = "Integer" ,example="1")
	public Integer shopId;

	@ApiModelProperty(name = "orderNumber", value = "订单编号", dataType = "String" ,example="门店1")
	public String orderNumber = "";

	@ApiModelProperty(name = "locationNo", value = "桌号", dataType = "String" ,example="001")
	public String locationNo = "";

	@ApiModelProperty(name = "orderAmount", value = "账单金额（元）", dataType = "BigDecimal" ,example="198.22")
	public BigDecimal orderAmount;

	@ApiModelProperty(name = "realPayAmount", value = "订单实付金额（元）", dataType = "BigDecimal" ,example="0.00")
	public BigDecimal realPayAmount;

	@ApiModelProperty(name = "discountAmount", value = "订单优惠金额（元）", dataType = "BigDecimal" ,example="0.00")
	public BigDecimal discountAmount;

	@ApiModelProperty(name = "orderStatus", value = "订单状态(@1:待付款@2:已付款@3:退款中@4:已退款@5:订单取消)", dataType = "String" ,example="代付款")
	public String orderStatus;

	@ApiModelProperty(name = "orderStatusName", value = "订单状态(@1:待付款@2:已付款@3:退款中@4:已退款@5:订单取消)", dataType = "String" ,example="代付款")
	public String orderStatusName = DictionaryConstant.ORDER_STATUS_YFK.getValue();

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

	@ApiModelProperty(name = "paidTime", value = "支付完成时间", dataType = "String" ,example="2018-05-26 18:55:45")
	public String paidTime;

	@ApiModelProperty(name = "orderDetails", value = "订单详情", dataType = "List")
	public List<OrderDetail> orderDetails;
	
	public String repeatPrinter = "0";  //是否支持重复打印，0不支持，1支持
	
	@Data
	@ApiModel
	public static class OrderDetail{

		@ApiModelProperty(name = "itemNumber", value = "商品编号", dataType = "Integer" ,example="1001")
		private Integer itemNumber;

		@ApiModelProperty(name = "itemName", value = "商品名称", dataType = "String" ,example="门店1")
		private String itemName = "";

		@ApiModelProperty(name = "categoryName", value = "商品所属类别名称", dataType = "String", example = "凉菜")
		private String categoryName;

		@ApiModelProperty(name = "categoryNumber", value = "商品所属类别编号", dataType = "String", example = "10")
		private String categoryNumber;

		@ApiModelProperty(name = "unitPrice", value = "单价", dataType = "BigDecimal" ,example="198.22")
		public BigDecimal unitPrice;

		@ApiModelProperty(name = "quantity", value = "数量", dataType = "Integer" ,example="2")
		public Integer quantity;

		@ApiModelProperty(name = "discountAmount", value = "商品优惠金额（元）", dataType = "BigDecimal" ,example="0.00")
		public BigDecimal discountAmount;

		@ApiModelProperty(name = "finalPrice", value = "商品实付总金额（总价(单价-折扣金额)*数量）", dataType = "BigDecimal" ,example="0.00")
		public BigDecimal finalPrice;
		
		@ApiModelProperty(name = "selectedFlavors", value = "口味", dataType = "String", example = "甜")
		private String selectedFlavors;
		
		@ApiModelProperty(name = "remark", value = "备注", dataType = "String", example = "备注")
		private String remark;

	}
}
