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

import jakarta.validation.Valid;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author czh
 * @desc 贸易标的信息
 * @date 2023/7/19
 */
@Data
@Valid
public class TradeGoodsInfoReqVo implements Serializable {

    @Serial
    private static final long serialVersionUID = -7003603561892852639L;

    /**
     * 商品id
     */
    @NotNull(message = "商品不能为空")
    private Long goodsId;

    /**
     * 采购数量
     */
    @Digits(integer = 10, fraction = 2, message = "采购数量超长")
    private BigDecimal amount;

    /**
     * 单价
     */
    @Digits(integer = 10, fraction = 2, message = "单价超长")
    private BigDecimal price;

    /**
     * 单位
     */
    private String unit;
}
