use crate::domain::dto::reaction::ReactionGroupResponse; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use uuid::Uuid; #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct MessageResponse { pub id: Uuid, pub server_id: Option, pub channel_id: Uuid, pub user_id: Uuid, pub content: String, pub created_at: DateTime, pub updated_at: Option>, pub reply_to_id: Option, pub reactions: Vec, } #[derive(Debug, Serialize, ToSchema)] pub struct MessagePageResponse { pub messages: Vec, pub oldest_id: Option, pub newest_id: Option, pub has_more_before: bool, pub has_more_after: bool, } #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct CreateMessageRequest { pub channel_id: Uuid, pub content: String, pub reply_to_id: Option, } #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct UpdateMessageRequest { pub content: String, } #[derive(Debug, serde::Deserialize, utoipa::IntoParams)] pub struct MessageQueryParams { pub channel_id: Uuid, pub before_id: Option, pub after_id: Option, pub limit: Option, }