# RevFormulaDTO.java

    package cloud.wconnect.finance.pojo.dto.pl;

    import jakarta.validation.constraints.NotNull;
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import org.hibernate.validator.constraints.Range;

    /**
     * Rev指标公式DTO
     * {	 "type":2	 "value":"A-B"	}或{	 "type":1	 "value":"100"	},或{	 "type":3	 "value":"A/B"	}
     * @author lichen
     * @date 2025/9/25
     */
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class RevFormulaDTO {

        /**
         * 类型1:常量 2:减法 3:除法
         */
        @NotNull(message = "The type cannot be null")
        @Range(min = 1, max = 3, message = "The type must be between [1:constant 2:subtraction 3:division]")
        private Integer type;

        /**
         * 公式表达式
         */
        @NotNull(message = "The value cannot be null")
        private String value;

    }