22 lines
723 B
Rust
22 lines
723 B
Rust
use crate::models::json_types::{ConversationAttachmentMetadata, TypedJson};
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct ConversationAttachment {
|
|
pub id: Uuid,
|
|
pub conversation_id: Uuid,
|
|
pub message_id: Option<Uuid>,
|
|
pub file_id: Option<Uuid>,
|
|
pub uploaded_by: Option<Uuid>,
|
|
pub name: String,
|
|
pub content_type: Option<String>,
|
|
pub size_bytes: i64,
|
|
pub storage_path: Option<String>,
|
|
pub url: Option<String>,
|
|
pub metadata: Option<TypedJson<ConversationAttachmentMetadata>>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub deleted_at: Option<DateTime<Utc>>,
|
|
}
|