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

import jakarta.validation.constraints.*;
import lombok.Data;

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

/**
 * @author czh
 * @desc 物流合同标的信息
 * @date 2023/7/13
 */
@Data
public class LogisticsGoodsInfoReqVo implements Serializable {

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

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

    /**
     * 商品名
     */
    @Size(max = 50, message = "商品名称超长")
    private String goodsName;

    /**
     * 运量
     */
    @DecimalMin(value = "0", message = "运量不能小于0")
    private BigDecimal amount;

    /**
     * 运量单位字典id
     */
    private String unit;

    /**
     * 运价
     */
    private BigDecimal price;

    /**
     * 运价单位字典value
     */
    private String priceUnit;

    /**
     * 合理损耗
     */
    @Digits(integer = 5, fraction = 2, message = "合理损耗超长")
    private BigDecimal loss;

    /**
     * 合理损耗单位
     */
    private String lossUnit;

    /**
     * 扣亏货值
     */
    @Digits(integer = 3, fraction = 2, message = "扣亏货值超长")
    private BigDecimal deficitPrice;

    /**
     * 字典id  扣亏货值
     */
    private String deficitUnit;

}
