My personal-knowledge-system, with deeply integrated task tracking and long term goal planning capabilities.
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: representation of links!

+28 -3
+1
Cargo.lock
··· 4322 4322 "rgb", 4323 4323 "sea-orm", 4324 4324 "sea-orm-migration", 4325 + "serde", 4325 4326 ] 4326 4327 4327 4328 [[package]]
+1
crates/dto/migration/Cargo.toml
··· 13 13 nanoid = "0.4.0" 14 14 sea-orm = "2.0.0-rc" 15 15 rgb = "0.8.53" 16 + serde = {workspace = true} 16 17 17 18 [dependencies.sea-orm-migration] 18 19 version = "2.0.0-rc"
+2 -1
crates/dto/migration/src/types/nano_id.rs
··· 2 2 3 3 use nanoid::nanoid; 4 4 use sea_orm::DeriveValueType; 5 + use serde::{Deserialize, Serialize}; 5 6 6 - #[derive(Clone, Debug, PartialEq, Eq, DeriveValueType)] 7 + #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, DeriveValueType)] 7 8 #[sea_orm(value_type = "String")] 8 9 pub struct NanoId(pub(crate) String); 9 10
+18
src/types/link.rs
··· 1 + use serde::{Deserialize, Serialize}; 2 + 3 + use crate::types::ZettelId; 4 + 5 + #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord)] 6 + pub struct Link { 7 + pub source: ZettelId, 8 + pub dest: ZettelId, 9 + } 10 + 11 + impl Link { 12 + pub fn new(source: impl Into<ZettelId>, dest: impl Into<ZettelId>) -> Self { 13 + Self { 14 + source: source.into(), 15 + dest: dest.into(), 16 + } 17 + } 18 + }
+4 -1
src/types/mod.rs
··· 9 9 10 10 mod zettel; 11 11 pub use zettel::Zettel; 12 - // pub use zettel::ZettelId; 12 + pub use zettel::ZettelId; 13 13 14 14 mod group; 15 15 pub use group::Group; ··· 20 20 21 21 mod workspace; 22 22 pub use workspace::Workspace; 23 + 24 + mod link; 25 + pub use link::Link; 23 26 24 27 mod kasten; 25 28 pub use kasten::Kasten;
+2 -1
src/types/zettel.rs
··· 1 1 use dto::{DateTime, TagEntity, ZettelActiveModel, ZettelEntity, ZettelModelEx}; 2 + use serde::{Deserialize, Serialize}; 2 3 use std::{ 3 4 fmt::Display, 4 5 path::{Path, PathBuf}, ··· 29 30 /// A `ZettelId` is essentially a `NanoId`, 30 31 /// with some `Zettel` specific helpers written 31 32 /// onto it 32 - #[derive(Debug, Clone)] 33 + #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord)] 33 34 pub struct ZettelId(NanoId); 34 35 35 36 impl Zettel {