Serialization fixes
This commit is contained in:
parent
44d89b3a47
commit
6c50bb0e97
@ -7,6 +7,7 @@ typealias ContentId = String
|
|||||||
/**
|
/**
|
||||||
* Content which is planned to be registered in database
|
* Content which is planned to be registered in database
|
||||||
*/
|
*/
|
||||||
|
@Serializable
|
||||||
sealed class Content
|
sealed class Content
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -24,6 +25,7 @@ data class SimpleTextContent(
|
|||||||
* [com.insanusmokrassar.postssystem.core.post.RegisteredPost]s by using
|
* [com.insanusmokrassar.postssystem.core.post.RegisteredPost]s by using
|
||||||
* [com.insanusmokrassar.postssystem.core.post.api.ReadPostsAPI.getPostsByContent]
|
* [com.insanusmokrassar.postssystem.core.post.api.ReadPostsAPI.getPostsByContent]
|
||||||
*/
|
*/
|
||||||
|
@Serializable
|
||||||
data class RegisteredContent(
|
data class RegisteredContent(
|
||||||
val id: ContentId,
|
val id: ContentId,
|
||||||
val content: Content
|
val content: Content
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package com.insanusmokrassar.postssystem.core.utils.pagination
|
package com.insanusmokrassar.postssystem.core.utils.pagination
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
data class PaginationResult<T>(
|
data class PaginationResult<T>(
|
||||||
override val page: Int,
|
override val page: Int,
|
||||||
val pagesNumber: Int,
|
val pagesNumber: Int,
|
||||||
val results: List<T>,
|
val results: List<T>,
|
||||||
override val size: Int = results.size
|
override val size: Int
|
||||||
) : Pagination
|
) : Pagination
|
||||||
|
|
||||||
fun <T> Pagination.createResult(
|
fun <T> Pagination.createResult(
|
||||||
|
Loading…
Reference in New Issue
Block a user