feat: mensajes

This commit is contained in:
2026-01-27 11:13:08 -03:00
parent 26f4283d0e
commit 23d761bada
12 changed files with 700 additions and 10 deletions
+32
View File
@@ -388,6 +388,38 @@ pub struct PostWithAuthor {
pub replies: Vec<PostWithAuthor>,
}
// Course Announcements
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]
pub struct CourseAnnouncement {
pub id: Uuid,
pub organization_id: Uuid,
pub course_id: Uuid,
pub author_id: Uuid,
pub title: String,
pub content: String,
pub is_pinned: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]
pub struct AnnouncementWithAuthor {
// Announcement fields
pub id: Uuid,
pub organization_id: Uuid,
pub course_id: Uuid,
pub author_id: Uuid,
pub title: String,
pub content: String,
pub is_pinned: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
// Author info
pub author_name: String,
pub author_avatar: Option<String>,
}
#[cfg(test)]
mod tests {