# OpBalanceRvAmountDTO.java

    package cloud.wconnect.frontoffice.pojo.dto.guestledgercheck;

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import lombok.Data;

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

    /**
     * @author lichen
     * @description Open Balance Reservation 中的各种Amount (Balance Amount, Write off Amount) 对应的DTO
     * @date 2023/3/18 11:08
     */
    @Data
    public class OpBalanceRvAmountDTO {

        /**
         * 1:BalanceAmount 2:WriteOffAmount
         */
        @NotNull(message = "The type cannot be null")
        private Integer type;

        /**
         * Balance Amount
         */
        @NotNull(message = "The amount cannot be null")
        @DecimalMin(value = "0", message = "The amount must be greater than 0")
        @DigitsCustom(integer = 9, message = "The amount is wrong format")
        private BigDecimal amount;

        /**
         * 类型
         */
        public static final int TYPE_BALANCE_AMOUNT = 1;
        public static final int TYPE_WRITE_OFF_AMOUNT = 2;

    }