9eb77ab98b
- Update channel, notification, PR, repo, user, workspace models - Remove deleted IM models: articles, channel follows, message attachments/bookmarks/drafts/edit history/embeds/mentions/pins/ polls/reactions/threads, saved messages, thread read states - Add new PR models: review requests, templates - Add repo release assets model - Add base_info module for API detail responses
27 lines
826 B
Rust
27 lines
826 B
Rust
use crate::models::common::{Role, Status, Visibility};
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow, utoipa::ToSchema)]
|
|
pub struct User {
|
|
pub id: Uuid,
|
|
pub username: String,
|
|
pub display_name: Option<String>,
|
|
pub avatar_url: Option<String>,
|
|
pub bio: Option<String>,
|
|
pub status: Status,
|
|
pub role: Role,
|
|
pub visibility: Visibility,
|
|
pub is_active: bool,
|
|
pub is_bot: bool,
|
|
pub last_login_at: Option<DateTime<Utc>>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
pub deleted_at: Option<DateTime<Utc>>,
|
|
#[sqlx(default)]
|
|
pub restore_token_hash: Option<String>,
|
|
#[sqlx(default)]
|
|
pub restore_token_expires_at: Option<DateTime<Utc>>,
|
|
}
|