package cn.ey.biz.module.system.framework.rule;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

@Data
@Valid
public class RuleDefinition {
    @Size(max = 20, message = "规则名最长20个字符")
    private String name = "";

    @Size(max = 20, message = "操作符最长20个字符")
    private String operator = "";
    
    private Object value = "";

    @Size(max = 20, message = "子规则最长20个")
    private List<RuleDefinition> all = new ArrayList<>();

    @Size(max = 20, message = "子规则最长20个")
    private List<RuleDefinition> any = new ArrayList<>();
}
