style!(models): adding the Db prefix on type from database
This commit is contained in:
parent
997da4c564
commit
1ab4b7cb61
5 changed files with 9 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ pub enum BotActivity {
|
|||
}
|
||||
|
||||
#[derive(Debug, FromRow)]
|
||||
pub struct Bot {
|
||||
pub struct DbBot {
|
||||
pub id: i32,
|
||||
pub status: String,
|
||||
pub activity_type: BotActivity,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use sqlx::FromRow;
|
||||
|
||||
#[derive(Debug, FromRow)]
|
||||
pub struct Guild {
|
||||
pub struct DbGuild {
|
||||
pub guild_id: String,
|
||||
|
||||
pub log_enable: bool,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use sqlx::FromRow;
|
||||
|
||||
#[derive(Debug, FromRow)]
|
||||
pub struct GuildUser {
|
||||
pub struct DbGuildUser {
|
||||
pub id: i32,
|
||||
pub user_id: String,
|
||||
pub guild_id: String,
|
||||
|
|
|
|||
|
|
@ -1 +1,6 @@
|
|||
include!("./mod_gen.rs");
|
||||
|
||||
pub use bot::DbBot;
|
||||
pub use guild::DbGuild;
|
||||
pub use guild_user::DbGuildUser;
|
||||
pub use user::DbUser;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use sqlx::FromRow;
|
||||
|
||||
#[derive(Debug, FromRow)]
|
||||
pub struct User {
|
||||
pub struct DbUser {
|
||||
pub user_id: String,
|
||||
pub is_owner: bool,
|
||||
pub is_buyer: bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue