Last active
September 21, 2024 09:13
-
-
Save MrModest/d0708d4303bc85761e0d7b6674e45104 to your computer and use it in GitHub Desktop.
NotesDB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum class PageType { Note, Table, List } | |
enum class PropertyType { String, Number, Select, MultiSelect, Date, Time, DateTime, Checkbox, Links } | |
class PropertyOption ( | |
val id: String, | |
val order: Int, | |
val title: String, | |
val color: String // #FF0000 | |
) | |
class Property ( | |
val key: String, | |
val type: PropertyType, | |
val default: String, // if 'type is 'Select' or 'MultiSelect', contains ID(s). | |
val options: PropertyOption[] | |
) | |
class PageTemplate ( | |
val id: UUID, | |
val name: String, | |
val type: PageType, | |
val properties: Property[] | |
) | |
class Page ( | |
val id: UUID, // or Timestamp | |
val title: String, | |
val aliases: String[], | |
val template: PageTemplate, | |
val virtualPath: String, // to emulate hierarchy in UI | |
val createdAt: DateTime, | |
val updatedAt: DateTime, | |
val properties: Map<String, String>, | |
val backlinks: UUID[] // IDs of pages that explicitely linked this page | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- .vault/ | |
- settings.yml | |
- templates/ | |
- 7d6bc389-05af-46c7-b06b-a5b546fb99d3.yml | |
- db/ | |
- db.sqlite // or Redis | |
- notes/ | |
- cd5428b3-9d99-41f7-940f-0765a145ae83.md // or 1726839184.md | |
- assets/ | |
- 960cd651-d3a4-482f-b5eb-119299f9ddc7.png | |
- dc9a6bad-751c-424e-b12e-6b26501685b5.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment