| use chrono::{DateTime, Utc}; | |
| use serde::{Deserialize, Serialize}; | |
| use sqlx::FromRow; | |
| use uuid::Uuid; | |
| pub struct Message { | |
| pub id: Uuid, | |
| pub conversation_id: Uuid, | |
| pub sender_id: Uuid, | |
| pub text: String, | |
| pub message_type: String, | |
| pub is_read: bool, | |
| pub created_at: DateTime<Utc>, | |
| pub file_name: Option<String>, | |
| pub thumbnail_url: Option<String>, | |
| } | |
| pub struct MessageAttachment { | |
| pub id: Uuid, | |
| pub message_id: Uuid, | |
| pub file_name: String, | |
| pub file_path: String, | |
| pub mime_type: String, | |
| pub file_size: i64, | |
| pub created_at: DateTime<Utc>, | |
| } | |