From 566e95f95dc1c5a4941490850b8c70ffc43c88f9 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 3 Oct 2020 11:02:03 +0200 Subject: [PATCH] Add note metadata to db schema Signed-off-by: David Mehren Co-authored-by: Yannick Bungers --- docs/dev/db-schema.plantuml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/dev/db-schema.plantuml b/docs/dev/db-schema.plantuml index 3ec0fb4a7..d44a56dd7 100644 --- a/docs/dev/db-schema.plantuml +++ b/docs/dev/db-schema.plantuml @@ -12,6 +12,8 @@ entity "Note" { *alias : text *viewcount : number *ownerId : uuid <> + description: text + title: text } entity "User" { @@ -49,7 +51,7 @@ entity "Identity" { passwordHash : text } -entity "Session" as seesion { +entity "Session" { *id : text -- *expiredAt : number @@ -108,13 +110,18 @@ entity "Group" { *special : boolean } - entity "NoteGroupPermission" { +entity "NoteGroupPermission" { *groupId : number <> *noteId : uuid <> -- *canEdit : boolean } +entity "Tag" { + *id: number <> + *name: text +} + entity "MediaUpload" { *id : text <> -- @@ -136,9 +143,10 @@ Note "1" -- "0..*" NoteGroupPermission NoteGroupPermission "0..*" -- "1" Group Identity "1..*" -- "1" User authToken "1..*" -- "1" User -seesion "1..*" -- "1" User +Session "1..*" -- "1" User Note "0..*" -- "0..*" User : color (Note, User) .. AuthorColors +Note "0..*" -- "0..*" Tag : tags MediaUpload "0..*" -- "1" Note MediaUpload "0..*" -- "1" User @enduml