Skip to content

Commit

Permalink
Update schema.prisma
Browse files Browse the repository at this point in the history
Signed-off-by: Appu <77108939+appujet@users.noreply.github.com>
  • Loading branch information
appujet authored Aug 1, 2024
1 parent 4fe61df commit a93d904
Showing 1 changed file with 75 additions and 42 deletions.
117 changes: 75 additions & 42 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,112 @@
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x"]
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x"]
}

datasource db {
provider = "sqlite"
url = "file:./lavamusic.db"
provider = "postgresql"
url = env("DATABASE_URL")
}

model Guild {
guildId String @id
prefix String
language String?
stay Stay?
dj Dj?
roles Role[]
botchannel Botchannel?
setup Setup?
guildId String @id
prefix String
language String?
stay Stay?
dj Dj?
roles Role[]
botchannel Botchannel?
setup Setup?
}

model Stay {
guildId String @id
textId String
voiceId String
Guild Guild @relation(fields: [guildId], references: [guildId])
guildId String @id
textId String
voiceId String
Guild Guild @relation(fields: [guildId], references: [guildId])
}

model Dj {
guildId String @id
mode Boolean
Guild Guild @relation(fields: [guildId], references: [guildId])
guildId String @id
mode Boolean
Guild Guild @relation(fields: [guildId], references: [guildId])
}

model Role {
guildId String
roleId String
Guild Guild @relation(fields: [guildId], references: [guildId])
guildId String
roleId String
Guild Guild @relation(fields: [guildId], references: [guildId])
@@unique([guildId, roleId])
@@unique([guildId, roleId])
}

model Playlist {
id String @id @default(uuid())
userId String
name String
songs Song[]
id String @id @default(uuid())
userId String
name String
songs Song[]
@@unique([userId, name])
@@unique([userId, name])
}

model Song {
id String @id @default(uuid())
track String
playlistId String
playlist Playlist @relation(fields: [playlistId], references: [id])
id String @id @default(uuid())
track String
playlistId String
playlist Playlist @relation(fields: [playlistId], references: [id])
@@unique([track, playlistId])
@@unique([track, playlistId])
}

model Botchannel {
guildId String @id
textId String
Guild Guild @relation(fields: [guildId], references: [guildId])
guildId String @id
textId String
Guild Guild @relation(fields: [guildId], references: [guildId])
}

model Setup {
guildId String @id
textId String
messageId String
Guild Guild @relation(fields: [guildId], references: [guildId])
guildId String @id
textId String
messageId String
Guild Guild @relation(fields: [guildId], references: [guildId])
}

model Premium {
userId String @id
guildId String
userId String @id
guildId String
}

enum Languages {
EnglishUS
EnglishGB
German
Bulgarian
ChineseCN
ChineseTW
Croatian
Czech
Danish
Dutch
Finnish
French
Greek
Hindi
Hungarian
Italian
Japanese
Korean
Lithuanian
Norwegian
Polish
PortugueseBR
Romanian
Russian
SpanishES
Swedish
Thai
Turkish
Ukrainian
Vietnamese
}

0 comments on commit a93d904

Please sign in to comment.