add: journal note tags and directories

This commit is contained in:
trisua 2025-06-21 19:44:28 -04:00
parent a37312fecf
commit af6fbdf04e
16 changed files with 722 additions and 78 deletions

View file

@ -22,6 +22,10 @@ pub struct Journal {
pub owner: usize,
pub title: String,
pub privacy: JournalPrivacyPermission,
/// An array of directories notes can be placed in.
///
/// `Vec<(id, parent id, name)>`
pub dirs: Vec<(usize, usize, String)>,
}
impl Journal {
@ -33,6 +37,7 @@ impl Journal {
owner,
title,
privacy: JournalPrivacyPermission::default(),
dirs: Vec::new(),
}
}
}
@ -49,6 +54,12 @@ pub struct Note {
pub journal: usize,
pub content: String,
pub edited: usize,
/// The "id" of the directoryy this note is in.
///
/// Directories are held in the journal in the `dirs` column.
pub dir: usize,
/// An array of tags associated with the note.
pub tags: Vec<String>,
}
impl Note {
@ -64,6 +75,8 @@ impl Note {
journal,
content,
edited: created,
dir: 0,
tags: Vec::new(),
}
}
}