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

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

import java.util.List;

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

    @NotNull(message = "任务id不能为空", groups = {getBackNodeList.class})
    @ChineseDescription("任务id")
    private Long taskId;

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

    @ChineseDescription("流程节点id，对应flow_design_node表主键id")
    private Long reNodeId;

    @ChineseDescription("运行时流程节点id，对应flow_engine_runtime_node表主键id")
    private Long ruNodeId;

    @ChineseDescription("任务处理人id")
    private Long approver;

    @ChineseDescription("是否已读，Y-已读，N-未读")
    private String readFlag;

    @ChineseDescription("任务类型：10-发起，20-审批，30-抄送，40-征询，50-办理")
    private Integer taskType;

    @ChineseDescription("任务状态：20-审批中，30-已审批，40-已拒绝，50-已退回，60-已撤回，70-已关闭，80-已转交")
    private Integer taskStatus;

    @ChineseDescription("审批意见内容")
    private String suggestContent;

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

    public @interface getApprovalLog {
    }

    public @interface getBackNodeList {
    }

}
