From 516c9d9d79d1b504c92cf40ba85c5bcf39370992 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Fri, 16 Aug 2024 15:06:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=90=8D=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8C=85=E7=BB=93=E6=9E=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{domain => model}/ValidatableStringRecord.java | 2 +- .../{util/PageDTO.java => model/dto/PageResult.java} | 12 ++++++------ .../commons/{util => model/dto}/UnifiedResponse.java | 2 +- .../ValidatableStringRecordTests.java | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename src/main/java/xyz/zhouxy/plusone/commons/{domain => model}/ValidatableStringRecord.java (98%) rename src/main/java/xyz/zhouxy/plusone/commons/{util/PageDTO.java => model/dto/PageResult.java} (82%) rename src/main/java/xyz/zhouxy/plusone/commons/{util => model/dto}/UnifiedResponse.java (99%) rename src/test/java/xyz/zhouxy/plusone/commons/{domain => model}/ValidatableStringRecordTests.java (98%) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecord.java b/src/main/java/xyz/zhouxy/plusone/commons/model/ValidatableStringRecord.java similarity index 98% rename from src/main/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecord.java rename to src/main/java/xyz/zhouxy/plusone/commons/model/ValidatableStringRecord.java index 2cde5e3..fc99bd7 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecord.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/model/ValidatableStringRecord.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package xyz.zhouxy.plusone.commons.domain; +package xyz.zhouxy.plusone.commons.model; import java.io.Serializable; import java.util.Objects; diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/PageDTO.java b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PageResult.java similarity index 82% rename from src/main/java/xyz/zhouxy/plusone/commons/util/PageDTO.java rename to src/main/java/xyz/zhouxy/plusone/commons/model/dto/PageResult.java index 2cdf287..61d9938 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/PageDTO.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PageResult.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package xyz.zhouxy.plusone.commons.util; +package xyz.zhouxy.plusone.commons.model.dto; import java.util.List; @@ -30,21 +30,21 @@ import xyz.zhouxy.plusone.commons.annotation.StaticFactoryMethod; * @author ZhouXY * @see PagingAndSortingQueryParams */ -public class PageDTO { +public class PageResult { private final long total; private final List content; - private PageDTO(List content, long total) { + private PageResult(List content, long total) { Preconditions.checkNotNull(content, "Content must not be null."); this.content = content; this.total = total; } - @StaticFactoryMethod(PageDTO.class) - public static PageDTO of(List content, long total) { - return new PageDTO<>(content, total); + @StaticFactoryMethod(PageResult.class) + public static PageResult of(List content, long total) { + return new PageResult<>(content, total); } public long getTotal() { diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/UnifiedResponse.java b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/UnifiedResponse.java similarity index 99% rename from src/main/java/xyz/zhouxy/plusone/commons/util/UnifiedResponse.java rename to src/main/java/xyz/zhouxy/plusone/commons/model/dto/UnifiedResponse.java index 0678f8a..01965e7 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/UnifiedResponse.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/UnifiedResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package xyz.zhouxy.plusone.commons.util; +package xyz.zhouxy.plusone.commons.model.dto; import java.util.Objects; import java.util.function.BooleanSupplier; diff --git a/src/test/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecordTests.java b/src/test/java/xyz/zhouxy/plusone/commons/model/ValidatableStringRecordTests.java similarity index 98% rename from src/test/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecordTests.java rename to src/test/java/xyz/zhouxy/plusone/commons/model/ValidatableStringRecordTests.java index 403671c..636d16d 100644 --- a/src/test/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecordTests.java +++ b/src/test/java/xyz/zhouxy/plusone/commons/model/ValidatableStringRecordTests.java @@ -1,4 +1,4 @@ -package xyz.zhouxy.plusone.commons.domain; +package xyz.zhouxy.plusone.commons.model; import static org.junit.jupiter.api.Assertions.assertNotNull;