feat(models): adding models for sqlx in rust

This commit is contained in:
Raphael 2026-02-12 23:20:54 +01:00
parent d746e95b9e
commit 49eb9f5964
No known key found for this signature in database
4 changed files with 74 additions and 0 deletions

38
src/models/guild.rs Normal file
View file

@ -0,0 +1,38 @@
use sqlx::FromRow;
#[derive(Debug, FromRow)]
pub struct Guild {
pub guild_id: String,
// Logs
pub log_enable: bool,
pub log_category: Option<String>,
pub log_bot: Option<String>,
pub log_channels: Option<String>,
pub log_member: Option<String>,
pub log_mod: Option<String>,
pub log_msg: Option<String>,
pub log_server: Option<String>,
// Join/Leave
pub join_enabled: bool,
pub join_message: String,
pub join_channel: Option<String>,
pub leave_enabled: bool,
pub leave_message: String,
pub leave_channel: Option<String>,
// Protection
pub protect_enabled: bool,
pub protect_anti_channel: bool,
pub protect_anti_rank: bool,
pub protect_anti_perm: bool,
pub protect_anti_massban: bool,
pub protect_anti_mass_mention: bool,
pub protect_anti_bot: bool,
// Apparence
pub footer: String,
pub color: i32,
}