Compare commits

...

2 Commits

Author SHA1 Message Date
d02c1fa314 updated structs a bit 2025-10-28 20:34:10 +01:00
c53a4462cd gitignore 2025-10-28 20:33:54 +01:00
7 changed files with 42 additions and 7 deletions

21
.gitignore vendored
View File

@@ -32,3 +32,24 @@ devenv.local.yaml
# pre-commit
.pre-commit-config.yaml
# Generated by Cargo
# will have compiled files and executables
debug
target
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# Generated by cargo mutants
# Contains mutation testing data
**/mutants.out*/
# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

3
src-tauri/Cargo.lock generated
View File

@@ -496,8 +496,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2"
dependencies = [
"iana-time-zone",
"js-sys",
"num-traits",
"serde",
"wasm-bindgen",
"windows-link 0.2.0",
]
@@ -1030,6 +1032,7 @@ checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d"
name = "flalingo"
version = "0.1.0"
dependencies = [
"chrono",
"serde",
"serde_json",
"sqlx",

View File

@@ -26,4 +26,5 @@ serde_json = "1"
# SQLx und Tokio für asynchrone DB-Zugriffe
sqlx = { version = "0.8.6", features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate"] }
tokio = { version = "1", features = ["full"] }
chrono = "0.4.42"

View File

@@ -1,3 +1,4 @@
#[derive(Debug, sqlx::FromRow)]
pub struct Node {
id: u32,
title: String,

View File

@@ -1,12 +1,21 @@
use chrono::{DateTime, Utc};
use sqlx::sqlite::SqliteRow;
use sqlx::Row;
#[derive(Debug, sqlx::FromRow)]
use crate::models::node::Node;
#[derive(sqlx::FromRow, Debug)]
pub struct Path {
id: String,
title: String,
description: String,
nodes: Vec<Node>,
metadata: Metadata,
}
pub struct PathVersions {
path_id: String,
version_number: String,
#[derive(Debug, sqlx::FromRow)]
pub struct Metadata {
versions: Vec<String>,
created_at: DateTime<Utc>,
updated_at: DateTime<Utc>,
}

View File

@@ -1,4 +1,4 @@
use sqlx::{pool, sqlite::SqlitePool, FromRow};
use sqlx::{sqlite::SqlitePool, FromRow};
use crate::models::path::Path;

View File

@@ -1,5 +1,5 @@
interface Path {
id: number,
id: string,
title: string,
description: string,
nodes: Node[],
@@ -8,4 +8,4 @@ interface Path {
createdAt: Date,
updatedAt: Date,
}
}
}