package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 流程实例分页 Request VO")
@Data
public class BpmMyPageReqVO extends PageParam {

    @Schema(description = "标题", example = "测试标题")
    private String templateContent;

    @Schema(description = "流程实例的状态", example = "1")
    @InEnum(BpmProcessInstanceStatusEnum.class)
    private Integer status;

    @Schema(description = "消息业务类型", example = "1")
    private Integer businessType;

    @Schema(description = "消息类型", example = "apply_accommodation")
    private Integer notifyType;

    @Schema(description = "完成状态", example = "apply_accommodation")
    private Integer completedStatus;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "发起用户编号", example = "1024")
    private Long startUserId; // 注意，只有在【流程实例】菜单，才使用该参数

    @Schema(description = "发起用户名称", example = "1024")
    private String loginNickname; // 注意，只有在【流程实例】菜单，才使用该参数

    @Schema(description = "请求类型，0-首页，1-代办，2-已办，3-我的流程，4-我的抄送", requiredMode = Schema.RequiredMode.REQUIRED, example = "apply_accommodation")
    @NotNull(message = "请求类型不能为空")
    private Integer queryType;

}
