build: project domain
This commit is contained in:
parent
dbd76ad824
commit
e035e51b97
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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,14 +22,13 @@ public class ApiTemplate implements Serializable {
|
|||
private String description;
|
||||
|
||||
@Schema(title = "是否是系统模板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_template.system.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 1, message = "{api_template.system.length_range}", groups = {Created.class, Updated.class})
|
||||
@NotNull(message = "{api_template.system.not_blank}", groups = {Created.class})
|
||||
private Boolean system;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
@ -52,8 +50,7 @@ public class CustomField implements Serializable {
|
|||
private String projectId;
|
||||
|
||||
@Schema(title = "是否关联第三方", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{custom_field.third_part.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 1, message = "{custom_field.third_part.length_range}", groups = {Created.class, Updated.class})
|
||||
@NotNull(message = "{custom_field.third_part.not_blank}", groups = {Created.class})
|
||||
private Boolean thirdPart;
|
||||
|
||||
@Schema(title = "自定义字段选项")
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
@ -26,10 +24,10 @@ public class FakeError implements Serializable {
|
|||
@Schema(title = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(title = "更新人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(title = "错误码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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 FileMetadata implements Serializable {
|
|||
private String type;
|
||||
|
||||
@Schema(title = "文件大小", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{file_metadata.size.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 19, message = "{file_metadata.size.length_range}", groups = {Created.class, Updated.class})
|
||||
@NotNull(message = "{file_metadata.size.not_blank}", groups = {Created.class})
|
||||
private Long size;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
|
@ -44,10 +41,10 @@ public class FileMetadata implements Serializable {
|
|||
@Size(min = 1, max = 50, message = "{file_metadata.storage.length_range}", groups = {Created.class, Updated.class})
|
||||
private String storage;
|
||||
|
||||
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(title = "修改人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(title = "标签")
|
||||
|
@ -69,8 +66,7 @@ public class FileMetadata implements Serializable {
|
|||
private String resourceType;
|
||||
|
||||
@Schema(title = "是否是最新版", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{file_metadata.latest.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 1, message = "{file_metadata.latest.length_range}", groups = {Created.class, Updated.class})
|
||||
@NotNull(message = "{file_metadata.latest.not_blank}", groups = {Created.class})
|
||||
private Boolean latest;
|
||||
|
||||
@Schema(title = "同版本数据关联的ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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,14 +22,13 @@ public class FunctionalCaseTemplate implements Serializable {
|
|||
private String description;
|
||||
|
||||
@Schema(title = "是否是系统模板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{functional_case_template.system.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 1, message = "{functional_case_template.system.length_range}", groups = {Created.class, Updated.class})
|
||||
@NotNull(message = "{functional_case_template.system.not_blank}", groups = {Created.class})
|
||||
private Boolean system;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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,14 +22,13 @@ public class IssueTemplate implements Serializable {
|
|||
private String description;
|
||||
|
||||
@Schema(title = "是否是系统模板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{issue_template.system.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 1, message = "{issue_template.system.length_range}", groups = {Created.class, Updated.class})
|
||||
@NotNull(message = "{issue_template.system.not_blank}", groups = {Created.class})
|
||||
private Boolean system;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.project.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;
|
||||
|
||||
|
@ -32,8 +30,7 @@ public class ProjectVersion implements Serializable {
|
|||
private String status;
|
||||
|
||||
@Schema(title = "是否是最新版", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{project_version.latest.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 1, message = "{project_version.latest.length_range}", groups = {Created.class, Updated.class})
|
||||
@NotNull(message = "{project_version.latest.not_blank}", groups = {Created.class})
|
||||
private Boolean latest;
|
||||
|
||||
@Schema(title = "发布时间")
|
||||
|
@ -48,7 +45,7 @@ public class ProjectVersion implements Serializable {
|
|||
@Schema(title = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(title = "创建人")
|
||||
private String createUser;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
Loading…
Reference in New Issue