build: swagger model

This commit is contained in:
CaptainB 2023-05-12 16:31:13 +08:00
parent 9bca908204
commit 476bb47718
48 changed files with 1287 additions and 1844 deletions

View File

@ -9,6 +9,7 @@ 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模版表")
@ -16,60 +17,46 @@ import java.io.Serializable;
@Data
public class ApiTemplate implements Serializable {
private static final long serialVersionUID = 1L;
/** 模版ID */
@TableId
@NotBlank(message = "模版ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "模版ID")
@NotBlank(message = "{api_template.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "模版ID", required = true, allowableValues = "range[1, 100]")
private String id;
/** 模版名称 */
@Size(min = 1, max = 64, message = "模版名称长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "模版名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "模版名称")
@Size(min = 1, max = 64, message = "{api_template.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_template.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "模版名称", required = true, allowableValues = "range[1, 64]")
private String name;
/** 描述 */
@ApiModelProperty(name = "描述")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]")
private String description;
/** 是否是系统模版 */
@Size(min = 1, max = 1, message = "是否是系统模版长度必须在1-1之间", groups = {Created.class, Updated.class})
@NotBlank(message = "是否是系统模版不能为空", groups = {Created.class})
@ApiModelProperty(name = "是否是系统模版")
@Size(min = 1, max = 1, message = "{api_template.system.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_template.system.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否是系统模版", required = true, allowableValues = "range[1, 1]")
private Boolean system;
/** 是否是全局模版 */
@Size(min = 1, max = 1, message = "是否是全局模版长度必须在1-1之间", groups = {Created.class, Updated.class})
@NotBlank(message = "是否是全局模版不能为空", groups = {Created.class})
@ApiModelProperty(name = "是否是全局模版")
@Size(min = 1, max = 1, message = "{api_template.global.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{api_template.global.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否是全局模版", required = true, allowableValues = "range[1, 1]")
private Boolean global;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** 项目ID */
@ApiModelProperty(name = "项目ID")
@ApiModelProperty(name = "项目ID", required = false, allowableValues = "range[1, 64]")
private String projectId;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "自定义字段")
@ -16,84 +17,63 @@ import java.io.Serializable;
@Data
public class CustomField implements Serializable {
private static final long serialVersionUID = 1L;
/** 自定义字段ID */
@TableId
@NotBlank(message = "自定义字段ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "自定义字段ID")
@NotBlank(message = "{custom_field.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "自定义字段ID", required = true, allowableValues = "range[1, 100]")
private String id;
/** 自定义字段名称 */
@Size(min = 1, max = 64, message = "自定义字段名称长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "自定义字段名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "自定义字段名称")
@Size(min = 1, max = 64, message = "{custom_field.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_field.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "自定义字段名称", required = true, allowableValues = "range[1, 64]")
private String name;
/** 使用场景 */
@Size(min = 1, max = 30, message = "使用场景长度必须在1-30之间", groups = {Created.class, Updated.class})
@NotBlank(message = "使用场景不能为空", groups = {Created.class})
@ApiModelProperty(name = "使用场景")
@Size(min = 1, max = 30, message = "{custom_field.scene.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_field.scene.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "使用场景", required = true, allowableValues = "range[1, 30]")
private String scene;
/** 自定义字段类型 */
@Size(min = 1, max = 30, message = "自定义字段类型长度必须在1-30之间", groups = {Created.class, Updated.class})
@NotBlank(message = "自定义字段类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "自定义字段类型")
@Size(min = 1, max = 30, message = "{custom_field.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_field.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "自定义字段类型", required = true, allowableValues = "range[1, 30]")
private String type;
/** 自定义字段备注 */
@ApiModelProperty(name = "自定义字段备注")
@ApiModelProperty(name = "自定义字段备注", required = false, allowableValues = "range[1, 255]")
private String remark;
/** 自定义字段选项 */
@ApiModelProperty(name = "自定义字段选项")
@ApiModelProperty(name = "自定义字段选项", required = false, allowableValues = "range[1, ]")
private String options;
/** 是否是系统字段 */
@ApiModelProperty(name = "是否是系统字段")
@ApiModelProperty(name = "是否是系统字段", required = false, allowableValues = "range[1, 1]")
private Boolean system;
/** 是否是全局字段 */
@ApiModelProperty(name = "是否是全局字段")
@ApiModelProperty(name = "是否是全局字段", required = false, allowableValues = "range[1, 1]")
private Boolean global;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** 项目ID */
@ApiModelProperty(name = "项目ID")
@ApiModelProperty(name = "项目ID", required = false, allowableValues = "range[1, 64]")
private String projectId;
/** 是否关联第三方 */
@Size(min = 1, max = 1, message = "是否关联第三方长度必须在1-1之间", groups = {Created.class, Updated.class})
@NotBlank(message = "是否关联第三方不能为空", groups = {Created.class})
@ApiModelProperty(name = "是否关联第三方")
@Size(min = 1, max = 1, message = "{custom_field.third_part.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_field.third_part.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否关联第三方", required = true, allowableValues = "range[1, 1]")
private Boolean thirdPart;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.project.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 = "自定义字段关系")
@ -16,30 +15,24 @@ import java.io.Serializable;
@Data
public class CustomFieldApi implements Serializable {
private static final long serialVersionUID = 1L;
/** 资源ID */
@TableId
@NotBlank(message = "资源ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "资源ID")
@NotBlank(message = "{custom_field_api.resource_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "资源ID", required = true, allowableValues = "range[1, 50]")
private String resourceId;
/** 字段ID */
@TableId
@NotBlank(message = "字段ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "字段ID")
@NotBlank(message = "{custom_field_api.field_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "字段ID", required = true, allowableValues = "range[1, 50]")
private String fieldId;
/** 字段值 */
@ApiModelProperty(name = "字段值")
@ApiModelProperty(name = "字段值", required = false, allowableValues = "range[1, 500]")
private String value;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private byte[] textValue;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "自定义字段缺陷关系")
@ -16,30 +17,24 @@ import java.io.Serializable;
@Data
public class CustomFieldIssue implements Serializable {
private static final long serialVersionUID = 1L;
/** 资源ID */
@TableId
@NotBlank(message = "资源ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "资源ID")
@NotBlank(message = "{custom_field_issue.resource_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "资源ID", required = true, allowableValues = "range[1, 50]")
private String resourceId;
/** 字段ID */
@TableId
@NotBlank(message = "字段ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "字段ID")
@NotBlank(message = "{custom_field_issue.field_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "字段ID", required = true, allowableValues = "range[1, 50]")
private String fieldId;
/** 字段值 */
@ApiModelProperty(name = "字段值")
@ApiModelProperty(name = "字段值", required = false, allowableValues = "range[1, 1000]")
private String value;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private byte[] textValue;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "自定义模版")
@ -16,60 +17,46 @@ import java.io.Serializable;
@Data
public class CustomFieldTemplate implements Serializable {
private static final long serialVersionUID = 1L;
/** 自定义模版ID */
@TableId
@NotBlank(message = "自定义模版ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "自定义模版ID")
@NotBlank(message = "{custom_field_template.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "自定义模版ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 自定义字段ID */
@Size(min = 1, max = 50, message = "自定义字段ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "自定义字段ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "自定义字段ID")
@Size(min = 1, max = 50, message = "{custom_field_template.field_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_field_template.field_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "自定义字段ID", required = true, allowableValues = "range[1, 50]")
private String fieldId;
/** 模版ID */
@Size(min = 1, max = 50, message = "模版ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "模版ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "模版ID")
@Size(min = 1, max = 50, message = "{custom_field_template.template_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_field_template.template_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "模版ID", required = true, allowableValues = "range[1, 50]")
private String templateId;
/** 使用场景 */
@Size(min = 1, max = 30, message = "使用场景长度必须在1-30之间", groups = {Created.class, Updated.class})
@NotBlank(message = "使用场景不能为空", groups = {Created.class})
@ApiModelProperty(name = "使用场景")
@Size(min = 1, max = 30, message = "{custom_field_template.scene.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_field_template.scene.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "使用场景", required = true, allowableValues = "range[1, 30]")
private String scene;
/** 是否必填 */
@ApiModelProperty(name = "是否必填")
@ApiModelProperty(name = "是否必填", required = false, allowableValues = "range[1, 1]")
private Boolean required;
/** 排序字段 */
@ApiModelProperty(name = "排序字段")
@ApiModelProperty(name = "排序字段", required = false, allowableValues = "range[1, ]")
private Integer pos;
/** 默认值 */
@ApiModelProperty(name = "默认值")
@ApiModelProperty(name = "默认值", required = false, allowableValues = "range[1, ]")
private byte[] defaultValue;
/** 自定义数据 */
@ApiModelProperty(name = "自定义数据")
@ApiModelProperty(name = "自定义数据", required = false, allowableValues = "range[1, 255]")
private String customData;
/** 自定义表头 */
@ApiModelProperty(name = "自定义表头")
@ApiModelProperty(name = "自定义表头", required = false, allowableValues = "range[1, 1]")
private String key;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.project.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 = "自定义字段功能用例关系")
@ -16,30 +15,24 @@ import java.io.Serializable;
@Data
public class CustomFieldTestCase implements Serializable {
private static final long serialVersionUID = 1L;
/** 资源ID */
@TableId
@NotBlank(message = "资源ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "资源ID")
@NotBlank(message = "{custom_field_test_case.resource_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "资源ID", required = true, allowableValues = "range[1, 50]")
private String resourceId;
/** 字段ID */
@TableId
@NotBlank(message = "字段ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "字段ID")
@NotBlank(message = "{custom_field_test_case.field_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "字段ID", required = true, allowableValues = "range[1, 50]")
private String fieldId;
/** 字段值 */
@ApiModelProperty(name = "字段值")
@ApiModelProperty(name = "字段值", required = false, allowableValues = "range[1, 1000]")
private String value;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private String textValue;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "自定义函数-代码片段")
@ -16,60 +17,47 @@ import java.io.Serializable;
@Data
public class CustomFunction implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{custom_function.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
/** 函数名 */
@Size(min = 1, max = 255, message = "函数名长度必须在1-255之间", groups = {Created.class, Updated.class})
@NotBlank(message = "函数名不能为空", groups = {Created.class})
@ApiModelProperty(name = "函数名")
@Size(min = 1, max = 255, message = "{custom_function.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_function.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "函数名", required = true, allowableValues = "range[1, 255]")
private String name;
/** 标签 */
@ApiModelProperty(name = "标签")
@ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 1000]")
private String tags;
/** 函数描述 */
@ApiModelProperty(name = "函数描述")
@ApiModelProperty(name = "函数描述", required = false, allowableValues = "range[1, 1000]")
private String description;
/** 脚本语言类型 */
@Size(min = 1, max = 255, message = "脚本语言类型长度必须在1-255之间", groups = {Created.class, Updated.class})
@NotBlank(message = "脚本语言类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "脚本语言类型")
@Size(min = 1, max = 255, message = "{custom_function.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_function.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "脚本语言类型", required = true, allowableValues = "range[1, 255]")
private String type;
/** 创建人 */
@Size(min = 1, max = 100, message = "创建人长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人")
@Size(min = 1, max = 100, message = "{custom_function.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_function.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]")
private String createUser;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 所属项目ID */
@Size(min = 1, max = 50, message = "所属项目ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "所属项目ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "所属项目ID")
@Size(min = 1, max = 50, message = "{custom_function.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{custom_function.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "所属项目ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.project.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 = "自定义函数-代码片段大字段")
@ -16,30 +15,23 @@ import java.io.Serializable;
@Data
public class CustomFunctionBlob implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{custom_function_blob.function_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String functionId;
/** 参数列表 */
@ApiModelProperty(name = "参数列表")
@ApiModelProperty(name = "参数列表", required = false, allowableValues = "range[1, ]")
private byte[] params;
/** 函数体 */
@ApiModelProperty(name = "函数体")
@ApiModelProperty(name = "函数体", required = false, allowableValues = "range[1, ]")
private byte[] script;
/** 执行结果 */
@ApiModelProperty(name = "执行结果")
@ApiModelProperty(name = "执行结果", required = false, allowableValues = "range[1, ]")
private byte[] result;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "误报库")
@ -16,60 +17,48 @@ import java.io.Serializable;
@Data
public class FakeError implements Serializable {
private static final long serialVersionUID = 1L;
/** 误报ID */
@TableId
@NotBlank(message = "误报ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "误报ID")
@NotBlank(message = "{fake_error.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "误报ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 项目ID */
@Size(min = 1, max = 50, message = "项目ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "项目ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "项目ID")
@Size(min = 1, max = 50, message = "{fake_error.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{fake_error.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 创建人 */
@Size(min = 1, max = 64, message = "创建人长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人")
@Size(min = 1, max = 64, message = "{fake_error.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{fake_error.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 64]")
private String createUser;
/** 更新人 */
@Size(min = 1, max = 64, message = "更新人长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "更新人不能为空", groups = {Created.class})
@ApiModelProperty(name = "更新人")
@Size(min = 1, max = 64, message = "{fake_error.update_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{fake_error.update_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 64]")
private String updateUser;
/** 错误码 */
@Size(min = 1, max = 255, message = "错误码长度必须在1-255之间", groups = {Created.class, Updated.class})
@NotBlank(message = "错误码不能为空", groups = {Created.class})
@ApiModelProperty(name = "错误码")
@Size(min = 1, max = 255, message = "{fake_error.error_code.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{fake_error.error_code.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "错误码", required = true, allowableValues = "range[1, 255]")
private String errorCode;
/** 匹配类型 */
@Size(min = 1, max = 255, message = "匹配类型长度必须在1-255之间", groups = {Created.class, Updated.class})
@NotBlank(message = "匹配类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "匹配类型")
@Size(min = 1, max = 255, message = "{fake_error.match_type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{fake_error.match_type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "匹配类型", required = true, allowableValues = "range[1, 255]")
private String matchType;
/** 状态 */
@ApiModelProperty(name = "状态")
@ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 1]")
private Boolean status;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "误报库大字段")
@ -16,24 +17,19 @@ import java.io.Serializable;
@Data
public class FakeErrorBlob implements Serializable {
private static final long serialVersionUID = 1L;
/** Test ID */
@TableId
@NotBlank(message = "Test ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "Test ID")
@NotBlank(message = "{fake_error_blob.fake_error_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "Test ID", required = true, allowableValues = "range[1, 50]")
private String fakeErrorId;
/** 内容 */
@ApiModelProperty(name = "内容")
@ApiModelProperty(name = "内容", required = false, allowableValues = "range[1, ]")
private byte[] content;
/** 报告内容 */
@ApiModelProperty(name = "报告内容")
@ApiModelProperty(name = "报告内容", required = false, allowableValues = "range[1, ]")
private byte[] description;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "文件基础信息")
@ -16,114 +17,81 @@ import java.io.Serializable;
@Data
public class FileMetadata implements Serializable {
private static final long serialVersionUID = 1L;
/** 文件ID */
@TableId
@NotBlank(message = "文件ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "文件ID")
@NotBlank(message = "{file_metadata.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "文件ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 文件名 */
@Size(min = 1, max = 250, message = "文件名长度必须在1-250之间", groups = {Created.class, Updated.class})
@NotBlank(message = "文件名不能为空", groups = {Created.class})
@ApiModelProperty(name = "文件名")
@Size(min = 1, max = 250, message = "{file_metadata.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{file_metadata.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "文件名", required = true, allowableValues = "range[1, 250]")
private String name;
/** 文件类型 */
@ApiModelProperty(name = "文件类型")
@ApiModelProperty(name = "文件类型", required = false, allowableValues = "range[1, 64]")
private String type;
/** 文件大小 */
@ApiModelProperty(name = "文件大小")
@ApiModelProperty(name = "文件大小", required = true, allowableValues = "range[1, ]")
private Long size;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 项目ID */
@ApiModelProperty(name = "项目ID")
@ApiModelProperty(name = "项目ID", required = false, allowableValues = "range[1, 50]")
private String projectId;
/** 文件存储方式 */
@Size(min = 1, max = 50, message = "文件存储方式长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "文件存储方式不能为空", groups = {Created.class})
@ApiModelProperty(name = "文件存储方式")
@Size(min = 1, max = 50, message = "{file_metadata.storage.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{file_metadata.storage.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "文件存储方式", required = true, allowableValues = "range[1, 50]")
private String storage;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** 修改人 */
@ApiModelProperty(name = "修改人")
@ApiModelProperty(name = "修改人", required = false, allowableValues = "range[1, 100]")
private String updateUser;
/** 标签 */
@ApiModelProperty(name = "标签")
@ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 2000]")
private String tags;
/** 描述 */
@ApiModelProperty(name = "描述")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]")
private String description;
/** 文件所属模块 */
@ApiModelProperty(name = "文件所属模块")
@ApiModelProperty(name = "文件所属模块", required = false, allowableValues = "range[1, 50]")
private String moduleId;
/** 是否加载jar开启后用于接口测试执行时使用 */
@ApiModelProperty(name = "是否加载jar开启后用于接口测试执行时使用")
@ApiModelProperty(name = "是否加载jar开启后用于接口测试执行时使用", required = false, allowableValues = "range[1, 1]")
private Boolean loadJar;
/** 文件存储路径 */
@ApiModelProperty(name = "文件存储路径")
@ApiModelProperty(name = "文件存储路径", required = false, allowableValues = "range[1, 1000]")
private String path;
/** 资源作用范围主要兼容2.1版本前的历史数据,后续版本不再产生数据 */
@ApiModelProperty(name = "资源作用范围主要兼容2.1版本前的历史数据,后续版本不再产生数据")
@ApiModelProperty(name = "资源作用范围主要兼容2.1版本前的历史数据,后续版本不再产生数据", required = false, allowableValues = "range[1, 50]")
private String resourceType;
/** 是否是最新版 */
@ApiModelProperty(name = "是否是最新版")
@ApiModelProperty(name = "是否是最新版", required = false, allowableValues = "range[1, 1]")
private Boolean latest;
/** 同版本数据关联的ID */
@ApiModelProperty(name = "同版本数据关联的ID")
@ApiModelProperty(name = "同版本数据关联的ID", required = false, allowableValues = "range[1, 50]")
private String refId;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "文件基础信息大字段")
@ -16,18 +17,15 @@ import java.io.Serializable;
@Data
public class FileMetadataBlob implements Serializable {
private static final long serialVersionUID = 1L;
/** 文件ID */
@TableId
@NotBlank(message = "文件ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "文件ID")
@NotBlank(message = "{file_metadata_blob.file_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "文件ID", required = true, allowableValues = "range[1, 255]")
private String fileId;
/** 储存库 */
@ApiModelProperty(name = "储存库")
@ApiModelProperty(name = "储存库", required = false, allowableValues = "range[1, ]")
private byte[] gitInfo;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "文件管理模块")
@ -16,66 +17,49 @@ import java.io.Serializable;
@Data
public class FileModule implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{file_module.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 项目ID */
@Size(min = 1, max = 50, message = "项目ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "项目ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "项目ID")
@Size(min = 1, max = 50, message = "{file_module.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{file_module.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
/** 模块名称 */
@Size(min = 1, max = 64, message = "模块名称长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "模块名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "模块名称")
@Size(min = 1, max = 64, message = "{file_module.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{file_module.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "模块名称", required = true, allowableValues = "range[1, 64]")
private String name;
/** 父级ID */
@ApiModelProperty(name = "父级ID")
@ApiModelProperty(name = "父级ID", required = false, allowableValues = "range[1, 50]")
private String parentId;
/** 层数 */
@ApiModelProperty(name = "层数")
@ApiModelProperty(name = "层数", required = false, allowableValues = "range[1, ]")
private Integer level;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 排序用的标识 */
@ApiModelProperty(name = "排序用的标识")
@ApiModelProperty(name = "排序用的标识", required = false, allowableValues = "range[1, 22]")
private Double pos;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** 模块类型: module/repository */
@ApiModelProperty(name = "模块类型: module/repository")
@ApiModelProperty(name = "模块类型: module/repository", required = false, allowableValues = "range[1, 20]")
private String moduleType;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "文件管理模块大字段")
@ -16,36 +17,27 @@ import java.io.Serializable;
@Data
public class FileModuleBlob implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{file_module_blob.file_module_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String fileModuleId;
/** 存储库描述 */
@ApiModelProperty(name = "存储库描述")
@ApiModelProperty(name = "存储库描述", required = false, allowableValues = "range[1, ]")
private byte[] repositoryDesc;
/** 存储库路径 */
@ApiModelProperty(name = "存储库路径")
@ApiModelProperty(name = "存储库路径", required = false, allowableValues = "range[1, 255]")
private String repositoryPath;
/** 存储库Token */
@ApiModelProperty(name = "存储库Token")
@ApiModelProperty(name = "存储库Token", required = false, allowableValues = "range[1, 255]")
private String repositoryUserName;
/** 存储库Token */
@ApiModelProperty(name = "存储库Token")
@ApiModelProperty(name = "存储库Token", required = false, allowableValues = "range[1, 255]")
private String repositoryToken;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "项目")
@ -16,54 +17,41 @@ import java.io.Serializable;
@Data
public class Project implements Serializable {
private static final long serialVersionUID = 1L;
/** 项目ID */
@TableId
@NotBlank(message = "项目ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "项目ID")
@NotBlank(message = "{project.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 工作空间ID */
@Size(min = 1, max = 50, message = "工作空间ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "工作空间ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "工作空间ID")
@Size(min = 1, max = 50, message = "{project.workspace_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project.workspace_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "工作空间ID", required = true, allowableValues = "range[1, 50]")
private String workspaceId;
/** 项目名称 */
@Size(min = 1, max = 64, message = "项目名称长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "项目名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "项目名称")
@Size(min = 1, max = 64, message = "{project.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目名称", required = true, allowableValues = "range[1, 64]")
private String name;
/** 项目描述 */
@ApiModelProperty(name = "项目描述")
@ApiModelProperty(name = "项目描述", required = false, allowableValues = "range[1, 255]")
private String description;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]")
private String systemId;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.project.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 = "项目应用")
@ -16,24 +15,20 @@ import java.io.Serializable;
@Data
public class ProjectApplication implements Serializable {
private static final long serialVersionUID = 1L;
/** 项目ID */
@TableId
@NotBlank(message = "项目ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "项目ID")
@NotBlank(message = "{project_application.project_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
/** 配置项 */
@TableId
@NotBlank(message = "配置项不能为空", groups = {Updated.class})
@ApiModelProperty(name = "配置项")
@NotBlank(message = "{project_application.type.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "配置项", required = true, allowableValues = "range[1, 50]")
private String type;
/** 配置值 */
@ApiModelProperty(name = "配置值")
@ApiModelProperty(name = "配置值", required = false, allowableValues = "range[1, 255]")
private String typeValue;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "项目扩展")
@ -16,78 +17,56 @@ import java.io.Serializable;
@Data
public class ProjectExtend implements Serializable {
private static final long serialVersionUID = 1L;
/** 项目ID */
@TableId
@NotBlank(message = "项目ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "项目ID")
@NotBlank(message = "{project_extend.project_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]")
private String tapdId;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]")
private String jiraKey;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]")
private String zentaoId;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]")
private String azureDevopsId;
/** 用例模版ID */
@ApiModelProperty(name = "用例模版ID")
@ApiModelProperty(name = "用例模版ID", required = false, allowableValues = "range[1, 50]")
private String caseTemplateId;
/** azure 过滤需求的 parent workItem ID */
@ApiModelProperty(name = "azure 过滤需求的 parent workItem ID")
@ApiModelProperty(name = "azure 过滤需求的 parent workItem ID", required = false, allowableValues = "range[1, 50]")
private String azureFilterId;
/** 项目使用哪个平台的模板 */
@Size(min = 1, max = 20, message = "项目使用哪个平台的模板长度必须在1-20之间", groups = {Created.class, Updated.class})
@NotBlank(message = "项目使用哪个平台的模板不能为空", groups = {Created.class})
@ApiModelProperty(name = "项目使用哪个平台的模板")
@Size(min = 1, max = 20, message = "{project_extend.platform.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_extend.platform.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目使用哪个平台的模板", required = true, allowableValues = "range[1, 20]")
private String platform;
/** 是否使用第三方平台缺陷模板 */
@ApiModelProperty(name = "是否使用第三方平台缺陷模板")
@ApiModelProperty(name = "是否使用第三方平台缺陷模板", required = false, allowableValues = "range[1, 1]")
private Boolean thirdPartTemplate;
/** 是否开启版本管理 */
@ApiModelProperty(name = "是否开启版本管理")
@ApiModelProperty(name = "是否开启版本管理", required = false, allowableValues = "range[1, 1]")
private Boolean versionEnable;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private byte[] issueConfig;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 64]")
private String apiTemplateId;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "版本管理")
@ -16,72 +17,55 @@ import java.io.Serializable;
@Data
public class ProjectVersion implements Serializable {
private static final long serialVersionUID = 1L;
/** 版本ID */
@TableId
@NotBlank(message = "版本ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "版本ID")
@NotBlank(message = "{project_version.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "版本ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 项目ID */
@Size(min = 1, max = 50, message = "项目ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "项目ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "项目ID")
@Size(min = 1, max = 50, message = "{project_version.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_version.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
/** 版本名称 */
@Size(min = 1, max = 100, message = "版本名称长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "版本名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "版本名称")
@Size(min = 1, max = 100, message = "{project_version.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_version.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "版本名称", required = true, allowableValues = "range[1, 100]")
private String name;
/** 描述 */
@ApiModelProperty(name = "描述")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 200]")
private String description;
/** 状态 */
@ApiModelProperty(name = "状态")
@ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 20]")
private String status;
/** 是否是最新版 */
@Size(min = 1, max = 1, message = "是否是最新版长度必须在1-1之间", groups = {Created.class, Updated.class})
@NotBlank(message = "是否是最新版不能为空", groups = {Created.class})
@ApiModelProperty(name = "是否是最新版")
@Size(min = 1, max = 1, message = "{project_version.latest.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_version.latest.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否是最新版", required = true, allowableValues = "range[1, 1]")
private Boolean latest;
/** 发布时间 */
@ApiModelProperty(name = "发布时间")
@ApiModelProperty(name = "发布时间", required = false, allowableValues = "range[1, ]")
private Long publishTime;
/** 开始时间 */
@ApiModelProperty(name = "开始时间")
@ApiModelProperty(name = "开始时间", required = false, allowableValues = "range[1, ]")
private Long startTime;
/** 结束时间 */
@ApiModelProperty(name = "结束时间")
@ApiModelProperty(name = "结束时间", required = false, allowableValues = "range[1, ]")
private Long endTime;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 创建人 */
@Size(min = 1, max = 100, message = "创建人长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人")
@Size(min = 1, max = 100, message = "{project_version.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_version.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]")
private String createUser;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "环境")
@ -16,90 +17,65 @@ import java.io.Serializable;
@Data
public class Environment implements Serializable {
private static final long serialVersionUID = 1L;
/** Api Test Environment ID */
@TableId
@NotBlank(message = "Api Test Environment ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "Api Test Environment ID")
@NotBlank(message = "{environment.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "Api Test Environment ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** Api Test Environment Name */
@Size(min = 1, max = 64, message = "Api Test Environment Name长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Api Test Environment Name不能为空", groups = {Created.class})
@ApiModelProperty(name = "Api Test Environment Name")
@Size(min = 1, max = 64, message = "{environment.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{environment.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Api Test Environment Name", required = true, allowableValues = "range[1, 64]")
private String name;
/** Project ID */
@Size(min = 1, max = 50, message = "Project ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Project ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "Project ID")
@Size(min = 1, max = 50, message = "{environment.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{environment.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Project ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
/** Api Test Protocol */
@ApiModelProperty(name = "Api Test Protocol")
@ApiModelProperty(name = "Api Test Protocol", required = false, allowableValues = "range[1, 20]")
private String protocol;
/** Api Test Socket */
@ApiModelProperty(name = "Api Test Socket")
@ApiModelProperty(name = "Api Test Socket", required = false, allowableValues = "range[1, 225]")
private String socket;
/** Api Test Domain */
@ApiModelProperty(name = "Api Test Domain")
@ApiModelProperty(name = "Api Test Domain", required = false, allowableValues = "range[1, 225]")
private String domain;
/** Api Test Port */
@ApiModelProperty(name = "Api Test Port")
@ApiModelProperty(name = "Api Test Port", required = false, allowableValues = "range[1, ]")
private Integer port;
/** Global ariables */
@ApiModelProperty(name = "Global ariables")
@ApiModelProperty(name = "Global ariables", required = false, allowableValues = "range[1, ]")
private String variables;
/** Global Heards */
@ApiModelProperty(name = "Global Heards")
@ApiModelProperty(name = "Global Heards", required = false, allowableValues = "range[1, ]")
private String headers;
/** Config Data (JSON format) */
@ApiModelProperty(name = "Config Data (JSON format)")
@ApiModelProperty(name = "Config Data (JSON format)", required = false, allowableValues = "range[1, ]")
private String config;
/** hosts */
@ApiModelProperty(name = "hosts")
@ApiModelProperty(name = "hosts", required = false, allowableValues = "range[1, ]")
private String hosts;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private Long createTime;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private Long updateTime;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "环境组")
@ -16,48 +17,37 @@ import java.io.Serializable;
@Data
public class EnvironmentGroup implements Serializable {
private static final long serialVersionUID = 1L;
/** 环境组id */
@TableId
@NotBlank(message = "环境组id不能为空", groups = {Updated.class})
@ApiModelProperty(name = "环境组id")
@NotBlank(message = "{environment_group.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "环境组id", required = true, allowableValues = "range[1, 50]")
private String id;
/** 环境组名 */
@Size(min = 1, max = 50, message = "环境组名长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "环境组名不能为空", groups = {Created.class})
@ApiModelProperty(name = "环境组名")
@Size(min = 1, max = 50, message = "{environment_group.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{environment_group.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "环境组名", required = true, allowableValues = "range[1, 50]")
private String name;
/** 所属工作空间 */
@Size(min = 1, max = 64, message = "所属工作空间长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "所属工作空间不能为空", groups = {Created.class})
@ApiModelProperty(name = "所属工作空间")
@Size(min = 1, max = 64, message = "{environment_group.workspace_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{environment_group.workspace_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "所属工作空间", required = true, allowableValues = "range[1, 64]")
private String workspaceId;
/** 环境组描述 */
@ApiModelProperty(name = "环境组描述")
@ApiModelProperty(name = "环境组描述", required = false, allowableValues = "range[1, 255]")
private String description;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 50]")
private String createUser;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = false, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = false, allowableValues = "range[1, ]")
private Long updateTime;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.sdk.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 = "环境组配置")
@ -16,30 +15,23 @@ import java.io.Serializable;
@Data
public class EnvironmentGroupProject implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{environment_group_project.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
/** 环境组id */
@ApiModelProperty(name = "环境组id")
@ApiModelProperty(name = "环境组id", required = false, allowableValues = "range[1, 50]")
private String environmentGroupId;
/** api test environment 环境ID */
@ApiModelProperty(name = "api test environment 环境ID")
@ApiModelProperty(name = "api test environment 环境ID", required = false, allowableValues = "range[1, 50]")
private String environmentId;
/** 项目id */
@ApiModelProperty(name = "项目id")
@ApiModelProperty(name = "项目id", required = false, allowableValues = "range[1, 50]")
private String projectId;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.sdk.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 = "执行链(接口/场景/UI/性能用例)")
@ -16,48 +15,35 @@ import java.io.Serializable;
@Data
public class ExecutionQueue implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{execution_queue.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 集合报告/测试计划报告 */
@ApiModelProperty(name = "集合报告/测试计划报告")
@ApiModelProperty(name = "集合报告/测试计划报告", required = false, allowableValues = "range[1, 100]")
private String reportId;
/** 报告类型/计划报告/单独报告 */
@ApiModelProperty(name = "报告类型/计划报告/单独报告")
@ApiModelProperty(name = "报告类型/计划报告/单独报告", required = false, allowableValues = "range[1, 100]")
private String reportType;
/** 执行模式/scenario/api/test_paln_api/test_pan_scenario */
@ApiModelProperty(name = "执行模式/scenario/api/test_paln_api/test_pan_scenario")
@ApiModelProperty(name = "执行模式/scenario/api/test_paln_api/test_pan_scenario", required = false, allowableValues = "range[1, 100]")
private String runMode;
/** 执行资源池 */
@ApiModelProperty(name = "执行资源池")
@ApiModelProperty(name = "执行资源池", required = false, allowableValues = "range[1, 100]")
private String poolId;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = false, allowableValues = "range[1, ]")
private Long createTime;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 1]")
private Boolean failure;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.sdk.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 = "执行链条目")
@ -16,72 +15,51 @@ import java.io.Serializable;
@Data
public class ExecutionQueueDetail implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{execution_queue_detail.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 队列id */
@ApiModelProperty(name = "队列id")
@ApiModelProperty(name = "队列id", required = false, allowableValues = "range[1, 100]")
private String queueId;
/** 排序 */
@ApiModelProperty(name = "排序")
@ApiModelProperty(name = "排序", required = false, allowableValues = "range[1, ]")
private Integer sort;
/** 报告id */
@ApiModelProperty(name = "报告id")
@ApiModelProperty(name = "报告id", required = false, allowableValues = "range[1, 100]")
private String reportId;
/** 资源id */
@ApiModelProperty(name = "资源id")
@ApiModelProperty(name = "资源id", required = false, allowableValues = "range[1, 100]")
private String testId;
/** 环境 */
@ApiModelProperty(name = "环境")
@ApiModelProperty(name = "环境", required = false, allowableValues = "range[1, ]")
private String evnMap;
/** 资源类型 */
@ApiModelProperty(name = "资源类型")
@ApiModelProperty(name = "资源类型", required = false, allowableValues = "range[1, 100]")
private String type;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = false, allowableValues = "range[1, ]")
private Long createTime;
/** 是否开启失败重试 */
@ApiModelProperty(name = "是否开启失败重试")
@ApiModelProperty(name = "是否开启失败重试", required = false, allowableValues = "range[1, 1]")
private Boolean retryEnable;
/** 失败重试次数 */
@ApiModelProperty(name = "失败重试次数")
@ApiModelProperty(name = "失败重试次数", required = false, allowableValues = "range[1, ]")
private Long retryNumber;
/** 项目ID集合 */
@ApiModelProperty(name = "项目ID集合")
@ApiModelProperty(name = "项目ID集合", required = false, allowableValues = "range[1, 2000]")
private String projectIds;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "关系图")
@ -16,42 +17,35 @@ import java.io.Serializable;
@Data
public class RelationshipEdge implements Serializable {
private static final long serialVersionUID = 1L;
/** 源节点的ID */
@TableId
@NotBlank(message = "源节点的ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "源节点的ID")
@NotBlank(message = "{relationship_edge.source_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "源节点的ID", required = true, allowableValues = "range[1, 50]")
private String sourceId;
/** 目标节点的ID */
@TableId
@NotBlank(message = "目标节点的ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "目标节点的ID")
@NotBlank(message = "{relationship_edge.target_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "目标节点的ID", required = true, allowableValues = "range[1, 50]")
private String targetId;
/** 边的分类 */
@Size(min = 1, max = 20, message = "边的分类长度必须在1-20之间", groups = {Created.class, Updated.class})
@NotBlank(message = "边的分类不能为空", groups = {Created.class})
@ApiModelProperty(name = "边的分类")
@Size(min = 1, max = 20, message = "{relationship_edge.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{relationship_edge.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "边的分类", required = true, allowableValues = "range[1, 20]")
private String type;
/** 所属关系图的ID */
@Size(min = 1, max = 50, message = "所属关系图的ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "所属关系图的ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "所属关系图的ID")
@Size(min = 1, max = 50, message = "{relationship_edge.graph_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{relationship_edge.graph_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "所属关系图的ID", required = true, allowableValues = "range[1, 50]")
private String graphId;
/** 创建人 */
@Size(min = 1, max = 50, message = "创建人长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人")
@Size(min = 1, max = 50, message = "{relationship_edge.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{relationship_edge.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, ]")
private Long createTime;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.sdk.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 = "分享")
@ -16,48 +15,35 @@ import java.io.Serializable;
@Data
public class ShareInfo implements Serializable {
private static final long serialVersionUID = 1L;
/** 分享ID */
@TableId
@NotBlank(message = "分享ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "分享ID")
@NotBlank(message = "{share_info.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "分享ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 64]")
private String createUser;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 分享类型single batch */
@ApiModelProperty(name = "分享类型single batch")
@ApiModelProperty(name = "分享类型single batch", required = false, allowableValues = "range[1, 64]")
private String shareType;
/** 分享扩展数据 */
@ApiModelProperty(name = "分享扩展数据")
@ApiModelProperty(name = "分享扩展数据", required = false, allowableValues = "range[1, ]")
private byte[] customData;
/** 语言 */
@ApiModelProperty(name = "语言")
@ApiModelProperty(name = "语言", required = false, allowableValues = "range[1, 10]")
private String lang;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "三方认证源")
@ -16,54 +17,40 @@ import java.io.Serializable;
@Data
public class AuthSource implements Serializable {
private static final long serialVersionUID = 1L;
/** 认证源ID */
@TableId
@NotBlank(message = "认证源ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "认证源ID")
@NotBlank(message = "{auth_source.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "认证源ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 认证源配置 */
@ApiModelProperty(name = "认证源配置")
@ApiModelProperty(name = "认证源配置", required = true, allowableValues = "range[1, ]")
private byte[] configuration;
/** 状态 启用 禁用 */
@Size(min = 1, max = 64, message = "状态 启用 禁用长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "状态 启用 禁用不能为空", groups = {Created.class})
@ApiModelProperty(name = "状态 启用 禁用")
@Size(min = 1, max = 64, message = "{auth_source.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{auth_source.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "状态 启用 禁用", required = true, allowableValues = "range[1, 64]")
private String status;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 描述 */
@ApiModelProperty(name = "描述")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]")
private String description;
/** 名称 */
@ApiModelProperty(name = "名称")
@ApiModelProperty(name = "名称", required = false, allowableValues = "range[1, 60]")
private String name;
/** 类型 */
@ApiModelProperty(name = "类型")
@ApiModelProperty(name = "类型", required = false, allowableValues = "range[1, 30]")
private String type;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "")
@ -16,30 +17,23 @@ import java.io.Serializable;
@Data
public class License implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{license.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** Create timestamp */
@ApiModelProperty(name = "Create timestamp")
@ApiModelProperty(name = "Create timestamp", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** Update timestamp */
@ApiModelProperty(name = "Update timestamp")
@ApiModelProperty(name = "Update timestamp", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** license_code */
@ApiModelProperty(name = "license_code")
@ApiModelProperty(name = "license_code", required = false, allowableValues = "range[1, ]")
private String licenseCode;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "消息通知任务")
@ -16,60 +17,49 @@ import java.io.Serializable;
@Data
public class MessageTask implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{message_task.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 255]")
private String id;
/** 消息类型 */
@Size(min = 1, max = 50, message = "消息类型长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "消息类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "消息类型")
@Size(min = 1, max = 50, message = "{message_task.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{message_task.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "消息类型", required = true, allowableValues = "range[1, 50]")
private String type;
/** 通知事件类型 */
@Size(min = 1, max = 255, message = "通知事件类型长度必须在1-255之间", groups = {Created.class, Updated.class})
@NotBlank(message = "通知事件类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "通知事件类型")
@Size(min = 1, max = 255, message = "{message_task.event.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{message_task.event.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "通知事件类型", required = true, allowableValues = "range[1, 255]")
private String event;
/** 接收人id */
@Size(min = 1, max = 50, message = "接收人id长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "接收人id不能为空", groups = {Created.class})
@ApiModelProperty(name = "接收人id")
@Size(min = 1, max = 50, message = "{message_task.receiver.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{message_task.receiver.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接收人id", required = true, allowableValues = "range[1, 50]")
private String receiver;
/** 任务类型 */
@Size(min = 1, max = 64, message = "任务类型长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "任务类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "任务类型")
@Size(min = 1, max = 64, message = "{message_task.task_type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{message_task.task_type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "任务类型", required = true, allowableValues = "range[1, 64]")
private String taskType;
/** webhook地址 */
@ApiModelProperty(name = "webhook地址")
@ApiModelProperty(name = "webhook地址", required = false, allowableValues = "range[1, 255]")
private String webhook;
/** 具体测试的ID */
@Size(min = 1, max = 255, message = "具体测试的ID长度必须在1-255之间", groups = {Created.class, Updated.class})
@NotBlank(message = "具体测试的ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "具体测试的ID")
@Size(min = 1, max = 255, message = "{message_task.test_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{message_task.test_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "具体测试的ID", required = true, allowableValues = "range[1, 255]")
private String testId;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 项目ID */
@Size(min = 1, max = 64, message = "项目ID长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "项目ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "项目ID")
@Size(min = 1, max = 64, message = "{message_task.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{message_task.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 64]")
private String projectId;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "消息通知任务大字段")
@ -16,18 +17,15 @@ import java.io.Serializable;
@Data
public class MessageTaskBlob implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{message_task_blob.message_task_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 255]")
private String messageTaskId;
/** 消息模版 */
@ApiModelProperty(name = "消息模版")
@ApiModelProperty(name = "消息模版", required = false, allowableValues = "range[1, ]")
private String template;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "消息通知")
@ -16,72 +17,60 @@ import java.io.Serializable;
@Data
public class Notification implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{notification.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, ]")
private Long id;
/** 通知类型 */
@Size(min = 1, max = 30, message = "通知类型长度必须在1-30之间", groups = {Created.class, Updated.class})
@NotBlank(message = "通知类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "通知类型")
@Size(min = 1, max = 30, message = "{notification.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "通知类型", required = true, allowableValues = "range[1, 30]")
private String type;
/** 接收人 */
@Size(min = 1, max = 50, message = "接收人长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "接收人不能为空", groups = {Created.class})
@ApiModelProperty(name = "接收人")
@Size(min = 1, max = 50, message = "{notification.receiver.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.receiver.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "接收人", required = true, allowableValues = "range[1, 50]")
private String receiver;
/** 标题 */
@Size(min = 1, max = 100, message = "标题长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "标题不能为空", groups = {Created.class})
@ApiModelProperty(name = "标题")
@Size(min = 1, max = 100, message = "{notification.title.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.title.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "标题", required = true, allowableValues = "range[1, 100]")
private String title;
/** 状态 */
@Size(min = 1, max = 30, message = "状态长度必须在1-30之间", groups = {Created.class, Updated.class})
@NotBlank(message = "状态不能为空", groups = {Created.class})
@ApiModelProperty(name = "状态")
@Size(min = 1, max = 30, message = "{notification.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "状态", required = true, allowableValues = "range[1, 30]")
private String status;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 操作人 */
@Size(min = 1, max = 50, message = "操作人长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "操作人不能为空", groups = {Created.class})
@ApiModelProperty(name = "操作人")
@Size(min = 1, max = 50, message = "{notification.operator.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.operator.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "操作人", required = true, allowableValues = "range[1, 50]")
private String operator;
/** 操作 */
@Size(min = 1, max = 50, message = "操作长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "操作不能为空", groups = {Created.class})
@ApiModelProperty(name = "操作")
@Size(min = 1, max = 50, message = "{notification.operation.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.operation.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "操作", required = true, allowableValues = "range[1, 50]")
private String operation;
/** 资源ID */
@Size(min = 1, max = 50, message = "资源ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "资源ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "资源ID")
@Size(min = 1, max = 50, message = "{notification.resource_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.resource_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源ID", required = true, allowableValues = "range[1, 50]")
private String resourceId;
/** 资源类型 */
@Size(min = 1, max = 50, message = "资源类型长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "资源类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "资源类型")
@Size(min = 1, max = 50, message = "{notification.resource_type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.resource_type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源类型", required = true, allowableValues = "range[1, 50]")
private String resourceType;
/** 资源名称 */
@Size(min = 1, max = 100, message = "资源名称长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "资源名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "资源名称")
@Size(min = 1, max = 100, message = "{notification.resource_name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{notification.resource_name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源名称", required = true, allowableValues = "range[1, 100]")
private String resourceName;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "新手村")
@ -16,48 +17,36 @@ import java.io.Serializable;
@Data
public class NoviceStatistics implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{novice_statistics.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
/** 用户id */
@ApiModelProperty(name = "用户id")
@ApiModelProperty(name = "用户id", required = false, allowableValues = "range[1, 64]")
private String userId;
/** 新手引导完成的步骤 */
@Size(min = 1, max = 1, message = "新手引导完成的步骤长度必须在1-1之间", groups = {Created.class, Updated.class})
@NotBlank(message = "新手引导完成的步骤不能为空", groups = {Created.class})
@ApiModelProperty(name = "新手引导完成的步骤")
@Size(min = 1, max = 1, message = "{novice_statistics.guide_step.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{novice_statistics.guide_step.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "新手引导完成的步骤", required = true, allowableValues = "range[1, 1]")
private Boolean guideStep;
/** 新手引导的次数 */
@ApiModelProperty(name = "新手引导的次数")
@ApiModelProperty(name = "新手引导的次数", required = true, allowableValues = "range[1, ]")
private Integer guideNum;
/** data option (JSON format) */
@ApiModelProperty(name = "data option (JSON format)")
@ApiModelProperty(name = "data option (JSON format)", required = false, allowableValues = "range[1, ]")
private byte[] dataOption;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private Long createTime;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private Long updateTime;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "操作日志")
@ -16,84 +17,60 @@ import java.io.Serializable;
@Data
public class OperatingLog implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{operating_log.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 项目ID */
@Size(min = 1, max = 50, message = "项目ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "项目ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "项目ID")
@Size(min = 1, max = 50, message = "{operating_log.project_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{operating_log.project_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]")
private String projectId;
/** operating method */
@ApiModelProperty(name = "operating method")
@ApiModelProperty(name = "operating method", required = false, allowableValues = "range[1, 500]")
private String operMethod;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** 操作人 */
@ApiModelProperty(name = "操作人")
@ApiModelProperty(name = "操作人", required = false, allowableValues = "range[1, 50]")
private String operUser;
/** 资源ID */
@ApiModelProperty(name = "资源ID")
@ApiModelProperty(name = "资源ID", required = false, allowableValues = "range[1, 6000]")
private String sourceId;
/** 操作类型 */
@ApiModelProperty(name = "操作类型")
@ApiModelProperty(name = "操作类型", required = false, allowableValues = "range[1, 100]")
private String operType;
/** 操作模块 */
@ApiModelProperty(name = "操作模块")
@ApiModelProperty(name = "操作模块", required = false, allowableValues = "range[1, 100]")
private String operModule;
/** 操作标题 */
@ApiModelProperty(name = "操作标题")
@ApiModelProperty(name = "操作标题", required = false, allowableValues = "range[1, 6000]")
private String operTitle;
/** 操作路径 */
@ApiModelProperty(name = "操作路径")
@ApiModelProperty(name = "操作路径", required = false, allowableValues = "range[1, 500]")
private String operPath;
/** 操作内容 */
@ApiModelProperty(name = "操作内容")
@ApiModelProperty(name = "操作内容", required = false, allowableValues = "range[1, ]")
private byte[] operContent;
/** 操作参数 */
@ApiModelProperty(name = "操作参数")
@ApiModelProperty(name = "操作参数", required = false, allowableValues = "range[1, ]")
private byte[] operParams;
/** 操作时间 */
@ApiModelProperty(name = "操作时间")
@ApiModelProperty(name = "操作时间", required = true, allowableValues = "range[1, ]")
private Long operTime;
}

View File

@ -17,22 +17,19 @@ import java.io.Serializable;
public class OperatingLogResource implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{operating_log_resource.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]")
private String id;
/** Operating log ID */
@Size(min = 1, max = 50, message = "Operating log ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Operating log ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "Operating log ID")
@Size(min = 1, max = 50, message = "{operating_log_resource.operating_log_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{operating_log_resource.operating_log_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Operating log ID", required = true, allowableValues="range[1, 50]")
private String operatingLogId;
/** operating source id */
@Size(min = 1, max = 50, message = "operating source id长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "operating source id不能为空", groups = {Created.class})
@ApiModelProperty(name = "operating source id")
@Size(min = 1, max = 50, message = "{operating_log_resource.source_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{operating_log_resource.source_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "operating source id", required = true, allowableValues="range[1, 50]")
private String sourceId;

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "插件")
@ -16,90 +17,70 @@ import java.io.Serializable;
@Data
public class Plugin implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{plugin.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** plugin name */
@ApiModelProperty(name = "plugin name")
@ApiModelProperty(name = "plugin name", required = false, allowableValues = "range[1, 300]")
private String name;
/** Plugin id */
@Size(min = 1, max = 300, message = "Plugin id长度必须在1-300之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Plugin id不能为空", groups = {Created.class})
@ApiModelProperty(name = "Plugin id")
@Size(min = 1, max = 300, message = "{plugin.plugin_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{plugin.plugin_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Plugin id", required = true, allowableValues = "range[1, 300]")
private String pluginId;
/** Ui script id */
@Size(min = 1, max = 300, message = "Ui script id长度必须在1-300之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Ui script id不能为空", groups = {Created.class})
@ApiModelProperty(name = "Ui script id")
@Size(min = 1, max = 300, message = "{plugin.script_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{plugin.script_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Ui script id", required = true, allowableValues = "range[1, 300]")
private String scriptId;
/** Plugin clazzName */
@Size(min = 1, max = 500, message = "Plugin clazzName长度必须在1-500之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Plugin clazzName不能为空", groups = {Created.class})
@ApiModelProperty(name = "Plugin clazzName")
@Size(min = 1, max = 500, message = "{plugin.clazz_name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{plugin.clazz_name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Plugin clazzName", required = true, allowableValues = "range[1, 500]")
private String clazzName;
/** Jmeter base clazzName */
@Size(min = 1, max = 300, message = "Jmeter base clazzName长度必须在1-300之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Jmeter base clazzName不能为空", groups = {Created.class})
@ApiModelProperty(name = "Jmeter base clazzName")
@Size(min = 1, max = 300, message = "{plugin.jmeter_clazz.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{plugin.jmeter_clazz.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Jmeter base clazzName", required = true, allowableValues = "range[1, 300]")
private String jmeterClazz;
/** Plugin jar path */
@Size(min = 1, max = 300, message = "Plugin jar path长度必须在1-300之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Plugin jar path不能为空", groups = {Created.class})
@ApiModelProperty(name = "Plugin jar path")
@Size(min = 1, max = 300, message = "{plugin.source_path.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{plugin.source_path.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Plugin jar path", required = true, allowableValues = "range[1, 300]")
private String sourcePath;
/** Plugin jar name */
@Size(min = 1, max = 300, message = "Plugin jar name长度必须在1-300之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Plugin jar name不能为空", groups = {Created.class})
@ApiModelProperty(name = "Plugin jar name")
@Size(min = 1, max = 300, message = "{plugin.source_name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{plugin.source_name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Plugin jar name", required = true, allowableValues = "range[1, 300]")
private String sourceName;
/** plugin init entry class */
@ApiModelProperty(name = "plugin init entry class")
@ApiModelProperty(name = "plugin init entry class", required = false, allowableValues = "range[1, 300]")
private String execEntry;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private Long createTime;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]")
private Long updateTime;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]")
private String createUser;
/** Is xpack plugin */
@ApiModelProperty(name = "Is xpack plugin")
@ApiModelProperty(name = "Is xpack plugin", required = false, allowableValues = "range[1, 1]")
private Boolean xpack;
/** Plugin usage scenarios */
@Size(min = 1, max = 50, message = "Plugin usage scenarios长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Plugin usage scenarios不能为空", groups = {Created.class})
@ApiModelProperty(name = "Plugin usage scenarios")
@Size(min = 1, max = 50, message = "{plugin.scenario.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{plugin.scenario.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Plugin usage scenarios", required = true, allowableValues = "range[1, 50]")
private String scenario;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "插件大字段")
@ -16,24 +17,19 @@ import java.io.Serializable;
@Data
public class PluginBlob implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
@TableId
@NotBlank(message = "ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "ID")
@NotBlank(message = "{plugin_blob.plugin_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]")
private String pluginId;
/** plugin form option */
@ApiModelProperty(name = "plugin form option")
@ApiModelProperty(name = "plugin form option", required = false, allowableValues = "range[1, ]")
private byte[] formOption;
/** plugin form script */
@ApiModelProperty(name = "plugin form script")
@ApiModelProperty(name = "plugin form script", required = false, allowableValues = "range[1, ]")
private byte[] formScript;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "配额")
@ -16,90 +17,63 @@ import java.io.Serializable;
@Data
public class Quota implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{quota.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
/** 接口数量 */
@ApiModelProperty(name = "接口数量")
@ApiModelProperty(name = "接口数量", required = false, allowableValues = "range[1, ]")
private Integer api;
/** 性能测试数量 */
@ApiModelProperty(name = "性能测试数量")
@ApiModelProperty(name = "性能测试数量", required = false, allowableValues = "range[1, ]")
private Integer performance;
/** 最大并发数 */
@ApiModelProperty(name = "最大并发数")
@ApiModelProperty(name = "最大并发数", required = false, allowableValues = "range[1, ]")
private Integer maxThreads;
/** 最大执行时长 */
@ApiModelProperty(name = "最大执行时长")
@ApiModelProperty(name = "最大执行时长", required = false, allowableValues = "range[1, ]")
private Integer duration;
/** 资源池列表 */
@ApiModelProperty(name = "资源池列表")
@ApiModelProperty(name = "资源池列表", required = false, allowableValues = "range[1, 1000]")
private String resourcePool;
/** 工作空间ID */
@ApiModelProperty(name = "工作空间ID")
@ApiModelProperty(name = "工作空间ID", required = false, allowableValues = "range[1, 50]")
private String workspaceId;
/** 是否使用默认值 */
@ApiModelProperty(name = "是否使用默认值")
@ApiModelProperty(name = "是否使用默认值", required = false, allowableValues = "range[1, 1]")
private Boolean useDefault;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = false, allowableValues = "range[1, ]")
private Long updateTime;
/** 成员数量限制 */
@ApiModelProperty(name = "成员数量限制")
@ApiModelProperty(name = "成员数量限制", required = false, allowableValues = "range[1, ]")
private Integer member;
/** 项目数量限制 */
@ApiModelProperty(name = "项目数量限制")
@ApiModelProperty(name = "项目数量限制", required = false, allowableValues = "range[1, ]")
private Integer project;
/** 项目类型配额 */
@ApiModelProperty(name = "项目类型配额")
@ApiModelProperty(name = "项目类型配额", required = false, allowableValues = "range[1, 50]")
private String projectId;
/** 总vum数 */
@ApiModelProperty(name = "总vum数")
@ApiModelProperty(name = "总vum数", required = false, allowableValues = "range[1, 10]")
private Double vumTotal;
/** 消耗的vum数 */
@ApiModelProperty(name = "消耗的vum数")
@ApiModelProperty(name = "消耗的vum数", required = false, allowableValues = "range[1, 10]")
private Double vumUsed;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "定时任务")
@ -16,84 +17,63 @@ import java.io.Serializable;
@Data
public class Schedule implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{schedule.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
/** qrtz UUID */
@ApiModelProperty(name = "qrtz UUID")
@ApiModelProperty(name = "qrtz UUID", required = false, allowableValues = "range[1, 50]")
private String key;
/** 资源类型 */
@Size(min = 1, max = 50, message = "资源类型长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "资源类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "资源类型")
@Size(min = 1, max = 50, message = "{schedule.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{schedule.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "资源类型", required = true, allowableValues = "range[1, 50]")
private String type;
/** Schedule value */
@Size(min = 1, max = 255, message = "Schedule value长度必须在1-255之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Schedule value不能为空", groups = {Created.class})
@ApiModelProperty(name = "Schedule value")
@Size(min = 1, max = 255, message = "{schedule.value.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{schedule.value.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Schedule value", required = true, allowableValues = "range[1, 255]")
private String value;
/** Schedule Job Class Name */
@Size(min = 1, max = 64, message = "Schedule Job Class Name长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Schedule Job Class Name不能为空", groups = {Created.class})
@ApiModelProperty(name = "Schedule Job Class Name")
@Size(min = 1, max = 64, message = "{schedule.job.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{schedule.job.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Schedule Job Class Name", required = true, allowableValues = "range[1, 64]")
private String job;
/** Schedule Eable */
@ApiModelProperty(name = "Schedule Eable")
@ApiModelProperty(name = "Schedule Eable", required = false, allowableValues = "range[1, 1]")
private Boolean enable;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]")
private String resourceId;
/** 创建人 */
@Size(min = 1, max = 50, message = "创建人长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人")
@Size(min = 1, max = 50, message = "{schedule.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{schedule.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
/** Create timestamp */
@ApiModelProperty(name = "Create timestamp")
@ApiModelProperty(name = "Create timestamp", required = false, allowableValues = "range[1, ]")
private Long createTime;
/** Update timestamp */
@ApiModelProperty(name = "Update timestamp")
@ApiModelProperty(name = "Update timestamp", required = false, allowableValues = "range[1, ]")
private Long updateTime;
/** 项目ID */
@ApiModelProperty(name = "项目ID")
@ApiModelProperty(name = "项目ID", required = false, allowableValues = "range[1, 50]")
private String projectId;
/** 名称 */
@ApiModelProperty(name = "名称")
@ApiModelProperty(name = "名称", required = false, allowableValues = "range[1, 100]")
private String name;
/** 配置 */
@ApiModelProperty(name = "配置")
@ApiModelProperty(name = "配置", required = false, allowableValues = "range[1, 1000]")
private String config;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "服务集成")
@ -16,30 +17,24 @@ import java.io.Serializable;
@Data
public class ServiceIntegration implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{service_integration.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]")
private String id;
/** 平台 */
@Size(min = 1, max = 50, message = "平台长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "平台不能为空", groups = {Created.class})
@ApiModelProperty(name = "平台")
@Size(min = 1, max = 50, message = "{service_integration.platform.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{service_integration.platform.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "平台", required = true, allowableValues = "range[1, 50]")
private String platform;
/** */
@ApiModelProperty(name = "")
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, ]")
private byte[] configuration;
/** 工作空间ID */
@ApiModelProperty(name = "工作空间ID")
@ApiModelProperty(name = "工作空间ID", required = false, allowableValues = "range[1, 50]")
private String workspaceId;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "系统参数")
@ -16,24 +17,20 @@ import java.io.Serializable;
@Data
public class SystemParameter implements Serializable {
private static final long serialVersionUID = 1L;
/** 参数名称 */
@TableId
@NotBlank(message = "参数名称不能为空", groups = {Updated.class})
@ApiModelProperty(name = "参数名称")
@NotBlank(message = "{system_parameter.param_key.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "参数名称", required = true, allowableValues = "range[1, 64]")
private String paramKey;
/** 参数值 */
@ApiModelProperty(name = "参数值")
@ApiModelProperty(name = "参数值", required = false, allowableValues = "range[1, 255]")
private String paramValue;
/** 类型 */
@Size(min = 1, max = 100, message = "类型长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "类型")
@Size(min = 1, max = 100, message = "{system_parameter.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{system_parameter.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "类型", required = true, allowableValues = "range[1, 100]")
private String type;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "测试资源池节点")
@ -16,42 +17,33 @@ import java.io.Serializable;
@Data
public class TestResource implements Serializable {
private static final long serialVersionUID = 1L;
/** Test resource ID */
@TableId
@NotBlank(message = "Test resource ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "Test resource ID")
@NotBlank(message = "{test_resource.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "Test resource ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** Test resource pool ID this test resource belongs to */
@Size(min = 1, max = 50, message = "Test resource pool ID this test resource belongs to长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Test resource pool ID this test resource belongs to不能为空", groups = {Created.class})
@ApiModelProperty(name = "Test resource pool ID this test resource belongs to")
@Size(min = 1, max = 50, message = "{test_resource.test_resource_pool_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{test_resource.test_resource_pool_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Test resource pool ID this test resource belongs to", required = true, allowableValues = "range[1, 50]")
private String testResourcePoolId;
/** Test resource configuration */
@ApiModelProperty(name = "Test resource configuration")
@ApiModelProperty(name = "Test resource configuration", required = false, allowableValues = "range[1, ]")
private byte[] configuration;
/** Test resource status */
@Size(min = 1, max = 64, message = "Test resource status长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "Test resource status不能为空", groups = {Created.class})
@ApiModelProperty(name = "Test resource status")
@Size(min = 1, max = 64, message = "{test_resource.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{test_resource.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "Test resource status", required = true, allowableValues = "range[1, 64]")
private String status;
/** Create timestamp */
@ApiModelProperty(name = "Create timestamp")
@ApiModelProperty(name = "Create timestamp", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** Update timestamp */
@ApiModelProperty(name = "Update timestamp")
@ApiModelProperty(name = "Update timestamp", required = true, allowableValues = "range[1, ]")
private Long updateTime;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "测试资源池")
@ -16,84 +17,62 @@ import java.io.Serializable;
@Data
public class TestResourcePool implements Serializable {
private static final long serialVersionUID = 1L;
/** 资源池ID */
@TableId
@NotBlank(message = "资源池ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "资源池ID")
@NotBlank(message = "{test_resource_pool.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "资源池ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 名称 */
@Size(min = 1, max = 64, message = "名称长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "名称")
@Size(min = 1, max = 64, message = "{test_resource_pool.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{test_resource_pool.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "名称", required = true, allowableValues = "range[1, 64]")
private String name;
/** 类型 */
@Size(min = 1, max = 30, message = "类型长度必须在1-30之间", groups = {Created.class, Updated.class})
@NotBlank(message = "类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "类型")
@Size(min = 1, max = 30, message = "{test_resource_pool.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{test_resource_pool.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "类型", required = true, allowableValues = "range[1, 30]")
private String type;
/** 描述 */
@ApiModelProperty(name = "描述")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]")
private String description;
/** 状态 */
@Size(min = 1, max = 64, message = "状态长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "状态不能为空", groups = {Created.class})
@ApiModelProperty(name = "状态")
@Size(min = 1, max = 64, message = "{test_resource_pool.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{test_resource_pool.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "状态", required = true, allowableValues = "range[1, 64]")
private String status;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 性能测试镜像 */
@ApiModelProperty(name = "性能测试镜像")
@ApiModelProperty(name = "性能测试镜像", required = false, allowableValues = "range[1, 100]")
private String image;
/** 性能测试jvm配置 */
@ApiModelProperty(name = "性能测试jvm配置")
@ApiModelProperty(name = "性能测试jvm配置", required = false, allowableValues = "range[1, 200]")
private String heap;
/** 性能测试gc配置 */
@ApiModelProperty(name = "性能测试gc配置")
@ApiModelProperty(name = "性能测试gc配置", required = false, allowableValues = "range[1, 200]")
private String gcAlgo;
/** 创建人 */
@ApiModelProperty(name = "创建人")
@ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]")
private String createUser;
/** 是否用于接口测试 */
@ApiModelProperty(name = "是否用于接口测试")
@ApiModelProperty(name = "是否用于接口测试", required = false, allowableValues = "range[1, 1]")
private Boolean api;
/** 是否用于性能测试 */
@ApiModelProperty(name = "是否用于性能测试")
@ApiModelProperty(name = "是否用于性能测试", required = false, allowableValues = "range[1, 1]")
private Boolean performance;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "用户")
@ -16,84 +17,64 @@ import java.io.Serializable;
@Data
public class User implements Serializable {
private static final long serialVersionUID = 1L;
/** 用户ID */
@TableId
@NotBlank(message = "用户ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "用户ID")
@NotBlank(message = "{user.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 用户名 */
@Size(min = 1, max = 64, message = "用户名长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "用户名不能为空", groups = {Created.class})
@ApiModelProperty(name = "用户名")
@Size(min = 1, max = 64, message = "{user.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用户名", required = true, allowableValues = "range[1, 64]")
private String name;
/** 用户邮箱 */
@Size(min = 1, max = 64, message = "用户邮箱长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "用户邮箱不能为空", groups = {Created.class})
@ApiModelProperty(name = "用户邮箱")
@Size(min = 1, max = 64, message = "{user.email.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user.email.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用户邮箱", required = true, allowableValues = "range[1, 64]")
private String email;
/** 用户密码 */
@ApiModelProperty(name = "用户密码")
@ApiModelProperty(name = "用户密码", required = false, allowableValues = "range[1, 256]")
private String password;
/** 用户状态,启用或禁用 */
@Size(min = 1, max = 50, message = "用户状态启用或禁用长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "用户状态,启用或禁用不能为空", groups = {Created.class})
@ApiModelProperty(name = "用户状态,启用或禁用")
@Size(min = 1, max = 50, message = "{user.status.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user.status.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用户状态,启用或禁用", required = true, allowableValues = "range[1, 50]")
private String status;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 语言 */
@ApiModelProperty(name = "语言")
@ApiModelProperty(name = "语言", required = false, allowableValues = "range[1, 30]")
private String language;
/** 当前工作空间ID */
@ApiModelProperty(name = "当前工作空间ID")
@ApiModelProperty(name = "当前工作空间ID", required = false, allowableValues = "range[1, 50]")
private String lastWorkspaceId;
/** 手机号 */
@ApiModelProperty(name = "手机号")
@ApiModelProperty(name = "手机号", required = false, allowableValues = "range[1, 50]")
private String phone;
/** 来源LOCAL OIDC CAS */
@Size(min = 1, max = 50, message = "来源LOCAL OIDC CAS长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "来源LOCAL OIDC CAS不能为空", groups = {Created.class})
@ApiModelProperty(name = "来源LOCAL OIDC CAS")
@Size(min = 1, max = 50, message = "{user.source.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user.source.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "来源LOCAL OIDC CAS", required = true, allowableValues = "range[1, 50]")
private String source;
/** 当前项目ID */
@ApiModelProperty(name = "当前项目ID")
@ApiModelProperty(name = "当前项目ID", required = false, allowableValues = "range[1, 50]")
private String lastProjectId;
/** 创建人 */
@Size(min = 1, max = 100, message = "创建人长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人")
@Size(min = 1, max = 100, message = "{user.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]")
private String createUser;
}

View File

@ -2,13 +2,12 @@ package io.metersphere.system.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 = "用户扩展")
@ -16,24 +15,19 @@ import java.io.Serializable;
@Data
public class UserExtend implements Serializable {
private static final long serialVersionUID = 1L;
/** 用户ID */
@TableId
@NotBlank(message = "用户ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "用户ID")
@NotBlank(message = "{user_extend.user_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]")
private String userId;
/** 其他平台对接信息 */
@ApiModelProperty(name = "其他平台对接信息")
@ApiModelProperty(name = "其他平台对接信息", required = false, allowableValues = "range[1, 2000]")
private byte[] platformInfo;
/** UI本地调试地址 */
@ApiModelProperty(name = "UI本地调试地址")
@ApiModelProperty(name = "UI本地调试地址", required = false, allowableValues = "range[1, 255]")
private String seleniumServer;
}

View File

@ -9,6 +9,7 @@ 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 key")
@ -16,42 +17,34 @@ import java.io.Serializable;
@Data
public class UserKey implements Serializable {
private static final long serialVersionUID = 1L;
/** user_key ID */
@TableId
@NotBlank(message = "user_key ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "user_key ID")
@NotBlank(message = "{user_key.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "user_key ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 用户ID */
@Size(min = 1, max = 50, message = "用户ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "用户ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "用户ID")
@Size(min = 1, max = 50, message = "{user_key.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_key.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]")
private String createUser;
/** access_key */
@Size(min = 1, max = 50, message = "access_key长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "access_key不能为空", groups = {Created.class})
@ApiModelProperty(name = "access_key")
@Size(min = 1, max = 50, message = "{user_key.access_key.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_key.access_key.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "access_key", required = true, allowableValues = "range[1, 50]")
private String accessKey;
/** secret key */
@Size(min = 1, max = 50, message = "secret key长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "secret key不能为空", groups = {Created.class})
@ApiModelProperty(name = "secret key")
@Size(min = 1, max = 50, message = "{user_key.secret_key.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_key.secret_key.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "secret key", required = true, allowableValues = "range[1, 50]")
private String secretKey;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 状态 */
@ApiModelProperty(name = "状态")
@ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 10]")
private String status;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "用户组")
@ -16,60 +17,48 @@ import java.io.Serializable;
@Data
public class UserRole implements Serializable {
private static final long serialVersionUID = 1L;
/** 组ID */
@TableId
@NotBlank(message = "组ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "组ID")
@NotBlank(message = "{user_role.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "组ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 组名称 */
@Size(min = 1, max = 64, message = "组名称长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "组名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "组名称")
@Size(min = 1, max = 64, message = "{user_role.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "组名称", required = true, allowableValues = "range[1, 64]")
private String name;
/** 描述 */
@ApiModelProperty(name = "描述")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 100]")
private String description;
/** 是否是系统用户组 */
@Size(min = 1, max = 1, message = "是否是系统用户组长度必须在1-1之间", groups = {Created.class, Updated.class})
@NotBlank(message = "是否是系统用户组不能为空", groups = {Created.class})
@ApiModelProperty(name = "是否是系统用户组")
@Size(min = 1, max = 1, message = "{user_role.system.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role.system.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "是否是系统用户组", required = true, allowableValues = "range[1, 1]")
private Boolean system;
/** 所属类型 */
@Size(min = 1, max = 20, message = "所属类型长度必须在1-20之间", groups = {Created.class, Updated.class})
@NotBlank(message = "所属类型不能为空", groups = {Created.class})
@ApiModelProperty(name = "所属类型")
@Size(min = 1, max = 20, message = "{user_role.type.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role.type.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "所属类型", required = true, allowableValues = "range[1, 20]")
private String type;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 创建人(操作人) */
@Size(min = 1, max = 64, message = "创建人(操作人长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人(操作人)不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人(操作人)")
@Size(min = 1, max = 64, message = "{user_role.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人(操作人)", required = true, allowableValues = "range[1, 64]")
private String createUser;
/** 应用范围 */
@Size(min = 1, max = 64, message = "应用范围长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "应用范围不能为空", groups = {Created.class})
@ApiModelProperty(name = "应用范围")
@Size(min = 1, max = 64, message = "{user_role.scope_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role.scope_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "应用范围", required = true, allowableValues = "range[1, 64]")
private String scopeId;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "用户组权限")
@ -16,30 +17,25 @@ import java.io.Serializable;
@Data
public class UserRolePermission implements Serializable {
private static final long serialVersionUID = 1L;
/** */
@TableId
@NotBlank(message = "不能为空", groups = {Updated.class})
@ApiModelProperty(name = "")
@NotBlank(message = "{user_role_permission.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "", required = true, allowableValues = "range[1, 64]")
private String id;
/** 用户组ID */
@Size(min = 1, max = 64, message = "用户组ID长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "用户组ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "用户组ID")
@Size(min = 1, max = 64, message = "{user_role_permission.role_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role_permission.role_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用户组ID", required = true, allowableValues = "range[1, 64]")
private String roleId;
/** 权限ID */
@Size(min = 1, max = 128, message = "权限ID长度必须在1-128之间", groups = {Created.class, Updated.class})
@NotBlank(message = "权限ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "权限ID")
@Size(min = 1, max = 128, message = "{user_role_permission.permission_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role_permission.permission_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "权限ID", required = true, allowableValues = "range[1, 128]")
private String permissionId;
/** 功能菜单 */
@Size(min = 1, max = 64, message = "功能菜单长度必须在1-64之间", groups = {Created.class, Updated.class})
@NotBlank(message = "功能菜单不能为空", groups = {Created.class})
@ApiModelProperty(name = "功能菜单")
@Size(min = 1, max = 64, message = "{user_role_permission.module_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role_permission.module_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "功能菜单", required = true, allowableValues = "range[1, 64]")
private String moduleId;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "用户组关系")
@ -16,42 +17,34 @@ import java.io.Serializable;
@Data
public class UserRoleRelation implements Serializable {
private static final long serialVersionUID = 1L;
/** 用户组关系ID */
@TableId
@NotBlank(message = "用户组关系ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "用户组关系ID")
@NotBlank(message = "{user_role_relation.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "用户组关系ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 用户ID */
@Size(min = 1, max = 50, message = "用户ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "用户ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "用户ID")
@Size(min = 1, max = 50, message = "{user_role_relation.user_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role_relation.user_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]")
private String userId;
/** 组ID */
@Size(min = 1, max = 50, message = "组ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "组ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "组ID")
@Size(min = 1, max = 50, message = "{user_role_relation.role_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role_relation.role_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "组ID", required = true, allowableValues = "range[1, 50]")
private String roleId;
/** 工作空间或项目ID */
@Size(min = 1, max = 50, message = "工作空间或项目ID长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "工作空间或项目ID不能为空", groups = {Created.class})
@ApiModelProperty(name = "工作空间或项目ID")
@Size(min = 1, max = 50, message = "{user_role_relation.source_id.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{user_role_relation.source_id.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "工作空间或项目ID", required = true, allowableValues = "range[1, 50]")
private String sourceId;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
}

View File

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "工作空间")
@ -16,42 +17,33 @@ import java.io.Serializable;
@Data
public class Workspace implements Serializable {
private static final long serialVersionUID = 1L;
/** 工作空间ID */
@TableId
@NotBlank(message = "工作空间ID不能为空", groups = {Updated.class})
@ApiModelProperty(name = "工作空间ID")
@NotBlank(message = "{workspace.id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "工作空间ID", required = true, allowableValues = "range[1, 50]")
private String id;
/** 工作空间名称 */
@Size(min = 1, max = 100, message = "工作空间名称长度必须在1-100之间", groups = {Created.class, Updated.class})
@NotBlank(message = "工作空间名称不能为空", groups = {Created.class})
@ApiModelProperty(name = "工作空间名称")
@Size(min = 1, max = 100, message = "{workspace.name.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{workspace.name.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "工作空间名称", required = true, allowableValues = "range[1, 100]")
private String name;
/** 描述 */
@ApiModelProperty(name = "描述")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]")
private String description;
/** 创建时间 */
@ApiModelProperty(name = "创建时间")
@ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]")
private Long createTime;
/** 更新时间 */
@ApiModelProperty(name = "更新时间")
@ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]")
private Long updateTime;
/** 创建人 */
@Size(min = 1, max = 50, message = "创建人长度必须在1-50之间", groups = {Created.class, Updated.class})
@NotBlank(message = "创建人不能为空", groups = {Created.class})
@ApiModelProperty(name = "创建人")
@Size(min = 1, max = 50, message = "{workspace.create_user.length_range}", groups = {Created.class, Updated.class})
@NotBlank(message = "{workspace.create_user.not_blank}", groups = {Created.class})
@ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]")
private String createUser;
}