Skip to content

Instantly share code, notes, and snippets.

@little-hands
Last active June 26, 2021 23:57
Show Gist options
  • Save little-hands/29742017943a463ebd7d019df1a8fea7 to your computer and use it in GitHub Desktop.
Save little-hands/29742017943a463ebd7d019df1a8fea7 to your computer and use it in GitHub Desktop.
/**
* エンティティのページング結果をラップするクラス
* 例: 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