29 lines
840 B
Rust
29 lines
840 B
Rust
use serde_json::Value;
|
|
use sqlx::types::time::OffsetDateTime;
|
|
use cove_db_macros::DeriveTableRow;
|
|
use cove_net_common::id::SnowflakeID;
|
|
use crate::types::user_status::UserStatus;
|
|
|
|
#[derive(DeriveTableRow)]
|
|
#[table_name("users")]
|
|
pub struct UserRow {
|
|
pub id: SnowflakeID,
|
|
pub username: String,
|
|
pub discriminator: String,
|
|
pub avatar_hash: Option<String>,
|
|
pub email: String,
|
|
pub email_verified: bool,
|
|
pub password_hash: String,
|
|
pub mfa_enabled: bool,
|
|
pub mfa_secret: Option<String>,
|
|
pub status: UserStatus,
|
|
pub public_flags: i64,
|
|
pub locale: String,
|
|
pub premium_since: Option<OffsetDateTime>,
|
|
pub premium_end: Option<OffsetDateTime>,
|
|
pub bot: bool,
|
|
pub bot_oauth_scopes: Value,
|
|
pub preferences: Value,
|
|
pub created_at: OffsetDateTime,
|
|
pub updated_at: OffsetDateTime,
|
|
} |