build: model extend

This commit is contained in:
CaptainB 2023-05-18 19:47:48 +08:00 committed by 刘瑞斌
parent 5bb6842ba8
commit ca23904716
10 changed files with 52 additions and 31 deletions

View File

@ -9,13 +9,15 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "性能测试用例大字段")
@TableName("load_test_blob")
@Data
public class LoadTestBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class LoadTestBlob extends LoadTest implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{load_test_blob.test_id.not_blank}", groups = {Updated.class})

View File

@ -7,13 +7,15 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "性能报告大字段")
@TableName("load_test_report_blob")
@Data
public class LoadTestReportBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class LoadTestReportBlob extends LoadTestReport implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{load_test_report_blob.report_id.not_blank}", groups = {Updated.class})

View File

@ -7,13 +7,15 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "自定义函数-代码片段大字段")
@TableName("custom_function_blob")
@Data
public class CustomFunctionBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class CustomFunctionBlob extends CustomFunction implements Serializable {
private static final long serialVersionUID = 1L;
@TableId

View File

@ -9,13 +9,15 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "误报库大字段")
@TableName("fake_error_blob")
@Data
public class FakeErrorBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class FakeErrorBlob extends FakeError implements Serializable {
private static final long serialVersionUID = 1L;
@TableId

View File

@ -9,13 +9,15 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "文件基础信息大字段")
@TableName("file_metadata_blob")
@Data
public class FileMetadataBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class FileMetadataBlob extends FileMetadata implements Serializable {
private static final long serialVersionUID = 1L;
@TableId

View File

@ -9,13 +9,15 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "文件管理模块大字段")
@TableName("file_module_blob")
@Data
public class FileModuleBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class FileModuleBlob extends FileModule implements Serializable {
private static final long serialVersionUID = 1L;
@TableId

View File

@ -9,13 +9,15 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "消息通知任务大字段")
@TableName("message_task_blob")
@Data
public class MessageTaskBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class MessageTaskBlob extends MessageTask implements Serializable {
private static final long serialVersionUID = 1L;
@TableId

View File

@ -9,12 +9,15 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "自定义指令大字段")
@TableName("ui_custom_command_blob")
@Data
public class UiCustomCommandBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class UiCustomCommandBlob extends UiCustomCommand implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{ui_custom_command_blob.scenario_id.not_blank}", groups = {Updated.class})

View File

@ -9,29 +9,32 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "场景大字段")
@TableName("ui_scenario_blob")
@Data
public class UiScenarioBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class UiScenarioBlob extends UiScenario implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{ui_scenario_blob.scenario_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]")
@ApiModelProperty(name = "场景ID", required = true, allowableValues = "range[1, 255]")
private String scenarioId;
@ApiModelProperty(name = "场景定义", required = false, allowableValues="range[1, ]")
@ApiModelProperty(name = "场景定义", required = false, allowableValues = "range[1, ]")
private byte[] scenarioDefinition;
@ApiModelProperty(name = "描述", required = false, allowableValues="range[1, ]")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, ]")
private byte[] description;
@ApiModelProperty(name = "环境", required = false, allowableValues="range[1, ]")
@ApiModelProperty(name = "环境", required = false, allowableValues = "range[1, ]")
private byte[] environmentJson;
}

View File

@ -2,32 +2,33 @@ package io.metersphere.ui.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 lombok.EqualsAndHashCode;
import java.io.Serializable;
@ApiModel(value = "场景报告大字段")
@TableName("ui_scenario_report_blob")
@Data
public class UiScenarioReportBlob implements Serializable {
@EqualsAndHashCode(callSuper=false)
public class UiScenarioReportBlob extends UiScenarioReport implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@NotBlank(message = "{ui_scenario_report_blob.report_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]")
@ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]")
private String reportId;
@ApiModelProperty(name = "描述", required = false, allowableValues="range[1, ]")
@ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, ]")
private byte[] description;
@ApiModelProperty(name = "执行环境配置", required = false, allowableValues="range[1, ]")
@ApiModelProperty(name = "执行环境配置", required = false, allowableValues = "range[1, ]")
private byte[] envConfig;
}