package cn.axzo.workflow.common.model.request.bpmn;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 条件组
 * <p>
 * 目前条件中的所有项都是"并且",所以没有第二个属性,如果以后有"或者"的情况,再加
 *
 * @author wangli
 * @since 2023/11/13 19:58
 */
@ApiModel("JSON 版本的 BPMN 协议模型中的条件组")
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class BpmnConditionGroup {

    @ApiModelProperty(value = "条件组")
    private List<BpmnCondition> conditions;

    /**
     * 同条件组内的多个条件之间的模式,默认为"and"
     */
    private String conditionsType = "and";

    public List<BpmnCondition> getConditions() {
        return conditions;
    }

    public void setConditions(List<BpmnCondition> conditions) {
        this.conditions = conditions;
    }

    public String getConditionsType() {
        return conditionsType;
    }

    public void setConditionsType(String conditionsType) {
        this.conditionsType = conditionsType;
    }
}
