2022-08-19 18:24:00 +00:00
|
|
|
package dev.inmo.plaguposter.posts.registrar.state
|
|
|
|
|
|
|
|
import dev.inmo.micro_utils.fsm.common.State
|
|
|
|
import dev.inmo.plaguposter.posts.models.PostContentInfo
|
|
|
|
import dev.inmo.tgbotapi.types.ChatId
|
2022-11-17 09:09:10 +00:00
|
|
|
import dev.inmo.tgbotapi.types.FullChatIdentifierSerializer
|
|
|
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
2022-08-19 18:24:00 +00:00
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
|
|
|
|
interface RegistrationState : State {
|
2022-11-17 09:09:10 +00:00
|
|
|
override val context: IdChatIdentifier
|
2022-08-19 18:24:00 +00:00
|
|
|
|
|
|
|
@Serializable
|
|
|
|
data class InProcess(
|
2022-11-17 09:09:10 +00:00
|
|
|
@Serializable(FullChatIdentifierSerializer::class)
|
|
|
|
override val context: IdChatIdentifier,
|
2022-08-19 18:24:00 +00:00
|
|
|
val messages: List<PostContentInfo>
|
|
|
|
) : RegistrationState
|
|
|
|
|
|
|
|
@Serializable
|
|
|
|
data class Finish(
|
2022-11-17 09:09:10 +00:00
|
|
|
@Serializable(FullChatIdentifierSerializer::class)
|
|
|
|
override val context: IdChatIdentifier,
|
2022-08-19 18:24:00 +00:00
|
|
|
val messages: List<PostContentInfo>
|
|
|
|
) : RegistrationState
|
|
|
|
}
|