package com.sckw.transport.model.dto;

import jakarta.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;

/**
 * @author lfdc
 * @description 完结订单dto
 * @date 2023-07-25 17:07:09
 */
@Data
public class OrderFinishDTO {
    /**
     * 数据id
     */
    @NotNull(message = "单据id不能为空")
    private String id;

    /**
     * 备注
     */
    @Length(max = 200,message = "单据编号长度错误最大长度:{max}")
    private String remark;

    /**
     * 装货量
     */
    @Digits(integer = 10, fraction=2, message = "装货量格式错误")
    @DecimalMin(value = "0.00", message = "装货量最小值不能低于0.00")
//    @DecimalMax(value = "10.00", message = "资金最大值不能高于10.00元")
    @NotNull(message = "装货量不可为空")
    private BigDecimal loadAmount;

    /**
     * 卸货量
     */
    @Digits(integer = 10, fraction=2, message = "卸货量格式错误")
    @DecimalMin(value = "0.00", message = "卸货量最小值不能低于0.00")
    @NotNull(message = "卸货量不可为空")
    private BigDecimal unloadAmount;
}
