build: ui domain

This commit is contained in:
CaptainB 2023-05-31 09:59:42 +08:00
parent a732f121dd
commit 30198dc8c6
16 changed files with 79 additions and 137 deletions

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -38,9 +36,7 @@ public class UiCustomCommand implements Serializable {
@Size(min = 1, max = 255, message = "{ui_custom_command.name.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 255, message = "{ui_custom_command.name.length_range}", groups = {Created.class, Updated.class})
private String name; private String name;
@Schema(title = "用例等级", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "用例等级")
@NotBlank(message = "{ui_custom_command.level.not_blank}", groups = {Created.class})
@Size(min = 1, max = 100, message = "{ui_custom_command.level.length_range}", groups = {Created.class, Updated.class})
private String level; private String level;
@Schema(title = "状态", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
@ -63,19 +59,17 @@ public class UiCustomCommand implements Serializable {
private String lastResult; private String lastResult;
@Schema(title = "num", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "num", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command.num.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_custom_command.num.not_blank}", groups = {Created.class})
@Size(min = 1, max = 10, message = "{ui_custom_command.num.length_range}", groups = {Created.class, Updated.class})
private Integer num; private Integer num;
@Schema(title = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command.deleted.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_custom_command.deleted.not_blank}", groups = {Created.class})
@Size(min = 1, max = 1, message = "{ui_custom_command.deleted.length_range}", groups = {Created.class, Updated.class})
private Boolean deleted; private Boolean deleted;
@Schema(title = "自定义num") @Schema(title = "自定义num")
private String customNum; private String customNum;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
@Schema(title = "删除时间") @Schema(title = "删除时间")
@ -85,8 +79,7 @@ public class UiCustomCommand implements Serializable {
private String deleteUser; private String deleteUser;
@Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command.pos.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_custom_command.pos.not_blank}", groups = {Created.class})
@Size(min = 1, max = 19, message = "{ui_custom_command.pos.length_range}", groups = {Created.class, Updated.class})
private Long pos; private Long pos;
@Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED)
@ -100,8 +93,7 @@ public class UiCustomCommand implements Serializable {
private String refId; private String refId;
@Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command.latest.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_custom_command.latest.not_blank}", groups = {Created.class})
@Size(min = 1, max = 1, message = "{ui_custom_command.latest.length_range}", groups = {Created.class, Updated.class})
private Boolean latest; private Boolean latest;
@Schema(title = "描述") @Schema(title = "描述")

View File

@ -1,17 +1,15 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@Data @Data
public class UiCustomCommandBlob implements Serializable { public class UiCustomCommandBlob implements Serializable {
@Schema(title = "场景ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "场景ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command_blob.id.not_blank}", groups = {Created.class, Updated.class}) @NotBlank(message = "{ui_custom_command_blob.id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 50, message = "{ui_custom_command_blob.id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_custom_command_blob.id.length_range}", groups = {Created.class, Updated.class})
private String id; private String id;

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -31,8 +29,7 @@ public class UiCustomCommandModule implements Serializable {
private String parentId; private String parentId;
@Schema(title = "模块等级", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "模块等级", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command_module.level.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_custom_command_module.level.not_blank}", groups = {Created.class})
@Size(min = 1, max = 10, message = "{ui_custom_command_module.level.length_range}", groups = {Created.class, Updated.class})
private Integer level; private Integer level;
@Schema(title = "创建时间") @Schema(title = "创建时间")
@ -42,11 +39,10 @@ public class UiCustomCommandModule implements Serializable {
private Long updateTime; private Long updateTime;
@Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command_module.pos.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_custom_command_module.pos.not_blank}", groups = {Created.class})
@Size(min = 1, max = 22, message = "{ui_custom_command_module.pos.length_range}", groups = {Created.class, Updated.class})
private Double pos; private Double pos;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -16,8 +14,7 @@ public class UiElement implements Serializable {
private String id; private String id;
@Schema(title = "元素num", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "元素num", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element.num.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_element.num.not_blank}", groups = {Created.class})
@Size(min = 1, max = 10, message = "{ui_element.num.length_range}", groups = {Created.class, Updated.class})
private Integer num; private Integer num;
@Schema(title = "元素所属模块id", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "元素所属模块id", requiredMode = Schema.RequiredMode.REQUIRED)
@ -45,10 +42,10 @@ public class UiElement implements Serializable {
@Size(min = 1, max = 300, message = "{ui_element.location.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 300, message = "{ui_element.location.length_range}", groups = {Created.class, Updated.class})
private String location; private String location;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
@Schema(title = "更新人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "更新人")
private String updateUser; private String updateUser;
@Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED)
@ -62,13 +59,11 @@ public class UiElement implements Serializable {
private String refId; private String refId;
@Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element.pos.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_element.pos.not_blank}", groups = {Created.class})
@Size(min = 1, max = 19, message = "{ui_element.pos.length_range}", groups = {Created.class, Updated.class})
private Long pos; private Long pos;
@Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element.latest.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_element.latest.not_blank}", groups = {Created.class})
@Size(min = 1, max = 1, message = "{ui_element.latest.length_range}", groups = {Created.class, Updated.class})
private Boolean latest; private Boolean latest;
@Schema(title = "元素描述") @Schema(title = "元素描述")

View File

@ -1,37 +1,35 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@Data @Data
public class UiElementCommandReference implements Serializable { public class UiElementCommandReference implements Serializable {
@Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_command_reference.id.not_blank}", groups = {Created.class, Updated.class}) @NotBlank(message = "{ui_element_command_reference.id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 50, message = "{ui_element_command_reference.id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_command_reference.id.length_range}", groups = {Created.class, Updated.class})
private String id; private String id;
@Schema(title = "元素ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "元素ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_command_reference.element_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_element_command_reference.element_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_element_command_reference.element_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_command_reference.element_id.length_range}", groups = {Created.class, Updated.class})
private String elementId; private String elementId;
@Schema(title = "元素模块ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "元素模块ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_command_reference.element_module_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_element_command_reference.element_module_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_element_command_reference.element_module_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_command_reference.element_module_id.length_range}", groups = {Created.class, Updated.class})
private String elementModuleId; private String elementModuleId;
@Schema(title = "指令ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "指令ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_command_reference.command_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_element_command_reference.command_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_element_command_reference.command_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_command_reference.command_id.length_range}", groups = {Created.class, Updated.class})
private String commandId; private String commandId;
@Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_command_reference.project_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_element_command_reference.project_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_element_command_reference.project_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_command_reference.project_id.length_range}", groups = {Created.class, Updated.class})
private String projectId; private String projectId;

View File

@ -1,38 +1,35 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@Data @Data
public class UiElementModule implements Serializable { public class UiElementModule implements Serializable {
@Schema(title = "模块ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "模块ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_module.id.not_blank}", groups = {Created.class, Updated.class}) @NotBlank(message = "{ui_element_module.id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 50, message = "{ui_element_module.id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_module.id.length_range}", groups = {Created.class, Updated.class})
private String id; private String id;
@Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_module.project_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_element_module.project_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_element_module.project_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_module.project_id.length_range}", groups = {Created.class, Updated.class})
private String projectId; private String projectId;
@Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_module.name.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_element_module.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 255, message = "{ui_element_module.name.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 255, message = "{ui_element_module.name.length_range}", groups = {Created.class, Updated.class})
private String name; private String name;
@Schema(title = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_module.parent_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_element_module.parent_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_element_module.parent_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_element_module.parent_id.length_range}", groups = {Created.class, Updated.class})
private String parentId; private String parentId;
@Schema(title = "模块等级", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "模块等级", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_module.level.not_blank}", groups = {Updated.class}) @NotNull(message = "{ui_element_module.level.not_blank}", groups = {Created.class})
@Size(min = 1, max = 10, message = "{ui_element_module.level.length_range}", groups = {Created.class, Updated.class})
private Integer level; private Integer level;
@Schema(title = "创建时间") @Schema(title = "创建时间")
@ -42,11 +39,10 @@ public class UiElementModule implements Serializable {
private Long updateTime; private Long updateTime;
@Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_element_module.pos.not_blank}", groups = {Updated.class}) @NotNull(message = "{ui_element_module.pos.not_blank}", groups = {Created.class})
@Size(min = 1, max = 22, message = "{ui_element_module.pos.length_range}", groups = {Created.class, Updated.class})
private Double pos; private Double pos;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -49,8 +47,7 @@ public class UiScenario implements Serializable {
private String principal; private String principal;
@Schema(title = "步骤总数", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "步骤总数", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario.step_total.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario.step_total.not_blank}", groups = {Created.class})
@Size(min = 1, max = 10, message = "{ui_scenario.step_total.length_range}", groups = {Created.class, Updated.class})
private Integer stepTotal; private Integer stepTotal;
@Schema(title = "创建时间") @Schema(title = "创建时间")
@ -66,19 +63,17 @@ public class UiScenario implements Serializable {
private String reportId; private String reportId;
@Schema(title = "num", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "num", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario.num.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario.num.not_blank}", groups = {Created.class})
@Size(min = 1, max = 10, message = "{ui_scenario.num.length_range}", groups = {Created.class, Updated.class})
private Integer num; private Integer num;
@Schema(title = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario.deleted.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario.deleted.not_blank}", groups = {Created.class})
@Size(min = 1, max = 1, message = "{ui_scenario.deleted.length_range}", groups = {Created.class, Updated.class})
private Boolean deleted; private Boolean deleted;
@Schema(title = "自定义num") @Schema(title = "自定义num")
private String customNum; private String customNum;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
@Schema(title = "删除时间") @Schema(title = "删除时间")
@ -88,8 +83,7 @@ public class UiScenario implements Serializable {
private String deleteUser; private String deleteUser;
@Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario.pos.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario.pos.not_blank}", groups = {Created.class})
@Size(min = 1, max = 19, message = "{ui_scenario.pos.length_range}", groups = {Created.class, Updated.class})
private Long pos; private Long pos;
@Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED)
@ -103,8 +97,7 @@ public class UiScenario implements Serializable {
private String refId; private String refId;
@Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario.latest.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario.latest.not_blank}", groups = {Created.class})
@Size(min = 1, max = 1, message = "{ui_scenario.latest.length_range}", groups = {Created.class, Updated.class})
private Boolean latest; private Boolean latest;
@Schema(title = "描述") @Schema(title = "描述")

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -31,8 +29,7 @@ public class UiScenarioModule implements Serializable {
private String parentId; private String parentId;
@Schema(title = "模块等级", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "模块等级", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_module.level.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario_module.level.not_blank}", groups = {Created.class})
@Size(min = 1, max = 10, message = "{ui_scenario_module.level.length_range}", groups = {Created.class, Updated.class})
private Integer level; private Integer level;
@Schema(title = "创建时间") @Schema(title = "创建时间")
@ -42,11 +39,10 @@ public class UiScenarioModule implements Serializable {
private Long updateTime; private Long updateTime;
@Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_module.pos.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario_module.pos.not_blank}", groups = {Created.class})
@Size(min = 1, max = 22, message = "{ui_scenario_module.pos.length_range}", groups = {Created.class, Updated.class})
private Double pos; private Double pos;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -23,7 +21,7 @@ public class UiScenarioReference implements Serializable {
@Schema(title = "创建时间") @Schema(title = "创建时间")
private Long createTime; private Long createTime;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
@Schema(title = "被引用的ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "被引用的ID", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -56,7 +54,7 @@ public class UiScenarioReport implements Serializable {
@Size(min = 1, max = 50, message = "{ui_scenario_report.scenario_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_scenario_report.scenario_id.length_range}", groups = {Created.class, Updated.class})
private String scenarioId; private String scenarioId;
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人")
private String createUser; private String createUser;
@Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED)
@ -65,13 +63,11 @@ public class UiScenarioReport implements Serializable {
private String poolId; private String poolId;
@Schema(title = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report.end_time.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario_report.end_time.not_blank}", groups = {Created.class})
@Size(min = 1, max = 19, message = "{ui_scenario_report.end_time.length_range}", groups = {Created.class, Updated.class})
private Long endTime; private Long endTime;
@Schema(title = "报告类型(集合,独立)", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "报告类型(集合,独立)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report.integrated.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario_report.integrated.not_blank}", groups = {Created.class})
@Size(min = 1, max = 1, message = "{ui_scenario_report.integrated.length_range}", groups = {Created.class, Updated.class})
private Boolean integrated; private Boolean integrated;
@Schema(title = "关联的测试计划报告ID可以为空)") @Schema(title = "关联的测试计划报告ID可以为空)")

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -34,8 +32,7 @@ public class UiScenarioReportDetail implements Serializable {
private String status; private String status;
@Schema(title = "请求时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "请求时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report_detail.request_time.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario_report_detail.request_time.not_blank}", groups = {Created.class})
@Size(min = 1, max = 19, message = "{ui_scenario_report_detail.request_time.length_range}", groups = {Created.class, Updated.class})
private Long requestTime; private Long requestTime;
@Schema(title = "总断言数") @Schema(title = "总断言数")
@ -45,8 +42,7 @@ public class UiScenarioReportDetail implements Serializable {
private Long passAssertions; private Long passAssertions;
@Schema(title = "执行结果", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "执行结果", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report_detail.content.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario_report_detail.content.not_blank}", groups = {Created.class})
@Size(min = 1, max = 2147483647, message = "{ui_scenario_report_detail.content.length_range}", groups = {Created.class, Updated.class})
private byte[] content; private byte[] content;
@Schema(title = "记录截图断言等结果") @Schema(title = "记录截图断言等结果")

View File

@ -1,17 +1,15 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@Data @Data
public class UiScenarioReportEnvironment implements Serializable { public class UiScenarioReportEnvironment implements Serializable {
@Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report_environment.report_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_scenario_report_environment.report_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_scenario_report_environment.report_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_scenario_report_environment.report_id.length_range}", groups = {Created.class, Updated.class})
private String reportId; private String reportId;

View File

@ -1,22 +1,20 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@Data @Data
public class UiScenarioReportLog implements Serializable { public class UiScenarioReportLog implements Serializable {
@Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report_log.id.not_blank}", groups = {Created.class, Updated.class}) @NotBlank(message = "{ui_scenario_report_log.id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 50, message = "{ui_scenario_report_log.id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_scenario_report_log.id.length_range}", groups = {Created.class, Updated.class})
private String id; private String id;
@Schema(title = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report_log.report_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_scenario_report_log.report_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{ui_scenario_report_log.report_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_scenario_report_log.report_id.length_range}", groups = {Created.class, Updated.class})
private String reportId; private String reportId;
@ -24,8 +22,7 @@ public class UiScenarioReportLog implements Serializable {
private Long createTime; private Long createTime;
@Schema(title = "执行日志", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "执行日志", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report_log.console.not_blank}", groups = {Updated.class}) @NotNull(message = "{ui_scenario_report_log.console.not_blank}", groups = {Created.class})
@Size(min = 1, max = 2147483647, message = "{ui_scenario_report_log.console.length_range}", groups = {Created.class, Updated.class})
private byte[] console; private byte[] console;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,10 +1,8 @@
package io.metersphere.ui.domain; package io.metersphere.ui.domain;
import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@ -24,8 +22,7 @@ public class UiScenarioReportStructure implements Serializable {
private Long createTime; private Long createTime;
@Schema(title = "资源步骤结构树", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "资源步骤结构树", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_scenario_report_structure.resource_tree.not_blank}", groups = {Created.class}) @NotNull(message = "{ui_scenario_report_structure.resource_tree.not_blank}", groups = {Created.class})
@Size(min = 1, max = 2147483647, message = "{ui_scenario_report_structure.resource_tree.length_range}", groups = {Created.class, Updated.class})
private byte[] resourceTree; private byte[] resourceTree;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;