package com.bonus.canteen.core.order.domain.param;

import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
public class DeviceOrderDetailInfoAddParam {

    @NotNull(message = "订单详情类型不能为空")
    private Integer detailType;
    @NotNull(message = "下单菜品ID不能为空")
    private Long goodsId;
    private String goodsImgUrl;
    private String goodsName;
    @NotNull(message = "菜谱详情ID不能为空")
    private Long menuDetailId;
    @NotNull(message = "菜谱ID不能为空")
    private Long menuId;
    @NotNull(message = "菜谱下单数量不能为空")
    private Integer quantity;
    private Integer restrictNum;
    private @NotNull(
            message = "售卖价格不能为空"
    ) @DecimalMin(
            value = "0",
            message = "售卖价格不能小于0"
    ) BigDecimal salePrice;
    private @NotNull(
            message = "优惠价格不能为空"
    ) @DecimalMin(
            value = "0",
            message = "优惠价格不能小于0"
    ) BigDecimal discountPrice;
    private @NotNull(
            message = "计算价格不能为空"
    ) @DecimalMin(
            value = "0",
            message = "计算价格不能小于0"
    ) BigDecimal finalPrice;
    private Integer salesMode;
    private String shoppingCartId;

}
