model Chest {
id String @id @default(cuid()) @map("id")
name String @map("name")
imageUrl String? @map("image_url")
description String? @map("description")
rarity Rarity @map("rarity")
amount Int? @map("amount")
gameId String @map("game_id")
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
currencies ChestCurrency[]
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@unique([gameId, rarity])
@@index([gameId])
@@map("chests")
}
model Chest {
id String @id @default(cuid()) @map("id")
name String @map("name")
imageUrl String? @map("image_url")
description String? @map("description")
rarity Rarity @map("rarity")
amount Int? @map("amount")
gameId String @map("game_id")
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
currencies ChestCurrency[]
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@unique([gameId, rarity])
@@index([gameId])
@@map("chests")
}