# CompareConfigDTO.java

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

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import lombok.Data;
    import org.hibernate.validator.constraints.Length;

    import jakarta.validation.constraints.Min;
    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;
    import java.math.BigDecimal;

    /**
     * DTO: Compare Config
     *
     * @author yyt
     * 2023/7/25
     */
    @Data
    public class CompareConfigDTO {

        /**
         * 数据 id
         */
        private Integer id;

        /**
         *房型
         */
        @NotBlank(message = "the roomType must not be blank")
        @Length(max = 10, message = "the roomType max length is 10")
        private String roomType;

        /**
         * 房价
         */
        @NotNull(message = "the rate must not be null")
        @DigitsCustom(integer = 8, message = "the rate format error")
        @Min(value = 0, message = "the rate must >= 0")
        private BigDecimal rate;

    }