package cn.stylefeng.workflow.design.modular.pojo.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.workflow.api.pojo.config.MyFlowDesign;
import cn.stylefeng.workflow.api.pojo.config.SixGraphDesign;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class DefinitionRequest extends BaseRequest {

    @NotNull(message = "主键不能为空", groups = {detail.class, save.class, upgradeAndSave.class})
    @ChineseDescription("主键")
    private Long definitionId;

    @ChineseDescription("流程模型id")
    private Long modelId;

    @ChineseDescription("流程版本，例如：v1.0")
    private String definitionVersion;

    @ChineseDescription("基于x6的引擎绘制的流程图")
    @NotNull(message = "流程设计图不能为空", groups = {save.class, upgradeAndSave.class})
    private SixGraphDesign sixGraphDesign;

    @ChineseDescription("基于仿钉钉的设计器绘制的流程图")
    private MyFlowDesign myFlowDesign;

    @ChineseDescription("任务id")
    private Long taskId;

    @ChineseDescription("是否查询移动端的表单配置：true-移动端，false-查询PC端")
    private Boolean mobileFlag;

    public @interface save {

    }

    public @interface upgradeAndSave {

    }

}
