-
Notifications
You must be signed in to change notification settings - Fork 0
/
econ_schema.sql
39 lines (35 loc) · 885 Bytes
/
econ_schema.sql
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
CREATE TABLE users(
uid INTEGER PRIMARY KEY NOT NULL,
did INTEGER NOT NULL,
rtime INTEGER NOT NULL,
bank INTEGER NOT NULL DEFAULT 0,
wallet INTEGER NOT NULL DEFAULT 0
);
CREATE TABLE cooldowns(
cid INTEGER PRIMARY KEY NOT NULL,
start INTEGER NOT NULL,
until INTEGER,
name TEXT NOT NULL
);
CREATE TABLE items(
eid INTEGER PRIMARY KEY NOT NULL,
type TEXT NOT NULL,
ctime INTEGER NOT NULL,
owner INTEGER,
FOREIGN KEY(owner) REFERENCES users(did)
);
CREATE TABLE effects(
eid INTEGER PRIMARY KEY NOT NULL,
type type NOT NULL,
until INTEGER,
user INTEGER NOT NULL,
FOREIGN KEY(user) REFERENCES users(did)
);
CREATE TABLE bans(
bid INTEGER PRIMARY KEY NOT NULL,
user INTEGER NOT NULL,
time INTEGER NOT NULL,
until INTEGER,
reason TEXT NOT NULL,
FOREIGN KEY(user) REFERENCES users(did)
);