updated structs a bit
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#[derive(Debug, sqlx::FromRow)]
|
||||
pub struct Node {
|
||||
id: u32,
|
||||
title: String,
|
||||
|
||||
@@ -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>,
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sqlx::{pool, sqlite::SqlitePool, FromRow};
|
||||
use sqlx::{sqlite::SqlitePool, FromRow};
|
||||
|
||||
use crate::models::path::Path;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user