feat(models/bot): Adding enum to for presence / activity

This commit is contained in:
Raphael 2026-02-13 14:28:23 +01:00 committed by Raphaël
parent 7a248785ac
commit 950c7b444a

View file

@ -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,
}