generator client { provider = "prisma-client-js" } datasource db { provider = "mysql" url = env("DATABASE_URL") relationMode = "prisma" } model Room { id String @id @unique @default(cuid()) createdAt DateTime @default(now()) userId String roomName String storyName String visible Boolean votes Vote[] scale String logs Log[] @@index([userId]) } model Vote { id String @id @unique @default(cuid()) createdAt DateTime @default(now()) userId String roomId String value String room Room @relation(fields: [roomId], references: [id], onDelete: Cascade) @@unique([userId, roomId]) @@index([roomId]) } model Log { id String @id @unique @default(cuid()) createdAt DateTime @default(now()) userId String roomId String scale String votes Json roomName String storyName String room Room @relation(fields: [roomId], references: [id], onDelete: Cascade) @@index([userId]) @@index([roomId]) }