build: api module

This commit is contained in:
fit2-zhao 2023-05-15 14:37:32 +08:00 committed by fit2-zhao
parent 06fcf73716
commit 02b2be842e
27 changed files with 1590 additions and 0 deletions

View File

@ -0,0 +1,137 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口定义")
@TableName("api_definition")
@Data
public class ApiDefinition implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口pk", required = true, allowableValues = "range[1, 50]")
private String id;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@Size(min = 1, max = 100, message = "{api_definition.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]")
private String createUser;
@ApiModelProperty(name = "修改时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 64, message = "{api_definition.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 64]")
private String updateUser;
@ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 64]")
private String deleteUser;
@ApiModelProperty(name = "删除时间", required = false, dataType = "Long")
private Long deleteTime;
@Size(min = 1, max = 1, message = "{api_definition.deleted.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.deleted.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "删除状态", required = true, allowableValues = "range[1, 1]")
private Boolean deleted;
@Size(min = 1, max = 255, message = "{api_definition.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口名称", required = true, allowableValues = "range[1, 255]")
private String name;
@Size(min = 1, max = 64, message = "{api_definition.method.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.method.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口类型", required = true, allowableValues = "range[1, 64]")
private String method;
@Size(min = 1, max = 255, message = "{api_definition.protocol.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.protocol.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口协议", required = true, allowableValues = "range[1, 255]")
private String protocol;
@ApiModelProperty(name = "接口路径-只有HTTP协议有值", required = false, allowableValues = "range[1, 255]")
private String path;
@ApiModelProperty(name = "模块全路径-用于导入处理", required = false, allowableValues = "range[1, 1000]")
private String modulePath;
@Size(min = 1, max = 64, message = "{api_definition.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口状态/进行中/已完成", required = true, allowableValues = "range[1, 64]")
private String status;
@ApiModelProperty(name = "模块fk", required = false, allowableValues = "range[1, 50]")
private String moduleId;
@ApiModelProperty(name = "自定义id", required = false, dataType = "Integer")
private Integer num;
@ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 1000]")
private String tags;
@ApiModelProperty(name = "自定义排序", required = true, dataType = "Long")
private Long pos;
@Size(min = 1, max = 1, message = "{api_definition.sync_enable.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.sync_enable.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否启用同步", required = true, allowableValues = "range[1, 1]")
private Boolean syncEnable;
@ApiModelProperty(name = "同步开始时间", required = false, dataType = "Long")
private Long syncTime;
@Size(min = 1, max = 50, message = "{api_definition.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]")
private String environmentId;
@Size(min = 1, max = 1, message = "{api_definition.latest.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition.latest.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否为最新版本 0:否1:是", required = true, allowableValues = "range[1, 1]")
private Boolean latest;
@ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]")
private String versionId;
@ApiModelProperty(name = "版本引用fk", required = false, allowableValues = "range[1, 50]")
private String refId;
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 500]")
private String description;
}

View File

@ -0,0 +1,38 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口定义详情内容")
@TableName("api_definition_blob")
@Data
public class ApiDefinitionBlob implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition_blob.api_definition_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口fk/ 一对一关系", required = true, allowableValues = "range[1, 50]")
private String apiDefinitionId;
@ApiModelProperty(name = "请求内容", required = false, dataType = "byte[]")
private byte[] request;
@ApiModelProperty(name = "响应内容", required = false, dataType = "byte[]")
private byte[] response;
@ApiModelProperty(name = "备注", required = false, dataType = "byte[]")
private byte[] remark;
}

View File

@ -0,0 +1,43 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口定义环境")
@TableName("api_definition_env")
@Data
public class ApiDefinitionEnv implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition_env.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "修改时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 50, message = "{api_definition_env.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_env.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用户fk", required = true, allowableValues = "range[1, 50]")
private String createUser;
@Size(min = 1, max = 50, message = "{api_definition_env.environment_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_env.environment_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "环境fk", required = true, allowableValues = "range[1, 50]")
private String environmentId;
}

View File

@ -0,0 +1,31 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口定义关注人")
@TableName("api_definition_follow")
@Data
public class ApiDefinitionFollow implements Serializable {
private static final long serialVersionUID = 1L;
@Size(min = 1, max = 50, message = "{api_definition_follow.api_definition_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_follow.api_definition_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口fk", required = true, allowableValues = "range[1, 50]")
private String apiDefinitionId;
@Size(min = 1, max = 50, message = "{api_definition_follow.follow_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_follow.follow_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "关注人/用户fk", required = true, allowableValues = "range[1, 50]")
private String followId;
}

View File

@ -0,0 +1,71 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "mock 配置")
@TableName("api_definition_mock")
@Data
public class ApiDefinitionMock implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition_mock.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "mock pk", required = true, allowableValues = "range[1, 50]")
private String id;
@ApiModelProperty(name = "接口路径", required = false, allowableValues = "range[1, 1000]")
private String apiPath;
@ApiModelProperty(name = "接口类型", required = false, allowableValues = "range[1, 64]")
private String apiMethod;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "修改时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 64, message = "{api_definition_mock.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_mock.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 64]")
private String createUser;
@Size(min = 1, max = 200, message = "{api_definition_mock.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_mock.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "mock 名称", required = true, allowableValues = "range[1, 200]")
private String name;
@ApiModelProperty(name = "自定义标签", required = false, allowableValues = "range[1, 1000]")
private String tags;
@ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 10]")
private String status;
@Size(min = 1, max = 50, message = "{api_definition_mock.expect_num.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_mock.expect_num.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "mock编号", required = true, allowableValues = "range[1, 50]")
private String expectNum;
@Size(min = 1, max = 50, message = "{api_definition_mock.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_mock.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@Size(min = 1, max = 50, message = "{api_definition_mock.api_definition_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_mock.api_definition_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口fk", required = true, allowableValues = "range[1, 50]")
private String apiDefinitionId;
}

View File

@ -0,0 +1,31 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "mock期望值配置")
@TableName("api_definition_mock_config")
@Data
public class ApiDefinitionMockConfig implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition_mock_config.api_definition_mock_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口mock pk", required = true, allowableValues = "range[1, 50]")
private String apiDefinitionMockId;
@ApiModelProperty(name = "请求内容", required = false, allowableValues = "range[1, ]")
private byte[] request;
@ApiModelProperty(name = "响应内容", required = false, allowableValues = "range[1, ]")
private byte[] response;
}

View File

@ -0,0 +1,69 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口模块")
@TableName("api_definition_module")
@Data
public class ApiDefinitionModule implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition_module.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口模块pk", required = true, allowableValues = "range[1, 50]")
private String id;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "修改时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 50, message = "{api_definition_module.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_module.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]")
private String updateUser;
@Size(min = 1, max = 50, message = "{api_definition_module.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_module.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@Size(min = 1, max = 64, message = "{api_definition_module.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_module.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "模块名称", required = true, allowableValues = "range[1, 64]")
private String name;
@Size(min = 1, max = 64, message = "{api_definition_module.protocol.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_module.protocol.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "协议", required = true, allowableValues = "range[1, 64]")
private String protocol;
@Size(min = 1, max = 50, message = "{api_definition_module.parent_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_module.parent_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "父级fk", required = true, allowableValues = "range[1, 50]")
private String parentId;
@Size(min = 1, max = 50, message = "{api_definition_module.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_module.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "树节点级别", required = true, dataType = "Integer")
private Integer level;
@ApiModelProperty(name = "排序", required = true, dataType = "Integer")
private Integer pos;
}

View File

@ -0,0 +1,50 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "定时同步配置")
@TableName("api_definition_swagger")
@Data
public class ApiDefinitionSwagger implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition_swagger.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "主键", required = true, allowableValues = "range[1, 120]")
private String id;
@Size(min = 1, max = 500, message = "{api_definition_swagger.swagger_url.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_swagger.swagger_url.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "url地址", required = true, allowableValues = "range[1, 500]")
private String swaggerUrl;
@ApiModelProperty(name = "模块fk", required = false, allowableValues = "range[1, 50]")
private String moduleId;
@ApiModelProperty(name = "模块路径", required = false, allowableValues = "range[1, 500]")
private String modulePath;
@ApiModelProperty(name = "鉴权配置信息", required = false, allowableValues = "range[1, ]")
private byte[] config;
@ApiModelProperty(name = "导入模式/覆盖/不覆盖", required = false, allowableValues = "range[1, 1]")
private Boolean mode;
@ApiModelProperty(name = "项目fk", required = false, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "导入版本", required = false, allowableValues = "range[1, 50]")
private String versionId;
}

View File

@ -0,0 +1,61 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "API模版表")
@TableName("api_definition_template")
@Data
public class ApiDefinitionTemplate implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_definition_template.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "模版主键", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 100, message = "{api_definition_template.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_template.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "API模版名称", required = true, allowableValues = "range[1, 100]")
private String name;
@Size(min = 1, max = 1, message = "{api_definition_template.system.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_template.system.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否是系统模版", required = true, allowableValues = "range[1, 1]")
private Boolean system;
@Size(min = 1, max = 1, message = "{api_definition_template.global.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_template.global.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否是公共模版", required = true, allowableValues = "range[1, 1]")
private Boolean global;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "更新时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 50, message = "{api_definition_template.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_template.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@Size(min = 1, max = 50, message = "{api_definition_template.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_definition_template.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "API模版描述", required = false, allowableValues = "range[1, 500]")
private String description;
}

View File

@ -0,0 +1,67 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "误报库")
@TableName("api_fake_error_config")
@Data
public class ApiFakeErrorConfig implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_fake_error_config.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "误报pk", required = true, allowableValues = "range[1, 50]")
private String id;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "修改时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 50, message = "{api_fake_error_config.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_fake_error_config.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@Size(min = 1, max = 50, message = "{api_fake_error_config.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_fake_error_config.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]")
private String updateUser;
@Size(min = 1, max = 255, message = "{api_fake_error_config.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_fake_error_config.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "误报名称", required = true, allowableValues = "range[1, 255]")
private String name;
@Size(min = 1, max = 255, message = "{api_fake_error_config.match_type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_fake_error_config.match_type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "匹配类型", required = true, allowableValues = "range[1, 255]")
private String matchType;
@ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 1]")
private Boolean status;
@Size(min = 1, max = 50, message = "{api_fake_error_config.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_fake_error_config.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "描述信息", required = false, allowableValues = "range[1, 500]")
private String description;
@ApiModelProperty(name = "误报内容", required = false, dataType = "byte[]")
private byte[] content;
}

View File

@ -0,0 +1,46 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "关联场景测试和性能测试")
@TableName("api_load_test")
@Data
public class ApiLoadTest implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_load_test.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 50, message = "{api_load_test.resource_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_load_test.resource_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口用例fk/场景用例fk", required = true, allowableValues = "range[1, 50]")
private String resourceId;
@Size(min = 1, max = 50, message = "{api_load_test.load_test_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_load_test.load_test_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "性能测试用例fk", required = true, allowableValues = "range[1, 50]")
private String loadTestId;
@ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]")
private String environmentId;
@Size(min = 1, max = 10, message = "{api_load_test.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_load_test.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源类型/CASE/SCENARIO", required = true, allowableValues = "range[1, 10]")
private String type;
}

View File

@ -0,0 +1,105 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "API/CASE执行结果")
@TableName("api_report")
@Data
public class ApiReport implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_report.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口结果报告pk", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 200, message = "{api_report.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口报告名称", required = true, allowableValues = "range[1, 200]")
private String name;
@Size(min = 1, max = 50, message = "{api_report.resource_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.resource_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源fk/api_definition_id/api_test_case_id", required = true, allowableValues = "range[1, 50]")
private String resourceId;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "修改时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 50, message = "{api_report.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人fk", required = true, allowableValues = "range[1, 50]")
private String createUser;
@Size(min = 1, max = 50, message = "{api_report.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]")
private String updateUser;
@Size(min = 1, max = 1, message = "{api_report.deleted.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.deleted.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "删除状态", required = true, allowableValues = "range[1, 1]")
private Boolean deleted;
@Size(min = 1, max = 50, message = "{api_report.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "结果状态", required = true, allowableValues = "range[1, 50]")
private String status;
@ApiModelProperty(name = "接口开始执行时间", required = false, dataType = "Long")
private Long startTime;
@ApiModelProperty(name = "接口执行结束时间", required = false, dataType = "Long")
private Long endTime;
@Size(min = 1, max = 20, message = "{api_report.run_mode.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.run_mode.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "执行模块/API/CASE/API_PLAN", required = true, allowableValues = "range[1, 20]")
private String runMode;
@Size(min = 1, max = 50, message = "{api_report.resource_pool.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.resource_pool.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源池", required = true, allowableValues = "range[1, 50]")
private String resourcePool;
@Size(min = 1, max = 50, message = "{api_report.trigger_mode.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.trigger_mode.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "触发模式/手动/批量/定时任务/JENKINS", required = true, allowableValues = "range[1, 50]")
private String triggerMode;
@ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]")
private String versionId;
@Size(min = 1, max = 50, message = "{api_report.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@Size(min = 1, max = 50, message = "{api_report.integrated_report_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.integrated_report_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "集成报告id/api_scenario_report_id", required = true, allowableValues = "range[1, 50]")
private String integratedReportId;
@Size(min = 1, max = 1, message = "{api_report.integrated.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_report.integrated.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否为集成报告,默认否", required = true, allowableValues = "range[1, 1]")
private Boolean integrated;
}

View File

@ -0,0 +1,34 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "API/CASE执行结果详情")
@TableName("api_report_blob")
@Data
public class ApiReportBlob implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_report_blob.api_report_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口报告fk", required = true, allowableValues = "range[1, 50]")
private String apiReportId;
@ApiModelProperty(name = "结果内容详情", required = false, dataType = "byte[]")
private byte[] content;
@ApiModelProperty(name = "执行环境配置", required = false, dataType = "byte[]")
private byte[] config;
@ApiModelProperty(name = "执行过程日志", required = false, dataType = "byte[]")
private byte[] console;
}

View File

@ -0,0 +1,128 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景")
@TableName("api_scenario")
@Data
public class ApiScenario implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 200, message = "{api_scenario.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景名称", required = true, allowableValues = "range[1, 200]")
private String name;
@Size(min = 1, max = 50, message = "{api_scenario.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "删除时间", required = false, dataType = "Long")
private Long deleteTime;
@ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 50]")
private String deleteUser;
@Size(min = 1, max = 50, message = "{api_scenario.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 50]")
private String updateUser;
@ApiModelProperty(name = "更新时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 10, message = "{api_scenario.level.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.level.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景级别/P0/P1等", required = true, allowableValues = "range[1, 10]")
private String level;
@Size(min = 1, max = 20, message = "{api_scenario.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景状态/未规划/已完成 等", required = true, allowableValues = "range[1, 20]")
private String status;
@Size(min = 1, max = 50, message = "{api_scenario.principal.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.principal.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "责任人/用户fk", required = true, allowableValues = "range[1, 50]")
private String principal;
@ApiModelProperty(name = "场景步骤总数", required = true, dataType = "Integer")
private Integer stepTotal;
@ApiModelProperty(name = "通过率", required = true, dataType = "Long")
private Long passRate;
@ApiModelProperty(name = "最后一次执行的结果状态", required = false, allowableValues = "range[1, 50]")
private String reportStatus;
@ApiModelProperty(name = "编号", required = false, dataType = "Integer")
private Integer num;
@ApiModelProperty(name = "自定义id", required = false, allowableValues = "range[1, 50]")
private String customNum;
@Size(min = 1, max = 1, message = "{api_scenario.deleted.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.deleted.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "删除状态", required = true, allowableValues = "range[1, 1]")
private Boolean deleted;
@Size(min = 1, max = 1, message = "{api_scenario.environment_group.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.environment_group.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否为环境组", required = true, allowableValues = "range[1, 1]")
private Boolean environmentGroup;
@ApiModelProperty(name = "自定义排序", required = true, dataType = "Long")
private Long pos;
@ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]")
private String versionId;
@ApiModelProperty(name = "引用资源fk", required = false, allowableValues = "range[1, 50]")
private String refId;
@ApiModelProperty(name = "是否为最新版本 0:否1:是", required = false, allowableValues = "range[1, 1]")
private Boolean latest;
@Size(min = 1, max = 50, message = "{api_scenario.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "场景模块fk", required = false, allowableValues = "range[1, 50]")
private String apiScenarioModuleId;
@ApiModelProperty(name = "最后一次执行的报告fk", required = false, allowableValues = "range[1, 50]")
private String reportId;
@ApiModelProperty(name = "描述信息", required = false, allowableValues = "range[1, 500]")
private String description;
@ApiModelProperty(name = "模块全路径/用于导入模块创建", required = false, allowableValues = "range[1, 1000]")
private String modulePath;
@ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 1000]")
private String tags;
}

View File

@ -0,0 +1,28 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景步骤详情")
@TableName("api_scenario_blob")
@Data
public class ApiScenarioBlob implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_blob.api_scenario_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "场景pk", required = true, allowableValues = "range[1, 50]")
private String apiScenarioId;
@ApiModelProperty(name = "场景步骤内容", required = false, dataType = "byte[]")
private byte[] content;
}

View File

@ -0,0 +1,43 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景环境")
@TableName("api_scenario_env")
@Data
public class ApiScenarioEnv implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_env.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "场景环境pk", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 50, message = "{api_scenario_env.api_scenario_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_env.api_scenario_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]")
private String apiScenarioId;
@Size(min = 1, max = 50, message = "{api_scenario_env.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_env.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]")
private String environmentId;
@ApiModelProperty(name = "环境组fk", required = false, allowableValues = "range[1, 50]")
private String environmentGroupId;
}

View File

@ -0,0 +1,31 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "关注记录")
@TableName("api_scenario_follow")
@Data
public class ApiScenarioFollow implements Serializable {
private static final long serialVersionUID = 1L;
@Size(min = 1, max = 50, message = "{api_scenario_follow.api_scenario_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_follow.api_scenario_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]")
private String apiScenarioId;
@Size(min = 1, max = 50, message = "{api_scenario_follow.follow_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_follow.follow_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "关注人/用户fk", required = true, allowableValues = "range[1, 50]")
private String followId;
}

View File

@ -0,0 +1,64 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景模块")
@TableName("api_scenario_module")
@Data
public class ApiScenarioModule implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_module.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "场景模块pk", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 64, message = "{api_scenario_module.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_module.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "模块名称", required = true, allowableValues = "range[1, 64]")
private String name;
@ApiModelProperty(name = "模块级别", required = true, dataType = "Integer")
private Integer level;
@ApiModelProperty(name = "排序", required = true, dataType = "Integer")
private Integer pos;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@ApiModelProperty(name = "更新时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 50, message = "{api_scenario_module.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_module.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 50]")
private String updateUser;
@Size(min = 1, max = 50, message = "{api_scenario_module.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_module.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@Size(min = 1, max = 50, message = "{api_scenario_module.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_module.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@Size(min = 1, max = 50, message = "{api_scenario_module.parent_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_module.parent_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "父级fk", required = true, allowableValues = "range[1, 50]")
private String parentId;
}

View File

@ -0,0 +1,51 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景步骤引用CASE关系记录")
@TableName("api_scenario_reference")
@Data
public class ApiScenarioReference implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_reference.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "引用关系pk", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 50, message = "{api_scenario_reference.api_scenario_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_reference.api_scenario_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]")
private String apiScenarioId;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@Size(min = 1, max = 50, message = "{api_scenario_reference.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_reference.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@Size(min = 1, max = 50, message = "{api_scenario_reference.reference_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_reference.reference_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "引用步骤fk", required = true, allowableValues = "range[1, 50]")
private String referenceId;
@ApiModelProperty(name = "引用步骤类型/REF/COPY", required = false, allowableValues = "range[1, 20]")
private String referenceType;
@ApiModelProperty(name = "步骤类型/CASE/API", required = false, allowableValues = "range[1, 20]")
private String dataType;
}

View File

@ -0,0 +1,101 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景报告")
@TableName("api_scenario_report")
@Data
public class ApiScenarioReport implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_report.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "场景报告pk", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 300, message = "{api_scenario_report.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "报告名称", required = true, allowableValues = "range[1, 300]")
private String name;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@Size(min = 1, max = 50, message = "{api_scenario_report.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@ApiModelProperty(name = "删除时间", required = false, dataType = "Long")
private Long deleteTime;
@ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 50]")
private String deleteUser;
@Size(min = 1, max = 1, message = "{api_scenario_report.deleted.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.deleted.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "删除标识", required = true, allowableValues = "range[1, 1]")
private Boolean deleted;
@Size(min = 1, max = 50, message = "{api_scenario_report.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]")
private String updateUser;
@ApiModelProperty(name = "更新时间", required = true, dataType = "Long")
private Long updateTime;
@ApiModelProperty(name = "通过率", required = false, dataType = "Long")
private Long passRate;
@Size(min = 1, max = 20, message = "{api_scenario_report.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "报告状态/SUCCESS/ERROR", required = true, allowableValues = "range[1, 20]")
private String status;
@Size(min = 1, max = 20, message = "{api_scenario_report.trigger_mode.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.trigger_mode.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "触发方式", required = true, allowableValues = "range[1, 20]")
private String triggerMode;
@Size(min = 1, max = 20, message = "{api_scenario_report.run_mode.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.run_mode.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "执行模式", required = true, allowableValues = "range[1, 20]")
private String runMode;
@Size(min = 1, max = 50, message = "{api_scenario_report.resource_pool.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.resource_pool.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源池", required = true, allowableValues = "range[1, 50]")
private String resourcePool;
@ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]")
private String versionId;
@Size(min = 1, max = 1, message = "{api_scenario_report.integrated.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.integrated.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否是集成报告", required = true, allowableValues = "range[1, 1]")
private Boolean integrated;
@Size(min = 1, max = 50, message = "{api_scenario_report.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@Size(min = 1, max = 50, message = "{api_scenario_report.scenario_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report.scenario_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]")
private String scenarioId;
}

View File

@ -0,0 +1,73 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景报告步骤结果")
@TableName("api_scenario_report_detail")
@Data
public class ApiScenarioReportDetail implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_report_detail.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 50, message = "{api_scenario_report_detail.report_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report_detail.report_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "报告fk", required = true, allowableValues = "range[1, 50]")
private String reportId;
@Size(min = 1, max = 50, message = "{api_scenario_report_detail.resource_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_scenario_report_detail.resource_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "场景中各个步骤请求唯一标识", required = true, allowableValues = "range[1, 50]")
private String resourceId;
@ApiModelProperty(name = "开始时间", required = false, dataType = "Long")
private Long startTime;
@ApiModelProperty(name = "结果状态", required = false, allowableValues = "range[1, 20]")
private String status;
@ApiModelProperty(name = "单个请求步骤时间", required = false, dataType = "Long")
private Long requestTime;
@ApiModelProperty(name = "总断言数", required = false, dataType = "Long")
private Long assertionsTotal;
@ApiModelProperty(name = "失败断言数", required = false, dataType = "Long")
private Long passAssertionsTotal;
@ApiModelProperty(name = "误报编号", required = false, allowableValues = "range[1, 200]")
private String fakeCode;
@ApiModelProperty(name = "请求名称", required = false, allowableValues = "range[1, 500]")
private String requestName;
@ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]")
private String environmentId;
@ApiModelProperty(name = "项目fk", required = false, allowableValues = "range[1, 50]")
private String projectId;
@ApiModelProperty(name = "失败总数", required = false, dataType = "Integer")
private Integer errorTotal;
@ApiModelProperty(name = "请求响应码", required = false, allowableValues = "range[1, 500]")
private String code;
@ApiModelProperty(name = "执行结果", required = false, dataType = "byte[]")
private byte[] content;
}

View File

@ -0,0 +1,28 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景报告过程日志")
@TableName("api_scenario_report_log")
@Data
public class ApiScenarioReportLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_report_log.report_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "请求资源 id", required = true, allowableValues = "range[1, 50]")
private String reportId;
@ApiModelProperty(name = "执行日志", required = false, dataType = "byte[]")
private byte[] console;
}

View File

@ -0,0 +1,28 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "场景报告结构")
@TableName("api_scenario_report_structure")
@Data
public class ApiScenarioReportStructure implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_scenario_report_structure.report_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "请求资源 id", required = true, allowableValues = "range[1, 50]")
private String reportId;
@ApiModelProperty(name = "资源步骤结构树", required = false, dataType = "byte[]")
private byte[] resourceTree;
}

View File

@ -0,0 +1,63 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口同步用例配置")
@TableName("api_sync_config")
@Data
public class ApiSyncConfig implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_sync_config.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 50, message = "{api_sync_config.resource_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_sync_config.resource_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "API/CASE 来源fk", required = true, allowableValues = "range[1, 50]")
private String resourceId;
@Size(min = 1, max = 50, message = "{api_sync_config.resource_type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_sync_config.resource_type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "来源类型/API/CASE", required = true, allowableValues = "range[1, 50]")
private String resourceType;
@ApiModelProperty(name = "是否隐藏", required = false, allowableValues = "range[1, 1]")
private Boolean hide;
@ApiModelProperty(name = "同步规则", required = false, allowableValues = "range[1, ]")
private String ruleConfig;
@Size(min = 1, max = 1, message = "{api_sync_config.notify_case_creator.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_sync_config.notify_case_creator.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否通知用例创建人", required = true, allowableValues = "range[1, 1]")
private Boolean notifyCaseCreator;
@Size(min = 1, max = 1, message = "{api_sync_config.notify_scenario_creator.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_sync_config.notify_scenario_creator.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否通知场景创建人", required = true, allowableValues = "range[1, 1]")
private Boolean notifyScenarioCreator;
@Size(min = 1, max = 1, message = "{api_sync_config.sync_enable.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_sync_config.sync_enable.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否同步用例", required = true, allowableValues = "range[1, 1]")
private Boolean syncEnable;
@ApiModelProperty(name = "是否发送通知", required = false, allowableValues = "range[1, 1]")
private Boolean noticeEnable;
}

View File

@ -0,0 +1,111 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口用例")
@TableName("api_test_case")
@Data
public class ApiTestCase implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_test_case.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口用例pk", required = true, allowableValues = "range[1, 50]")
private String id;
@Size(min = 1, max = 200, message = "{api_test_case.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口用例名称", required = true, allowableValues = "range[1, 200]")
private String name;
@ApiModelProperty(name = "创建时间", required = true, dataType = "Long")
private Long createTime;
@Size(min = 1, max = 50, message = "{api_test_case.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
@ApiModelProperty(name = "更新时间", required = true, dataType = "Long")
private Long updateTime;
@Size(min = 1, max = 50, message = "{api_test_case.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 50]")
private String updateUser;
@ApiModelProperty(name = "删除时间", required = false, dataType = "Long")
private Long deleteTime;
@ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 50]")
private String deleteUser;
@Size(min = 1, max = 1, message = "{api_test_case.deleted.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.deleted.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "删除标识", required = true, allowableValues = "range[1, 1]")
private Boolean deleted;
@Size(min = 1, max = 50, message = "{api_test_case.priority.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.priority.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用例等级", required = true, allowableValues = "range[1, 50]")
private String priority;
@ApiModelProperty(name = "接口用例编号id", required = false, dataType = "Integer")
private Integer num;
@ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 1000]")
private String tags;
@ApiModelProperty(name = "用例状态", required = false, allowableValues = "range[1, 20]")
private String status;
@ApiModelProperty(name = "最新执行结果状态", required = false, allowableValues = "range[1, 20]")
private String apiReportStatus;
@ApiModelProperty(name = "最后执行结果报告fk", required = false, allowableValues = "range[1, 50]")
private String apiReportId;
@ApiModelProperty(name = "自定义排序", required = true, dataType = "Long")
private Long pos;
@Size(min = 1, max = 1, message = "{api_test_case.sync_enable.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.sync_enable.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否开启同步", required = true, allowableValues = "range[1, 1]")
private Boolean syncEnable;
@ApiModelProperty(name = "需要同步的开始时间", required = false, dataType = "Long")
private Long syncTime;
@Size(min = 1, max = 50, message = "{api_test_case.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]")
private String projectId;
@Size(min = 1, max = 50, message = "{api_test_case.api_definition_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.api_definition_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接口fk", required = true, allowableValues = "range[1, 50]")
private String apiDefinitionId;
@ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]")
private String versionId;
@Size(min = 1, max = 50, message = "{api_test_case.principal.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case.principal.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "责任人", required = true, allowableValues = "range[1, 50]")
private String principal;
@ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]")
private String environmentId;
}

View File

@ -0,0 +1,28 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口用例详情")
@TableName("api_test_case_blob")
@Data
public class ApiTestCaseBlob implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{api_test_case_blob.api_test_case_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "接口用例pk", required = true, allowableValues = "range[1, 50]")
private String apiTestCaseId;
@ApiModelProperty(name = "请求内容", required = false, dataType = "byte[]")
private byte[] request;
}

View File

@ -0,0 +1,30 @@
package io.metersphere.api.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "接口用例关注人")
@TableName("api_test_case_follow")
@Data
public class ApiTestCaseFollow implements Serializable {
private static final long serialVersionUID = 1L;
@Size(min = 1, max = 50, message = "{api_test_case_follow.case_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case_follow.case_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用例fk", required = true, allowableValues = "range[1, 50]")
private String caseId;
@Size(min = 1, max = 50, message = "{api_test_case_follow.follow_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_test_case_follow.follow_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "关注人/用户fk", required = true, allowableValues = "range[1, 50]")
private String followId;
}