From 950c7b444a8056ae4f7175a0738ec2c4bdc8d69e Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 13 Feb 2026 14:28:23 +0100 Subject: [PATCH] feat(models/bot): Adding enum to for presence / activity --- src/models/bot.rs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) 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, }