# MarketCodeDTO.java

    package cloud.wconnect.rateshop.pojo.dto.revenue;

    import lombok.Data;
    import org.hibernate.validator.constraints.Length;
    import org.hibernate.validator.constraints.Range;
    import software.amazon.awssdk.services.s3.endpoints.internal.Value;

    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;

    /**
     * DTO: Market Code
     *
     * @author: yyt
     * 2024-03-23
     */
    @Data
    public class MarketCodeDTO {

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

        /**
         * 类型：1.散客，2.团客
         */
        @NotNull(message = "the type must not be null")
        @Range(min = 1, max = 2, message = "the type must in [1.transient，2.group]")
        private Integer type;

        /**
         * market code
         */
        @NotBlank(message = "the marketCode must not be blank")
        @Length(max = 255, message = "the marketCode max length is 255")
        private String marketCode;

        /**
         * 计算规则：1.加，2.减
         */
        @NotNull(message = "the calculationRule must not be null")
        @Range(min = 1, max = 2, message = "the calculationRule must in [1.add，2.subtract]")
        private Integer calculationRule;

    }