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

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;

/**
 * 用于查询我的发起的流程实例入参模型
 */
@ApiModel("用于查询我的发起的流程实例入参模型")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmnProcessInstanceMyPageReqVO extends BpmPageParam {

    /**
     * 流程名称
     */
    @ApiModelProperty(value = "流程名称")
    private String name;

    /**
     * 流程定义的编号
     */
    @ApiModelProperty(value = "流程定义的编号", hidden = true)
    private String processDefinitionId;

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

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

    /**
     * 业务分类
     */
    @ApiModelProperty(value = "自定义分类")
    private String category;

    /**
     * 发起时间
     */
    @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;

    /**
     * 发起人所在的(企业/项目)工作台ID
     */
    @ApiModelProperty(value = "租户Id", required = true)
    @NotBlank(message = "租户不能为空")
    private String tenantId;

    /**
     * 发起人的身份ID
     */
    @ApiModelProperty(value = "操作人标识", required = true)
    @NotBlank(message = "用户编号不能为空")
    private String userId;
}
