implemented get_path_by_id and get_all_paths
This commit is contained in:
6
src-tauri/src/models/exercise.rs
Normal file
6
src-tauri/src/models/exercise.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
pub struct Exercise {
|
||||
id: u16,
|
||||
ex_type: String,
|
||||
content: String,
|
||||
node_id: u32
|
||||
}
|
||||
3
src-tauri/src/models/mod.rs
Normal file
3
src-tauri/src/models/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub mod path;
|
||||
pub mod node;
|
||||
pub mod exercise;
|
||||
6
src-tauri/src/models/node.rs
Normal file
6
src-tauri/src/models/node.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
pub struct Node {
|
||||
id: u32,
|
||||
title: String,
|
||||
description: String,
|
||||
path_id: String
|
||||
}
|
||||
12
src-tauri/src/models/path.rs
Normal file
12
src-tauri/src/models/path.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#[derive(Debug, sqlx::FromRow)]
|
||||
pub struct Path {
|
||||
id: String,
|
||||
title: String,
|
||||
description: String,
|
||||
}
|
||||
|
||||
pub struct PathVersions {
|
||||
path_id: String,
|
||||
version_number: String,
|
||||
}
|
||||
Reference in New Issue
Block a user