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;