Last active
June 26, 2021 23:57
-
-
Save little-hands/29742017943a463ebd7d019df1a8fea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* エンティティのページング結果をラップするクラス | |
* 例: fun findByName(userName: String): Page<User> | |
*/ | |
data class Page<T>( | |
/** 取得したエンティティ */ | |
val items: List<T>, | |
/** ページング情報 */ | |
val paging: Paging, | |
) | |
data class Paging( | |
/** 指定した条件に該当する前件数 */ | |
val totalCount: Int, | |
/** 1ページ当たりの件数 */ | |
val paeSize: Int, | |
/** 取得結果のページ番号 */ | |
val page: Int, | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment