Support for comments
Some checks failed
Rust / Test (push) Successful in 5m31s
Rust / Rustfmt (push) Successful in 22s
Rust / Clippy (push) Failing after 27s
Rust / Code coverage (push) Successful in 4m28s

This commit is contained in:
Alphonse Paix
2025-10-02 00:26:18 +02:00
parent 2c7282475f
commit 9e5d185aaf
15 changed files with 402 additions and 2751 deletions

16
src/domain/comment.rs Normal file
View File

@@ -0,0 +1,16 @@
use chrono::{DateTime, Utc};
use uuid::Uuid;
pub struct CommentEntry {
pub comment_id: Uuid,
pub post_id: Uuid,
pub author: Option<String>,
pub content: String,
pub published_at: DateTime<Utc>,
}
impl CommentEntry {
pub fn formatted_date(&self) -> String {
self.published_at.format("%B %d, %Y").to_string()
}
}