Repository navigation
Expand file tree
/
Copy pathschema.prisma
More file actions
99 lines (87 loc) · 2.6 KB
/
Copy pathschema.prisma
File metadata and controls
99 lines (87 loc) · 2.6 KB
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
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model FileCache {
hash String @id
bytes Int
accessedAt DateTime
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model KeyValueCache {
key String @id
value String
expiresAt DateTime
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Setting {
guildId String @id
playlistLimit Int @default(50)
secondsToWaitAfterQueueEmpties Int @default(30)
leaveIfNoListeners Boolean @default(true)
queueAddResponseEphemeral Boolean @default(false)
autoAnnounceNextSong Boolean @default(false)
defaultVolume Int @default(100)
defaultQueuePageSize Int @default(10)
turnDownVolumeWhenPeopleSpeak Boolean @default(false)
turnDownVolumeWhenPeopleSpeakTarget Int @default(20)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model FavoriteQuery {
id Int @id @default(autoincrement())
guildId String
authorId String
name String
query String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([guildId, name])
}
model ListeningSession {
id String @id
guildId String
voiceChannelId String
channelId String?
messageId String?
startedAt DateTime
endedAt DateTime?
endReason String?
recoveryPending Boolean @default(false)
entries ListeningSessionEntry[]
historyMessages ListeningSessionMessage[]
@@index([guildId, startedAt])
@@index([endedAt])
@@index([recoveryPending])
}
model ListeningSessionEntry {
id String @id
sessionId String
position Int
title String
artist String
url String
source String
length Float
offset Float
requestedBy String
startedAt DateTime
endedAt DateTime?
status String
session ListeningSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
@@unique([sessionId, position])
}
model ListeningSessionMessage {
sessionId String
position Int
messageId String?
afterMessageId String?
nonce String?
session ListeningSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
@@id([sessionId, position])
}