-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherd.dbml
107 lines (95 loc) · 2.04 KB
/
erd.dbml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// https://dbdiagram.io/d/wable-64888412722eb77494e48e6a
// Use DBML to define your database structure
// Docs: https://dbml.dbdiagram.io/docs
Project project_name {
database_type: 'MySQL'
Note: 'Description of the project'
}
Table users {
id int [primary key]
gender varchar
name varchar [not null, unique]
nickname string [not null, unique]
birth date
profile_image_url varchar
created_at timestamp
updated_at timestamp
}
Table profiles {
id int [primary key]
user_id int [ref: > users.id]
group_id int [ref: > groups.id]
nickname varchar
profile_image_url varchar
descriptions varchar
created_at timestamp
updated_at timestamp
}
Table profile_questions {
id int [primary key]
profile_id int [ref: > profiles.id]
sid questionName
question varchar
question_type questionType
answers varchar
created_at timestamp
updated_at timestamp
}
Table groups {
id int [primary key]
name varchar // 그룹명
owner_id int [ref: > users.id]
created_at timestamp
updated_at timestamp
}
Table user_groups {
id int [primary key]
user_id int [ref: > users.id]
group_id int [ref: > groups.id]
position varchar
created_at timestamp
updated_at timestamp
}
Table cards {
id int [primary key]
sid cardName
from_user_id int [ref: > users.id]
from_user_name varchar
to_user_id int [ref: > users.id]
to_user_name varchar
group_id int [ref: > groups.id]
content varchar
is_visible bool
created_at timestamp
updated_at timestamp
}
enum cardName {
"GREETING"
"CELEBRATION"
"ENCOURAGEMENT"
"GRATITUDE"
}
Table group_questions {
id int [primary key]
group_id int [ref: > groups.id]
question_id int [ref: > questions.id]
Note: "그룹들이 필수로 받고 싶은 질문 항목"
}
Table questions {
id int [primary key]
sid questionName
question varchar
question_type questionType
selections varchar [Note: "선택지 리스트"]
created_at timestamp
updated_at timestamp
}
enum questionType {
"OPEN_ENDED"
"MULTIPLE_CHOICE"
}
enum questionName {
"MBTI"
"HOBBY"
"CUSTOM"
}