-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
107 lines (93 loc) · 2.48 KB
/
schema.prisma
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
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Guild {
id String @id
language String @default("en")
modules Json @default("{}")
reactionRoleMessages ReactionRoleMessage[]
commands Json @default("{}")
// ModerationNotes ModerationNote[]
Warnings Warning[]
}
model Member {
guildId String
userId String
@@id([guildId, userId])
}
model User {
id String @id
prefix String
}
model ReactionRoleMessage {
id String @id
channelId String
guild Guild @relation(fields: [guildId], references: [id])
guildId String
mode Int
reactionRoles ReactionRole[]
}
model ReactionRole {
roleId String @id
emoji String
message ReactionRoleMessage @relation(fields: [messageId], references: [id])
messageId String
}
model ActivePrivateRoom {
channelId String @id
hostId String
locked Boolean @default(false)
hidden Boolean @default(false)
}
// Will be added in the future
//model ModerationCase {
// globalId Int @id @default(autoincrement())
// id Int
// guild Guild @relation(fields: [guildId], references: [id])
// executorId String
// userId String
// reason String?
// action String
// createdAt DateTime @default(now())
// User User @relation(fields: [userId], references: [id])
// guildId String
//}
//model ModerationNote {
// globalId Int @id @default(autoincrement())
// id Int
// guild Guild @relation(fields: [guildId], references: [id])
// executorId String
// userId String
// content String
// createdAt DateTime @default(now())
// guildId String
// deleted Boolean @default(false)
//}
model Warning {
globalId Int @id @default(autoincrement())
id Int
guild Guild @relation(fields: [guildId], references: [id])
executorId String
userId String
content String?
createdAt DateTime @default(now())
guildId String
deleted Boolean @default(false)
}
model CommandResult {
id Int @id @default(autoincrement())
commandId String
executor String
result Int
}
model MessageStatistic {
messageId String @id
guildId String
channelId String
authorId String
createdAt DateTime
}