diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java index 8fe8b18142..3e1962fd5b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java @@ -1,10 +1,8 @@ package io.metersphere.functional.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.util.ArrayList; import java.util.Arrays; @@ -12,40 +10,43 @@ import lombok.Data; @Data public class FunctionalCaseAttachment implements Serializable { - @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case_attachment.id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{functional_case_attachment.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case_attachment.case_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case_attachment.case_id.length_range}", groups = {Created.class, Updated.class}) private String caseId; - @Schema(description = "文件的ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "文件的ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case_attachment.file_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case_attachment.file_id.length_range}", groups = {Created.class, Updated.class}) private String fileId; - @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case_attachment.file_name.not_blank}", groups = {Created.class}) @Size(min = 1, max = 255, message = "{functional_case_attachment.file_name.length_range}", groups = {Created.class, Updated.class}) private String fileName; - @Schema(description = "文件大小", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_attachment.size.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 19, message = "{functional_case_attachment.size.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "文件来源", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_attachment.file_source.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_case_attachment.file_source.length_range}", groups = {Created.class, Updated.class}) + private String fileSource; + + @Schema(description = "文件大小", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{functional_case_attachment.size.not_blank}", groups = {Created.class}) private Long size; - @Schema(description = "是否本地", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_attachment.local.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 1, message = "{functional_case_attachment.local.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "是否本地", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{functional_case_attachment.local.not_blank}", groups = {Created.class}) private Boolean local; - @Schema(description = "创建人") + @Schema(description = "创建人") private String createUser; - @Schema(description = "创建时间") + @Schema(description = "创建时间") private Long createTime; private static final long serialVersionUID = 1L; @@ -55,6 +56,7 @@ public class FunctionalCaseAttachment implements Serializable { caseId("case_id", "caseId", "VARCHAR", false), fileId("file_id", "fileId", "VARCHAR", false), fileName("file_name", "fileName", "VARCHAR", false), + fileSource("file_source", "fileSource", "VARCHAR", false), size("size", "size", "BIGINT", true), local("local", "local", "BIT", true), createUser("create_user", "createUser", "VARCHAR", false), diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachmentExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachmentExample.java index c8394f86b9..3d4f5bd7a3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachmentExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachmentExample.java @@ -384,6 +384,76 @@ public class FunctionalCaseAttachmentExample { return (Criteria) this; } + public Criteria andFileSourceIsNull() { + addCriterion("file_source is null"); + return (Criteria) this; + } + + public Criteria andFileSourceIsNotNull() { + addCriterion("file_source is not null"); + return (Criteria) this; + } + + public Criteria andFileSourceEqualTo(String value) { + addCriterion("file_source =", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceNotEqualTo(String value) { + addCriterion("file_source <>", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceGreaterThan(String value) { + addCriterion("file_source >", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceGreaterThanOrEqualTo(String value) { + addCriterion("file_source >=", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceLessThan(String value) { + addCriterion("file_source <", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceLessThanOrEqualTo(String value) { + addCriterion("file_source <=", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceLike(String value) { + addCriterion("file_source like", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceNotLike(String value) { + addCriterion("file_source not like", value, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceIn(List values) { + addCriterion("file_source in", values, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceNotIn(List values) { + addCriterion("file_source not in", values, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceBetween(String value1, String value2) { + addCriterion("file_source between", value1, value2, "fileSource"); + return (Criteria) this; + } + + public Criteria andFileSourceNotBetween(String value1, String value2) { + addCriterion("file_source not between", value1, value2, "fileSource"); + return (Criteria) this; + } + public Criteria andSizeIsNull() { addCriterion("`size` is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.xml index 6134d7579b..0773748326 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.xml @@ -6,6 +6,7 @@ + @@ -70,7 +71,7 @@ - id, case_id, file_id, file_name, `size`, `local`, create_user, create_time + id, case_id, file_id, file_name, file_source, `size`, `local`, create_user, create_time