From f05eb7581ff698bdd3dc5371a77fb302c7f04bec Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 31 May 2023 09:39:44 +0800 Subject: [PATCH] build: system domain --- .../io/metersphere/system/domain/AuthSource.java | 9 +++------ .../java/io/metersphere/system/domain/License.java | 6 ++---- .../io/metersphere/system/domain/MessageTask.java | 6 ++---- .../metersphere/system/domain/MessageTaskBlob.java | 6 ++---- .../io/metersphere/system/domain/Notification.java | 7 ++----- .../metersphere/system/domain/NoviceStatistics.java | 12 ++++-------- .../io/metersphere/system/domain/OperatingLog.java | 9 +++------ .../system/domain/OperatingLogResource.java | 6 ++---- .../java/io/metersphere/system/domain/Plugin.java | 6 ++---- .../io/metersphere/system/domain/PluginBlob.java | 6 ++---- .../java/io/metersphere/system/domain/Quota.java | 6 ++---- .../java/io/metersphere/system/domain/Schedule.java | 8 +++----- .../system/domain/ServiceIntegration.java | 9 +++------ .../metersphere/system/domain/SystemParameter.java | 6 ++---- .../io/metersphere/system/domain/TestResource.java | 6 ++---- .../metersphere/system/domain/TestResourcePool.java | 6 ++---- .../main/java/io/metersphere/system/domain/User.java | 8 +++----- .../io/metersphere/system/domain/UserExtend.java | 6 ++---- .../java/io/metersphere/system/domain/UserKey.java | 8 +++----- .../java/io/metersphere/system/domain/UserRole.java | 11 ++++------- .../system/domain/UserRolePermission.java | 6 ++---- .../metersphere/system/domain/UserRoleRelation.java | 6 ++---- .../java/io/metersphere/system/domain/Workspace.java | 8 +++----- 23 files changed, 57 insertions(+), 110 deletions(-) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java index 64eeb382ae..2416c5ffab 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -36,8 +34,7 @@ public class AuthSource implements Serializable { private String type; @Schema(title = "认证源配置", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{auth_source.configuration.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 65535, message = "{auth_source.configuration.length_range}", groups = {Created.class, Updated.class}) + @NotNull(message = "{auth_source.configuration.not_blank}", groups = {Created.class}) private byte[] configuration; private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java index 724cd1f5e1..82b2e11c6f 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java index 5ac6532961..256129095e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java index fca5d106f3..261d5fe084 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java index 6f241a9d24..a251c9064a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -12,7 +10,6 @@ import lombok.Data; public class Notification implements Serializable { @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{notification.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 19, message = "{notification.id.length_range}", groups = {Created.class, Updated.class}) private Long id; @Schema(title = "通知类型", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java index 867f4cd9fb..91b03f6672 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -19,13 +17,11 @@ public class NoviceStatistics implements Serializable { private String userId; @Schema(title = "新手引导完成的步骤", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{novice_statistics.guide_step.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 1, message = "{novice_statistics.guide_step.length_range}", groups = {Created.class, Updated.class}) + @NotNull(message = "{novice_statistics.guide_step.not_blank}", groups = {Created.class}) private Boolean guideStep; @Schema(title = "新手引导的次数", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{novice_statistics.guide_num.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 10, message = "{novice_statistics.guide_num.length_range}", groups = {Created.class, Updated.class}) + @NotNull(message = "{novice_statistics.guide_num.not_blank}", groups = {Created.class}) private Integer guideNum; @Schema(title = "") diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java index 7d4ae27699..4559fe9a56 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -45,8 +43,7 @@ public class OperatingLog implements Serializable { private String operPath; @Schema(title = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{operating_log.oper_time.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 19, message = "{operating_log.oper_time.length_range}", groups = {Created.class, Updated.class}) + @NotNull(message = "{operating_log.oper_time.not_blank}", groups = {Created.class}) private Long operTime; @Schema(title = "操作内容") diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java index 8f000742fb..cad67a0cf6 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java index f22587ab50..b0ba6e566a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java index ab59af13aa..18c270f375 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java index 0db7c49ef1..745e54b240 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import java.math.BigDecimal; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java index 385bc57fe6..426cf4cb0c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -39,7 +37,7 @@ public class Schedule implements Serializable { @Schema(title = "") private String resourceId; - @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "创建人") private String createUser; @Schema(title = "Create timestamp") diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java index 307cf877d5..5132c051f1 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -24,8 +22,7 @@ public class ServiceIntegration implements Serializable { private String workspaceId; @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{service_integration.configuration.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 65535, message = "{service_integration.configuration.length_range}", groups = {Created.class, Updated.class}) + @NotNull(message = "{service_integration.configuration.not_blank}", groups = {Created.class}) private byte[] configuration; private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java index b1314eb4aa..b30bbe3e0c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java index adc39a3774..1412140a54 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java index 6972f1c432..bf9be20afb 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java index f8623c4495..d8a3ed0165 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -56,7 +54,7 @@ public class User implements Serializable { @Schema(title = "当前项目ID") private String lastProjectId; - @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "创建人") private String createUser; private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java index 7d0237e5dd..04712caf51 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java index 00ad1f8ec9..a345c3b09a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -15,7 +13,7 @@ public class UserKey implements Serializable { @Size(min = 1, max = 50, message = "{user_key.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(title = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "用户ID") private String createUser; @Schema(title = "access_key", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java index 5f115b910f..803875ac55 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -24,8 +22,7 @@ public class UserRole implements Serializable { private String description; @Schema(title = "是否是系统用户组", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{user_role.system.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 1, message = "{user_role.system.length_range}", groups = {Created.class, Updated.class}) + @NotNull(message = "{user_role.system.not_blank}", groups = {Created.class}) private Boolean system; @Schema(title = "所属类型", requiredMode = Schema.RequiredMode.REQUIRED) @@ -39,7 +36,7 @@ public class UserRole implements Serializable { @Schema(title = "更新时间") private Long updateTime; - @Schema(title = "创建人(操作人)", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "创建人(操作人)") private String createUser; @Schema(title = "应用范围", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java index d4a8aef670..1e2f85ea36 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java index acd8ad068a..ecce4aae33 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java index 6a09a0b30f..cbfb47dd9a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java @@ -1,10 +1,8 @@ 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 jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -29,7 +27,7 @@ public class Workspace implements Serializable { @Schema(title = "更新时间") private Long updateTime; - @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "创建人") private String createUser; private static final long serialVersionUID = 1L;