19 lines
610 B
Kotlin
19 lines
610 B
Kotlin
package commands
|
|
|
|
import database.Repository
|
|
import kotlinx.serialization.Contextual
|
|
import kotlinx.serialization.Serializable
|
|
import models.HumanBeing
|
|
import network.Response
|
|
|
|
@Serializable
|
|
class InfoCommand(@Contextual private val manager: Repository) : Command {
|
|
override val name = "info"
|
|
override val description = "вывести информацию о коллекции"
|
|
override val type = CommandType.SIMPLE
|
|
override val args = listOf(CommandArgType.NONE)
|
|
|
|
override fun execute(args: List<String>, humanBeing: HumanBeing?): Response =
|
|
Response(true, manager.getInfo())
|
|
}
|