mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-29 14:17:49 +02:00
Format prisma schema
This commit is contained in:
parent
17dc1ec013
commit
78b4ce3eb9
1 changed files with 25 additions and 25 deletions
|
@ -117,34 +117,34 @@ enum PollStatus {
|
|||
}
|
||||
|
||||
model Poll {
|
||||
id String @id @unique @map("id")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
id String @id @unique @map("id")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
deadline DateTime?
|
||||
title String
|
||||
description String?
|
||||
location String?
|
||||
userId String @map("user_id")
|
||||
timeZone String? @map("time_zone")
|
||||
closed Boolean @default(false) // @deprecated
|
||||
status PollStatus @default(live)
|
||||
deleted Boolean @default(false)
|
||||
deletedAt DateTime? @map("deleted_at")
|
||||
touchedAt DateTime @default(now()) @map("touched_at")
|
||||
participantUrlId String @unique @map("participant_url_id")
|
||||
adminUrlId String @unique @map("admin_url_id")
|
||||
eventId String? @unique @map("event_id")
|
||||
hideParticipants Boolean @default(false) @map("hide_participants")
|
||||
hideScores Boolean @default(false) @map("hide_scores")
|
||||
disableComments Boolean @default(false) @map("disable_comments")
|
||||
requireParticipantEmail Boolean @default(false) @map("require_participant_email")
|
||||
userId String @map("user_id")
|
||||
timeZone String? @map("time_zone")
|
||||
closed Boolean @default(false) // @deprecated
|
||||
status PollStatus @default(live)
|
||||
deleted Boolean @default(false)
|
||||
deletedAt DateTime? @map("deleted_at")
|
||||
touchedAt DateTime @default(now()) @map("touched_at")
|
||||
participantUrlId String @unique @map("participant_url_id")
|
||||
adminUrlId String @unique @map("admin_url_id")
|
||||
eventId String? @unique @map("event_id")
|
||||
hideParticipants Boolean @default(false) @map("hide_participants")
|
||||
hideScores Boolean @default(false) @map("hide_scores")
|
||||
disableComments Boolean @default(false) @map("disable_comments")
|
||||
requireParticipantEmail Boolean @default(false) @map("require_participant_email")
|
||||
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
event Event? @relation(fields: [eventId], references: [id])
|
||||
options Option[]
|
||||
participants Participant[]
|
||||
watchers Watcher[]
|
||||
comments Comment[]
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
event Event? @relation(fields: [eventId], references: [id])
|
||||
options Option[]
|
||||
participants Participant[]
|
||||
watchers Watcher[]
|
||||
comments Comment[]
|
||||
|
||||
@@index([userId], type: Hash)
|
||||
@@map("polls")
|
||||
|
@ -160,7 +160,7 @@ model Event {
|
|||
duration Int @default(0) @map("duration_minutes")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
poll Poll?
|
||||
poll Poll?
|
||||
|
||||
@@index([userId], type: Hash)
|
||||
@@map("events")
|
||||
|
@ -199,7 +199,7 @@ model Participant {
|
|||
|
||||
model Option {
|
||||
id String @id @default(cuid())
|
||||
startTime DateTime @db.Timestamp(0) @map("start_time")
|
||||
startTime DateTime @map("start_time") @db.Timestamp(0)
|
||||
duration Int @default(0) @map("duration_minutes")
|
||||
pollId String @map("poll_id")
|
||||
poll Poll @relation(fields: [pollId], references: [id])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue