-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.dbml
75 lines (60 loc) · 1.61 KB
/
database.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
// Use DBML to define your database structure
// Docs: https://dbml.dbdiagram.io/docs
// NOTE: OUT OF DATE 11/2/2025
// Put this file into https://dbdiagram.io/d in order to view the entity relationship diagram!
Table questions {
id serial [primary key]
title varchar(100) [not null]
detail text [not null]
info text
image_url varchar(100) [default:null]
}
Table rules {
id serial [primary key]
title varchar(100) [not null]
detail text [not null]
category varchar(50) [not null]
image_url varchar(100) [default:null]
}
Table lore {
id serial [primary key]
title varchar(100) [not null]
detail text [not null]
image_url varchar(100) [default:null]
}
Table choices {
id serial [primary key]
question_id integer
title varchar(100) [not null]
detail text [not null]
image_url varchar(100) [default:null]
}
Table cards {
id serial [primary key]
rule_id integer [default: null]
lore_id integer [default: null]
title varchar(100) [not null]
content text [not null]
}
Table techniques {
id serial [primary key]
name varchar(255) [not null]
prerequisite VARCHAR(255) [default:null]
rank INTEGER [not null]
category VARCHAR(50) [not null]
description TEXT [not null]
activation VARCHAR(255)
effect TEXT [default:null]
}
Table opportunities {
id serial [primary key]
technique_id INTEGER [default:null]
ring VARCHAR(30) [not null]
category VARCHAR(30) [not null]
cost VARCHAR(10) [not null]
effect VARCHAR(255) [not null]
}
Ref: questions.id < choices.question_id
Ref: cards.rule_id > rules.id
Ref: cards.lore_id > lore.id
Ref: techniques.id - opportunities.technique_id