diff --git a/src/models/bot.rs b/src/models/bot.rs index 4382c00..909a958 100644 --- a/src/models/bot.rs +++ b/src/models/bot.rs @@ -1,9 +1,28 @@ use sqlx::FromRow; +#[derive(Debug, Clone, sqlx::Type)] +#[sqlx(type_name = "bot_presence", rename_all = "lowercase")] +pub enum BotPresence { + Online, + Idle, + Dnd, + Invisible, +} + +#[derive(Debug, Clone, sqlx::Type)] +#[sqlx(type_name = "bot_activity")] +pub enum BotActivity { + Playing, + Streaming, + Listening, + Watching, + Competing, +} + #[derive(Debug, FromRow)] pub struct Bot { pub id: i32, pub status: String, - pub activity_type: String, - pub presence: String, + pub activity_type: BotActivity, + pub presence: BotPresence, }