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

import cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum;
import cn.axzo.workflow.common.model.request.BpmPageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

/**
 * "待我审核"的审批任务列表查询入参模型
 */
@ApiModel("'待我审核'的审批任务列表查询入参模型")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmnTaskPageSearchDTO extends BpmPageParam {

    @ApiModelProperty(value = "操作人标识")
    @NotBlank(message = "用户不能为空")
    private String userId;

    @ApiModelProperty(value = "租户Id", example = "1")
    @NotBlank(message = "租户不能为空")
    private String tenantId;

    @ApiModelProperty(value = "审核单类型,多选就'逗号'分隔", example = "1")
    private String categories;

    @ApiModelProperty(value = "业务 KEY")
    private String businessKey;

    @ApiModelProperty(value = "审核状态(PROCESSING:审核中,APPROVED:已通过,REJECTED:已驳回,CANCELLED:已撤回)", example = "APPROVED")
    private List<BpmnProcessInstanceResultEnum> results;

    @ApiModelProperty(value = "流程任务名", example = "芋道")
    private String name;

    @ApiModelProperty(value = "开始的创建收间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginCreateTime;

    @ApiModelProperty(value = "结束的创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endCreateTime;


}
