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

import cn.axzo.workflow.common.valid.group.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 审批任务节点的入参模型
 * @author wangli
 */
@ApiModel("审批任务节点的入参模型")
@Data
public class BpmnTaskAuditDTO {

    @ApiModelProperty(value = "任务编号", required = true, example = "1024")
    @NotEmpty(message = "任务编号不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private String taskId;

    /**
     * 评论信息
     */
    @ApiModelProperty(value = "审批意见")
    private String advice;

    /**
     * 图片列表
     */
    @ApiModelProperty(value = "图片列表")
    private List<String> imageList;

    /**
     * 附件列表
     */
    @ApiModelProperty(value = "附件列表")
    private List<String> attachmentList;

    /**
     * 当前审核人信息
     */
    @NotNull(message = "审批人信息不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private BpmnTaskDelegateAssigner approver;

    /**
     * 下级审批人
     */
    @ApiModelProperty(value = "下级审批人信息", notes = "可为空,定义选择审批人,如果不为空,则覆盖下一级任务的审核人")
    private BpmnTaskDelegateAssigner nextApprover;
}
