-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.prisma
104 lines (93 loc) · 2.79 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
generator client {
provider = "prisma-client-py"
recursive_type_depth = 5
interface = "asyncio"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Guild {
id String @id
ttsEnabled Boolean @default(false)
ttsRole String?
ttsLeave Boolean @default(true)
logging String?
links Link[]
voiceGenerator VoiceGenerator[]
premium Boolean @default(false)
botMasterRoles String[]
analytics Boolean @default(false)
Premium Premium? @relation(fields: [premiumId], references: [id])
premiumId String?
}
model Premium {
id String @id @default(cuid())
licenseKey String @unique
maxGuilds Int @default(1)
guilds Guild[]
userId String
strike Int @default(0)
}
enum LinkType {
CATEGORY
STAGE
ALL
PERMANENT
REGULAR
}
model Link {
dbId String @unique @default(cuid())
id String
type LinkType @default(REGULAR)
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
guildId String
linkedRoles String[]
reverseLinkedRoles String[]
suffix String?
speakerRoles String[]
excludeChannels String[]
linkCriteria Json @default("{}")
@@id([id, type])
}
enum VoiceGeneratorType {
DEFAULT
NUMBERED
CLONED
CUSTOM_NAME
}
enum VoiceGeneratorOption {
LOCK
HIDE
TEXT
EDITABLE
OWNER
}
model VoiceGenerator {
id String @id @default(cuid())
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
guildId String
categoryId String
generatorId String
interfaceChannel String?
interfaceMessage String?
openChannels GeneratedChannel[]
type VoiceGeneratorType @default(DEFAULT)
defaultOptions VoiceGeneratorOption[]
defaultUserLimit Int @default(0)
channelLimit Int @default(100)
defaultRole String?
channelName String?
restrictRole String?
hideAtLimit Boolean @default(false)
@@unique([guildId, generatorId])
}
model GeneratedChannel {
id String @id @default(cuid())
channelId String @unique
ownerId String
textChannelId String?
VoiceGenerator VoiceGenerator @relation(fields: [voiceGeneratorId], references: [id], onDelete: Cascade)
voiceGeneratorId String
userEditable Boolean @default(true)
}