package com.sckw.product.model.vo.req;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

/**
 * @desc: 商品价格段
 * @author: yzc
 * @date: 2023-07-03 8:43
 */
@Getter
@Setter
@ToString
public class GoodsPriceRanges {
    /**
     * 起售量
     */
    @NotNull(message = "起售量不能为空")
    @DecimalMin(value = "0.01", message = "起售量必须大于零")
    private BigDecimal startAmount;

    /**
     * 上限售量
     */
    @NotNull(message = "上限售量不能为空")
    @DecimalMin(value = "-1.00",message = "上限售量最小为零")
    private BigDecimal endAmount;

    /**
     * endAmount为-1时，设置为不限
     */
    private String endAmountLabel;

    /**
     * 含税价
     */
    @NotNull(message = "含税价不能为空")
    @DecimalMin(value = "0.01", message = "含税价必须大于零")
    private BigDecimal price;

    /**
     * 序号
     */
    @NotNull(message = "梯度顺序不能为空")
    private Integer sort;
}
