package cn.stylefeng.workflow.instance.api.pojo.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.workflow.api.enums.TaskConditionEnum;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;
import java.util.Set;

@EqualsAndHashCode(callSuper = true)
@Data
public class RuntimeInstanceRequest extends BaseRequest {

    @NotNull(message = "流程实例id不能为空", groups = {detail.class, getPassedRuntimeNodeList.class})
    @ChineseDescription("主键")
    private Long instanceId;

    @ChineseDescription("流程模型id")
    private Long modelId;

    @ChineseDescription("流程定义id")
    private Long definitionId;

    @ChineseDescription("流程发起方式：10-页面发起，20-API接口发起")
    private Integer startType;

    @ChineseDescription("当前运行时节点id")
    private Long currentRuNodeId;

    @ChineseDescription("流程完成时间")
    private String completionTime;

    @ChineseDescription("流程实例状态：10-草稿，20-处理中，30-已完成，40-拒绝，50-挂起，60-作废")
    private List<Integer> instanceStatusList;

    @ChineseDescription("审批标题")
    private String instanceTitle;

    @ChineseDescription("提交人id，发起人id")
    private List<Long> applicant;

    @ChineseDescription("提交人所属的组织id")
    private Long applicantOrgId;

    @ChineseDescription("模型树的节点id")
    private List<Long> modelTreeIdList;

    @ChineseDescription("流程实例信息id集合")
    private Set<Long> instanceIdList;

    @ChineseDescription("查询条件枚举")
    @NotNull(message = "查询条件不能为空", groups = getTasks.class)
    private TaskConditionEnum taskCondition;

    @ChineseDescription("任务id")
    private Long taskId;

    @ChineseDescription("查询条件，流程模型列表")
    private List<Long> flowModelIdList;

    @ChineseDescription("流程标签名称列表")
    private List<String> tagNameList;

    public @interface getTasks {
    }

    public @interface getPassedRuntimeNodeList {

    }

}
