-
-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
393 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
generator client { | ||
provider = "prisma-client-js" | ||
binaryTargets = ["native", "debian-openssl-3.0.x"] | ||
} | ||
|
||
datasource db { | ||
provider = "mongodb" | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
model Bot { | ||
botId String @id @map("_id") | ||
totalPlaySong Int | ||
history Track[] | ||
} | ||
|
||
model Guild { | ||
guildId String @id @map("_id") @db.ObjectId | ||
prefix String | ||
language String? @default("EnglishUS") | ||
stay Stay? | ||
dj Dj? | ||
roles Role[] | ||
setup Setup? | ||
history Track[] | ||
} | ||
|
||
model Stay { | ||
guildId String @id @map("_id") @db.ObjectId | ||
textId String | ||
voiceId String | ||
Guild Guild @relation(fields: [guildId], references: [guildId]) | ||
} | ||
|
||
model Dj { | ||
guildId String @id @map("_id") @db.ObjectId | ||
mode Boolean | ||
Guild Guild @relation(fields: [guildId], references: [guildId]) | ||
} | ||
|
||
model Role { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildId String @db.ObjectId | ||
roleId String | ||
Guild Guild @relation(fields: [guildId], references: [guildId]) | ||
@@unique([guildId, roleId]) | ||
} | ||
|
||
model Playlist { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
userId String | ||
name String | ||
tracks String? // Store the array of encoded tracks as a JSON string | ||
@@unique([userId, name]) | ||
} | ||
|
||
model Setup { | ||
guildId String @id @map("_id") @db.ObjectId | ||
textId String | ||
messageId String | ||
Guild Guild @relation(fields: [guildId], references: [guildId]) | ||
} | ||
|
||
model Track { | ||
identifier String @id @map("_id") @db.ObjectId | ||
encoded String | ||
played Int @default(0) | ||
lastPlayed DateTime? @default(now()) | ||
author User @relation(fields: [authorId], references: [userId]) | ||
authorId String | ||
bot Bot @relation(fields: [botId], references: [botId]) | ||
botId String | ||
guild Guild @relation(fields: [guildId], references: [guildId]) | ||
guildId String @db.ObjectId | ||
} | ||
|
||
model User { | ||
userId String @id @map("_id") | ||
history Track[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.