refactor(系统设置): 统一修改用例测试资源池组织的字段长度

This commit is contained in:
guoyuqi 2024-01-31 20:21:59 +08:00 committed by 刘瑞斌
parent c01ba09c11
commit 9951b73c7c
6 changed files with 40 additions and 40 deletions

View File

@ -22,7 +22,7 @@ public class CaseReviewModule implements Serializable {
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_module.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 100, message = "{case_review_module.name.length_range}", groups = {Created.class, Updated.class})
@Size(min = 1, max = 255, message = "{case_review_module.name.length_range}", groups = {Created.class, Updated.class})
private String name;
@Schema(description = "父节点ID", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -22,7 +22,7 @@ public class FunctionalCaseModule implements Serializable {
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{functional_case_module.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 100, message = "{functional_case_module.name.length_range}", groups = {Created.class, Updated.class})
@Size(min = 1, max = 255, message = "{functional_case_module.name.length_range}", groups = {Created.class, Updated.class})
private String name;
@Schema(description = "父节点ID", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -20,7 +20,7 @@ public class Organization implements Serializable {
@Schema(description = "组织名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{organization.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 100, message = "{organization.name.length_range}", groups = {Created.class, Updated.class})
@Size(min = 1, max = 255, message = "{organization.name.length_range}", groups = {Created.class, Updated.class})
private String name;
@Schema(description = "描述")
@ -38,7 +38,8 @@ public class Organization implements Serializable {
@Schema(description = "修改人")
private String updateUser;
@Schema(description = "是否删除")
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{organization.deleted.not_blank}", groups = {Created.class})
private Boolean deleted;
@Schema(description = "删除人")

View File

@ -1,15 +1,12 @@
package io.metersphere.system.domain;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.metersphere.validation.groups.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import jakarta.validation.constraints.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import lombok.Data;
@Data
public class TestResourcePool implements Serializable {
@ -55,10 +52,12 @@ public class TestResourcePool implements Serializable {
@Schema(description = "ms部署地址")
private String serverUrl;
@Schema(description = "资源池应用类型(组织/全部)")
@Schema(description = "资源池应用类型(组织/全部)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{test_resource_pool.all_org.not_blank}", groups = {Created.class})
private Boolean allOrg;
@Schema(description = "是否删除")
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{test_resource_pool.deleted.not_blank}", groups = {Created.class})
private Boolean deleted;
private static final long serialVersionUID = 1L;

View File

@ -83,7 +83,7 @@ CREATE TABLE IF NOT EXISTS functional_case_module
(
`id` VARCHAR(50) NOT NULL COMMENT 'ID',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
`name` VARCHAR(100) NOT NULL COMMENT '名称',
`name` VARCHAR(255) NOT NULL COMMENT '名称',
`parent_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父节点ID',
`pos` BIGINT NOT NULL DEFAULT 0 COMMENT '同一节点下的顺序',
`create_time` BIGINT NOT NULL COMMENT '创建时间',
@ -372,7 +372,7 @@ CREATE TABLE IF NOT EXISTS case_review_module
(
`id` VARCHAR(50) NOT NULL COMMENT 'ID',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
`name` VARCHAR(100) NOT NULL COMMENT '名称',
`name` VARCHAR(255) NOT NULL COMMENT '名称',
`parent_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父节点ID',
`pos` BIGINT NOT NULL DEFAULT 0 COMMENT '同一节点下的顺序',
`create_time` BIGINT NOT NULL COMMENT '创建时间',

View File

@ -178,7 +178,7 @@ CREATE TABLE test_resource_pool(
`id` VARCHAR(50) NOT NULL COMMENT '资源池ID' ,
`name` VARCHAR(255) NOT NULL COMMENT '名称' ,
`type` VARCHAR(30) NOT NULL COMMENT '类型' ,
`description` VARCHAR(500) COMMENT '描述' ,
`description` VARCHAR(1000) COMMENT '描述' ,
`enable` BIT NOT NULL DEFAULT 1 COMMENT '是否启用' ,
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
@ -296,8 +296,8 @@ CREATE TABLE IF NOT EXISTS organization
(
`id` VARCHAR(50) NOT NULL COMMENT '组织ID',
`num` BIGINT NOT NULL AUTO_INCREMENT COMMENT '组织编号',
`name` VARCHAR(100) NOT NULL COMMENT '组织名称',
`description` VARCHAR(500) COMMENT '描述',
`name` VARCHAR(255) NOT NULL COMMENT '组织名称',
`description` VARCHAR(1000) COMMENT '描述',
`create_time` BIGINT NOT NULL COMMENT '创建时间',
`update_time` BIGINT NOT NULL COMMENT '更新时间',
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人',