-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiagram.puml
70 lines (60 loc) · 1.38 KB
/
diagram.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@startuml Diagram
enum UserState {
ONLINE
OFFLINE
DND
}
enum UserNotifySettings {
ALL
MENTIONED
NONE
}
Class "User" as rUser {
- id : number <<generated>>
- nickname: string
- password: string <<hidden>>
- name: string
- surname : string
- email: string
- state: UserState
- notifications: UserNotifySettings
}
class "Message" as rMessage {
- id: number <<generated>>
- createdBy: number <<FK>>
- channelId: number <<FK>>
- content: string
}
class "Channel" as rChannel {
- id: number <<generated>>
- name: string
- channelAdmin: number <<FK>>
- isPublic: boolean
}
Class "UserMembership" as rUserMembership {
- userId: number <<FK>>
- channelId: number <<FK>>
}
class "Ban" as rBan {
- id: number <<generated>>
- channelId: number <<FK>>
- bannedById: number <<FK>>
- bannedUserId: number <<FK>>
}
class "BannedUser" as rBannedUser {
- id: number <<generated>>
- bannedUserId: number <<FK>>
- channelId: number <<FK>>
- bannedById: number <<FK>>
}
rUserMembership o--o rUser
rUserMembership o--o rChannel
rMessage "1" o--> "1..*" rChannel
rBan "1" o--> "1..*" rChannel
rBan "1" o--> "0..*" rUser
rBannedUser "1" o--> "1..*" rChannel
rBannedUser "1" o--> "0..*" rUser : bannedUser
rChannel "1" o--> "*" rMessage
rChannel "*" o--> "*" rUser
rChannel "1" o--> "*" rBan
@enduml