added database models and models for continous use. Also changed get all paths according to that. Nothing is testet yet!

This commit is contained in:
2025-11-01 20:47:04 +01:00
parent d02c1fa314
commit fdf335b346
13 changed files with 280 additions and 51 deletions

View File

@@ -0,0 +1,7 @@
#[derive(Debug, sqlx::FromRow)]
pub struct ExerciseDb {
pub id: u16,
pub node_id: u32,
pub ex_type: String,
pub content: String,
}

View File

@@ -0,0 +1,3 @@
pub mod path_db;
pub mod node_db;
pub mod exercise_db;

View File

@@ -0,0 +1,7 @@
#[derive(Debug, sqlx::FromRow)]
pub struct NodeDb {
pub id: u32,
pub title: String,
pub description: String,
pub path_id: String
}

View File

@@ -0,0 +1,17 @@
use chrono::{DateTime, Utc};
#[derive(sqlx::FromRow, Debug)]
pub struct PathDb {
pub id: String,
pub title: String,
pub description: String,
}
#[derive(Debug, sqlx::FromRow)]
pub struct MetadataDb {
pub path_id : String,
pub version: String,
pub created_at: String,
pub updated_at: String,
}