package com.neusoft.smart.pos.dto.promotion.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.List;

@Data
@ApiModel
public class GetPreferentialPriceRequest {
    
    @ApiModelProperty(name = "orgId", value = "集团编号", dataType = "Integer")
    private Integer orgId;
    
    @ApiModelProperty(name = "shopId", value = "门店编号", dataType = "Integer")
    private Integer shopId;
    
    @NotEmpty(message = "设备序列号不可为空")
    @ApiModelProperty(name = "serialNo", value = "设备序列号", dataType = "String", example = "15554512555")
    private String serialNo;
    
    @ApiModelProperty(name = "memberCardNum", value = "会员卡号", dataType = "String", example = "15554512555")
    private String memberCardNum;
    
    @ApiModelProperty(name = "couponCode", value = "优惠券编码", dataType = "String", example = "15554512555")
    private String couponCode;
    
    @ApiModelProperty(name = "orderType", value = "订单类型", dataType = "String", example = "1")
    private String orderType;
    
    @ApiModelProperty(name = "orderItems", value = "商品列表", dataType = "List", example = "[]")
    private List<OrderItem> orderItems;
    
    @ApiModelProperty(name = "totalPrice", value = "订单总价", dataType = "BigDecimal", example = "18.98")
    private BigDecimal totalPrice;
    
    @ApiModelProperty(name = "discount", value = "折扣", dataType = "BigDecimal", example = "0.98")
    private BigDecimal discount = new BigDecimal("1");
    
    @ApiModelProperty(name = "floorPrice", value = "抹零", dataType = "BigDecimal", example = "18.98")
    private BigDecimal floorPrice = new BigDecimal("0");
    
    @ApiModelProperty(name = "settlementType", value = "结算类型@1:集团结算@2:门店结算", dataType = "String", example = "1")
    private String settlementType;
    
    @ApiModelProperty(name = "payType", value = "付款方式编号@1:微信支付@2:支付宝支付@3:银行卡支付@等", dataType = "String", example = "1")
    private String payType;
    
    
    @Data
    public static class OrderItem {
        
        @ApiModelProperty(name = "itemNumber", value = "商品编号", dataType = "String", example = "368685208641077248")
        private String itemNumber;
        
        @ApiModelProperty(name = "itemName", value = "商品名称", dataType = "String", example = "大盘鸡")
        private String itemName;
        
        @ApiModelProperty(name = "unitPrice", value = "商品单价", dataType = "BigDecimal", example = "18.98")
        private BigDecimal unitPrice;
        
        @ApiModelProperty(name = "quantity", value = "商品数量", dataType = "BigDecimal", example = "5")
        private BigDecimal quantity;
    
        @ApiModelProperty(name = "categoryName", value = "商品所属类别名称", dataType = "String", example = "凉菜")
        private String categoryName;
    
        @ApiModelProperty(name = "categoryNumber", value = "商品所属类别编号", dataType = "String", example = "10")
        private String categoryNumber;
    }
}
