-
Notifications
You must be signed in to change notification settings - Fork 0
/
database_design.puml
67 lines (50 loc) · 946 Bytes
/
database_design.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
@startuml
note top of User {
User needs to register a member by email.
The email cnanot be duplicate.
}
class User {
name : str
}
class Email {
user_id :int
email_address : str
}
User ||--|{ Email
note top of FriendConnection {
User can connect others' email.
}
class FriendConnection {
user_id : int
friend_user_id: int
}
User ||--o{ FriendConnection
User ||--o{ FriendConnection
note top of UserGroup {
The amount_detail only can be added in a group.
}
class UserGroup {
id: int
}
class UserGroupUserAssociation {
user_group_id
user_id
}
UserGroupUserAssociation ||--|{ UserGroup
UserGroupUserAssociation ||--|{ User
class AmountDetail {
amount_paid : int
description : str
}
UserGroup ||--|{ AmountDetail
class PaidUser {
user_id
amount_paid
}
class SharedUser {
user_id
amount_shared
}
AmountDetail ||--|{ PaidUser
AmountDetail ||--|{ SharedUser
@enduml