diff --git a/src/models/bot.rs b/src/models/bot.rs new file mode 100644 index 0000000..4382c00 --- /dev/null +++ b/src/models/bot.rs @@ -0,0 +1,9 @@ +use sqlx::FromRow; + +#[derive(Debug, FromRow)] +pub struct Bot { + pub id: i32, + pub status: String, + pub activity_type: String, + pub presence: String, +} diff --git a/src/models/guild.rs b/src/models/guild.rs new file mode 100644 index 0000000..3a7754f --- /dev/null +++ b/src/models/guild.rs @@ -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, + pub log_bot: Option, + pub log_channels: Option, + pub log_member: Option, + pub log_mod: Option, + pub log_msg: Option, + pub log_server: Option, + + // Join/Leave + pub join_enabled: bool, + pub join_message: String, + pub join_channel: Option, + pub leave_enabled: bool, + pub leave_message: String, + pub leave_channel: Option, + + // 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, +} + diff --git a/src/models/guild_user.rs b/src/models/guild_user.rs new file mode 100644 index 0000000..4123673 --- /dev/null +++ b/src/models/guild_user.rs @@ -0,0 +1,15 @@ +use sqlx::FromRow; + +#[derive(Debug, FromRow)] +pub struct GuildUser { + pub id: i32, + pub user_id: String, + pub guild_id: String, + + pub xp: i32, + pub level: i32, + pub is_wl_user: bool, + + pub invitation_count: i32, + pub invited_by: Option, +} diff --git a/src/models/user.rs b/src/models/user.rs new file mode 100644 index 0000000..562c988 --- /dev/null +++ b/src/models/user.rs @@ -0,0 +1,12 @@ +use sqlx::FromRow; + +#[derive(Debug, FromRow)] +pub struct User { + pub user_id: String, + pub is_owner: bool, + pub is_buyer: bool, + pub is_dev: bool, + pub is_enium: bool, + pub is_pwn: bool, +} +