mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2026-07-06 17:44:54 +00:00
add gc
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package dev.inmo.plaguposter.posts.models
|
||||
|
||||
import com.soywiz.klock.DateTime
|
||||
import dev.inmo.plaguposter.common.DateTimeSerializer
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@@ -16,5 +18,7 @@ data class NewPost(
|
||||
@Serializable
|
||||
data class RegisteredPost(
|
||||
val id: PostId,
|
||||
@Serializable(DateTimeSerializer::class)
|
||||
val created: DateTime,
|
||||
override val content: List<PostContentInfo>
|
||||
) : Post
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package dev.inmo.plaguposter.posts.repo
|
||||
|
||||
import com.soywiz.klock.DateTime
|
||||
import dev.inmo.micro_utils.repos.ReadCRUDRepo
|
||||
import dev.inmo.plaguposter.posts.models.*
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
@@ -7,4 +8,5 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
|
||||
interface ReadPostsRepo : ReadCRUDRepo<RegisteredPost, PostId> {
|
||||
suspend fun getIdByChatAndMessage(chatId: ChatId, messageId: MessageIdentifier): PostId?
|
||||
suspend fun getPostCreationTime(postId: PostId): DateTime?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user