use serde::{Deserialize, Serialize}; use uuid::Uuid; use chrono::{DateTime, Utc}; #[derive(Debug, Serialize, Deserialize, sqlx::FromRow)] pub struct Course { pub id: Uuid, pub title: String, pub description: Option, pub instructor_id: Uuid, pub start_date: Option>, pub end_date: Option>, pub created_at: DateTime, pub updated_at: DateTime, } #[derive(Debug, Serialize, Deserialize, sqlx::FromRow)] pub struct Module { pub id: Uuid, pub course_id: Uuid, pub title: String, pub position: i32, pub created_at: DateTime, } #[derive(Debug, Serialize, Deserialize, sqlx::FromRow)] pub struct Lesson { pub id: Uuid, pub module_id: Uuid, pub title: String, pub content_type: String, pub content_url: Option, pub transcription: Option, pub metadata: Option, pub position: i32, pub created_at: DateTime, } #[derive(Debug, Serialize, Deserialize, sqlx::FromRow)] pub struct AuditLog { pub id: Uuid, pub user_id: Uuid, pub action: String, pub entity_type: String, pub entity_id: Uuid, pub changes: serde_json::Value, pub created_at: DateTime, } #[derive(Debug, Serialize, Deserialize, sqlx::FromRow)] pub struct Enrollment { pub id: Uuid, pub user_id: Uuid, pub course_id: Uuid, pub enroled_at: DateTime, } #[derive(Debug, Serialize, Deserialize, sqlx::FromRow)] pub struct Asset { pub id: Uuid, pub filename: String, pub storage_path: String, pub mimetype: String, pub size_bytes: i64, pub created_at: DateTime, }