updated structs a bit

This commit is contained in:
2025-10-28 20:34:10 +01:00
parent c53a4462cd
commit d02c1fa314
6 changed files with 21 additions and 7 deletions

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;