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
|
||||
*/
|
||||
@Serializable
|
||||
sealed class Content
|
||||
|
||||
@Serializable
|
||||
@ -24,6 +25,7 @@ data class SimpleTextContent(
|
||||
* [com.insanusmokrassar.postssystem.core.post.RegisteredPost]s by using
|
||||
* [com.insanusmokrassar.postssystem.core.post.api.ReadPostsAPI.getPostsByContent]
|
||||
*/
|
||||
@Serializable
|
||||
data class RegisteredContent(
|
||||
val id: ContentId,
|
||||
val content: Content
|
||||
|
@ -1,10 +1,13 @@
|
||||
package com.insanusmokrassar.postssystem.core.utils.pagination
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class PaginationResult<T>(
|
||||
override val page: Int,
|
||||
val pagesNumber: Int,
|
||||
val results: List<T>,
|
||||
override val size: Int = results.size
|
||||
override val size: Int
|
||||
) : Pagination
|
||||
|
||||
fun <T> Pagination.createResult(
|
||||
|
Loading…
Reference in New Issue
Block a user