mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-28 16:40:58 -05:00
Removed special table name in Note object
and changed table names in plantuml file Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
7d9344a95d
commit
5246f0c05d
2 changed files with 46 additions and 46 deletions
|
@ -2,18 +2,18 @@
|
||||||
hide circle
|
hide circle
|
||||||
skinparam nodesep 60
|
skinparam nodesep 60
|
||||||
|
|
||||||
entity "Note" {
|
entity "note" {
|
||||||
*id : uuid <<generated>>
|
*id : uuid <<generated>>
|
||||||
--
|
--
|
||||||
*shortid : text
|
*shortid : text
|
||||||
alias : text
|
alias : text
|
||||||
*viewcount : number
|
*viewcount : number
|
||||||
*ownerId : uuid <<FK User>>
|
*ownerId : uuid <<FK user>>
|
||||||
description: text
|
description: text
|
||||||
title: text
|
title: text
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "User" {
|
entity "user" {
|
||||||
*id : uuid <<generated>>
|
*id : uuid <<generated>>
|
||||||
--
|
--
|
||||||
*userName : text
|
*userName : text
|
||||||
|
@ -24,17 +24,17 @@ entity "User" {
|
||||||
email : text
|
email : text
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "AuthToken" as authToken{
|
entity "auth_token"{
|
||||||
*id : number <<generated>>
|
*id : number <<generated>>
|
||||||
--
|
--
|
||||||
*userId : uuid
|
*userId : uuid
|
||||||
*accessToken : text
|
*accessToken : text
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "Identity" {
|
entity "identity" {
|
||||||
*id : number
|
*id : number
|
||||||
--
|
--
|
||||||
*userId : uuid <<FK User>>
|
*userId : uuid <<FK user>>
|
||||||
' Identifies the external login provider and is set in the config
|
' Identifies the external login provider and is set in the config
|
||||||
*providerName : text
|
*providerName : text
|
||||||
*syncSource : boolean
|
*syncSource : boolean
|
||||||
|
@ -48,7 +48,7 @@ entity "Identity" {
|
||||||
passwordHash : text
|
passwordHash : text
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "Session" {
|
entity "session" {
|
||||||
*id : text
|
*id : text
|
||||||
--
|
--
|
||||||
*expiredAt : number
|
*expiredAt : number
|
||||||
|
@ -56,47 +56,47 @@ entity "Session" {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
entity "Revision" {
|
entity "revision" {
|
||||||
*id : number <<generated>>
|
*id : number <<generated>>
|
||||||
--
|
--
|
||||||
*noteId : uuid <<FK Note>>
|
*noteId : uuid <<FK note>>
|
||||||
*content : text
|
*content : text
|
||||||
*patch : text
|
*patch : text
|
||||||
*createdAt : date
|
*createdAt : date
|
||||||
*length : number
|
*length : number
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "Authorship" {
|
entity "authorship" {
|
||||||
*id : uuid <<generated>>
|
*id : uuid <<generated>>
|
||||||
--
|
--
|
||||||
*userId : uuid <FK User>>
|
*userId : uuid <FK user>>
|
||||||
*startPos : number
|
*startPos : number
|
||||||
*endPos : number
|
*endPos : number
|
||||||
*createdAt : date
|
*createdAt : date
|
||||||
*updatedAt : date
|
*updatedAt : date
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "RevisionAuthorship" {
|
entity "revision_authorship" {
|
||||||
*revisionId : number <<FK Revision>>
|
*revisionId : number <<FK revision>>
|
||||||
*authorshipId : uuid <<FK Authorship>>
|
*authorshipId : uuid <<FK authorship>>
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "AuthorColors" {
|
entity "author_colors" {
|
||||||
*noteId : uuid <<FK Note>>
|
*noteId : uuid <<FK note>>
|
||||||
*userId : uuid <<FK User>>
|
*userId : uuid <<FK user>>
|
||||||
--
|
--
|
||||||
*color : text
|
*color : text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
entity "NoteUserPermission" {
|
entity "note_user_permission" {
|
||||||
*userId : uuid <<FK User>>
|
*userId : uuid <<FK user>>
|
||||||
*noteId : uuid <<FK Note>>
|
*noteId : uuid <<FK note>>
|
||||||
--
|
--
|
||||||
*canEdit : boolean
|
*canEdit : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "Group" {
|
entity "group" {
|
||||||
*id : number <<generated>>
|
*id : number <<generated>>
|
||||||
--
|
--
|
||||||
*name : text <<unique>>
|
*name : text <<unique>>
|
||||||
|
@ -107,48 +107,48 @@ entity "Group" {
|
||||||
*special : boolean
|
*special : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "NoteGroupPermission" {
|
entity "note_group_permission" {
|
||||||
*groupId : number <<FK Group>>
|
*groupId : number <<FK group>>
|
||||||
*noteId : uuid <<FK Note>>
|
*noteId : uuid <<FK note>>
|
||||||
--
|
--
|
||||||
*canEdit : boolean
|
*canEdit : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "Tag" {
|
entity "tag" {
|
||||||
*id: number <<generated>>
|
*id: number <<generated>>
|
||||||
*name: text
|
*name: text
|
||||||
}
|
}
|
||||||
|
|
||||||
entity "MediaUpload" {
|
entity "media_upload" {
|
||||||
*id : text <<unique>>
|
*id : text <<unique>>
|
||||||
--
|
--
|
||||||
*noteId : uuid <<FK Note>>
|
*noteId : uuid <<FK note>>
|
||||||
*userId : uuid <<FK User>>
|
*userId : uuid <<FK user>>
|
||||||
*backendType: text
|
*backendType: text
|
||||||
backendData: text
|
backendData: text
|
||||||
*createdAt : date
|
*createdAt : date
|
||||||
}
|
}
|
||||||
|
|
||||||
User "1" -- "0..*" Note: owner
|
user "1" -- "0..*" note: owner
|
||||||
User "1" -u- "1..*" Identity
|
user "1" -u- "1..*" identity
|
||||||
User "1" - "1..*" authToken
|
user "1" - "1..*" auth_token
|
||||||
User "1" -l- "1..*" Session
|
user "1" -l- "1..*" session
|
||||||
User "1" - "0..*" MediaUpload
|
user "1" - "0..*" media_upload
|
||||||
User "0..*" -- "0..*" Note
|
user "0..*" -- "0..*" note
|
||||||
User "1" - "0..*" Authorship
|
user "1" - "0..*" authorship
|
||||||
|
|
||||||
(User, Note) . AuthorColors
|
(user, note) . author_colors
|
||||||
|
|
||||||
Revision "0..*" - "0..*" Authorship
|
revision "0..*" - "0..*" authorship
|
||||||
(Revision, Authorship) .. RevisionAuthorship
|
(revision, authorship) .. revision_authorship
|
||||||
|
|
||||||
MediaUpload "0..*" -- "1" Note
|
media_upload "0..*" -- "1" note
|
||||||
Note "1" - "1..*" Revision
|
note "1" - "1..*" revision
|
||||||
Note "0..*" -l- "0..*" Tag
|
note "0..*" -l- "0..*" tag
|
||||||
Note "0..*" -- "0..*" Group
|
note "0..*" -- "0..*" group
|
||||||
|
|
||||||
User "0..*" -- "0..*" Note
|
user "0..*" -- "0..*" note
|
||||||
(User, Note) . NoteUserPermission
|
(user, note) . note_user_permission
|
||||||
(Note, Group) . NoteGroupPermission
|
(note, group) . note_group_permission
|
||||||
|
|
||||||
@enduml
|
@enduml
|
||||||
|
|
|
@ -21,7 +21,7 @@ import { User } from '../users/user.entity';
|
||||||
import { AuthorColor } from './author-color.entity';
|
import { AuthorColor } from './author-color.entity';
|
||||||
import { Tag } from './tag.entity';
|
import { Tag } from './tag.entity';
|
||||||
|
|
||||||
@Entity('Notes')
|
@Entity()
|
||||||
export class Note {
|
export class Note {
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
id: string;
|
id: string;
|
||||||
|
|
Loading…
Reference in a new issue