Prisma formatting
This commit is contained in:
parent
c140f0b8c2
commit
0d38f87215
1 changed files with 69 additions and 68 deletions
|
@ -67,7 +67,7 @@ model VerificationToken {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Room {
|
model Room {
|
||||||
id String @id @default(cuid()) @unique
|
id String @id @unique @default(cuid())
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
userId String
|
userId String
|
||||||
roomName String
|
roomName String
|
||||||
|
@ -82,19 +82,20 @@ model Room {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Vote {
|
model Vote {
|
||||||
id String @id @default(cuid()) @unique
|
id String @id @unique @default(cuid())
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
userId String
|
userId String
|
||||||
roomId String
|
roomId String
|
||||||
value String
|
value String
|
||||||
owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
@@unique([userId, roomId])
|
@@unique([userId, roomId])
|
||||||
@@index([roomId])
|
@@index([roomId])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Log {
|
model Log {
|
||||||
id String @id @default(cuid()) @unique
|
id String @id @unique @default(cuid())
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
userId String
|
userId String
|
||||||
roomId String
|
roomId String
|
||||||
|
|
Loading…
Add table
Reference in a new issue