mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 01:01:20 +10:00
feat(collections): backend
This commit is contained in:
20
prisma/schema/collection.prisma
Normal file
20
prisma/schema/collection.prisma
Normal file
@ -0,0 +1,20 @@
|
||||
model Collection {
|
||||
id String @id @default(uuid())
|
||||
name String
|
||||
|
||||
isDefault Boolean @default(false)
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
|
||||
entries CollectionEntry[]
|
||||
}
|
||||
|
||||
model CollectionEntry {
|
||||
collectionId String
|
||||
collection Collection @relation(fields: [collectionId], references: [id])
|
||||
|
||||
gameId String
|
||||
game Game @relation(fields: [gameId], references: [id])
|
||||
|
||||
@@id([collectionId, gameId])
|
||||
}
|
||||
Reference in New Issue
Block a user