use sea_orm::prelude::DateTimeWithTimeZone; use serde::Serialize; use uuid::Uuid; #[derive(Debug, Clone, Serialize)] pub struct User { pub id: Uuid, pub oidc_sub: String, pub email: Option, pub display_name: String, pub avatar_url: Option, pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, } #[derive(Debug, Clone, Serialize)] pub struct Guild { pub id: Uuid, pub name: String, pub owner_user_id: Uuid, pub created_at: DateTimeWithTimeZone, } #[derive(Debug, Clone, Serialize)] pub struct Channel { pub id: Uuid, pub guild_id: Uuid, pub name: String, pub kind: String, pub created_at: DateTimeWithTimeZone, } #[derive(Debug, Clone, Serialize)] pub struct Message { pub id: Uuid, pub channel_id: Uuid, pub author_user_id: Uuid, pub body: String, pub created_at: DateTimeWithTimeZone, } #[derive(Debug, Clone, Serialize)] pub struct BasicUser { pub id: Uuid, pub display_name: String, pub avatar_url: Option, } #[derive(Debug, Clone, Serialize, sea_orm::FromQueryResult)] pub struct MessageWithAuthor { pub id: Uuid, pub channel_id: Uuid, pub author_user_id: Uuid, pub author_display_name: String, pub body: String, pub created_at: DateTimeWithTimeZone, } #[derive(Debug, Clone, Serialize)] pub struct DmConversation { pub user_id: Uuid, pub display_name: String, pub avatar_url: Option, pub last_message_at: DateTimeWithTimeZone, } #[derive(Debug, Clone, Serialize)] pub struct DmMessageWithAuthor { pub id: Uuid, pub author_user_id: Uuid, pub recipient_user_id: Uuid, pub author_display_name: String, pub body: String, pub created_at: DateTimeWithTimeZone, } #[derive(Debug, Clone, Serialize)] pub struct Invite { pub code: String, pub guild_id: Uuid, pub created_by_user_id: Uuid, pub created_at: DateTimeWithTimeZone, pub expires_at: Option, pub max_uses: Option, pub use_count: i32, } #[derive(Debug, Clone, Serialize)] pub struct SoundboardSound { pub id: Uuid, pub guild_id: Uuid, pub name: String, pub icon: String, pub file_path: String, pub created_by_user_id: Uuid, pub created_at: DateTimeWithTimeZone, }