package com.njcn.bpm.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.db.bo.BaseEntity;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * <p>
 * BPM 流程标识
 * </p>
 *
 * @author hongawen
 * @since 2024-05-13
 */
@Data
public class BpmSignParam extends BaseEntity implements Serializable {


    /**
     * 流程名称
     */
    @ApiModelProperty("流程名称")
    @NotBlank(message = "流程名称不能为空")
    private String name;

    /**
     * 流程标识key
     */
    @ApiModelProperty("流程标识key")
    @NotBlank(message = "流程标识key不能为空")
    private String signKey;

    /**
     * 流程查看表单路径
     */
    @ApiModelProperty("流程查看表单路径")
    @NotBlank(message = "流程查看表单路径不能为空")
    private String viewPath;

    /**
     * 流程创建表单路径
     */
    @ApiModelProperty("流程创建表单路径")
    private String createPath;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Integer sort = 100;


    /**
     * 更新操作实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class BpmSignUpdateParam extends BpmSignParam {

        /**
         * 表Id
         */
        @ApiModelProperty("id")
        @NotBlank(message = ValidMessage.ID_NOT_BLANK)
        @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
        private String id;

    }


    /**
     * 分页查询实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class BpmSignQueryParam extends BaseParam {


        @ApiModelProperty("标识名称")
        private String name;

        @ApiModelProperty("标识key")
        private String signKey;

    }




}
