mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-30 06:29:11 +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 {
|
model Poll {
|
||||||
id String @id @unique @map("id")
|
id String @id @unique @map("id")
|
||||||
createdAt DateTime @default(now()) @map("created_at")
|
createdAt DateTime @default(now()) @map("created_at")
|
||||||
updatedAt DateTime @updatedAt @map("updated_at")
|
updatedAt DateTime @updatedAt @map("updated_at")
|
||||||
deadline DateTime?
|
deadline DateTime?
|
||||||
title String
|
title String
|
||||||
description String?
|
description String?
|
||||||
location String?
|
location String?
|
||||||
userId String @map("user_id")
|
userId String @map("user_id")
|
||||||
timeZone String? @map("time_zone")
|
timeZone String? @map("time_zone")
|
||||||
closed Boolean @default(false) // @deprecated
|
closed Boolean @default(false) // @deprecated
|
||||||
status PollStatus @default(live)
|
status PollStatus @default(live)
|
||||||
deleted Boolean @default(false)
|
deleted Boolean @default(false)
|
||||||
deletedAt DateTime? @map("deleted_at")
|
deletedAt DateTime? @map("deleted_at")
|
||||||
touchedAt DateTime @default(now()) @map("touched_at")
|
touchedAt DateTime @default(now()) @map("touched_at")
|
||||||
participantUrlId String @unique @map("participant_url_id")
|
participantUrlId String @unique @map("participant_url_id")
|
||||||
adminUrlId String @unique @map("admin_url_id")
|
adminUrlId String @unique @map("admin_url_id")
|
||||||
eventId String? @unique @map("event_id")
|
eventId String? @unique @map("event_id")
|
||||||
hideParticipants Boolean @default(false) @map("hide_participants")
|
hideParticipants Boolean @default(false) @map("hide_participants")
|
||||||
hideScores Boolean @default(false) @map("hide_scores")
|
hideScores Boolean @default(false) @map("hide_scores")
|
||||||
disableComments Boolean @default(false) @map("disable_comments")
|
disableComments Boolean @default(false) @map("disable_comments")
|
||||||
requireParticipantEmail Boolean @default(false) @map("require_participant_email")
|
requireParticipantEmail Boolean @default(false) @map("require_participant_email")
|
||||||
|
|
||||||
user User? @relation(fields: [userId], references: [id])
|
user User? @relation(fields: [userId], references: [id])
|
||||||
event Event? @relation(fields: [eventId], references: [id])
|
event Event? @relation(fields: [eventId], references: [id])
|
||||||
options Option[]
|
options Option[]
|
||||||
participants Participant[]
|
participants Participant[]
|
||||||
watchers Watcher[]
|
watchers Watcher[]
|
||||||
comments Comment[]
|
comments Comment[]
|
||||||
|
|
||||||
@@index([userId], type: Hash)
|
@@index([userId], type: Hash)
|
||||||
@@map("polls")
|
@@map("polls")
|
||||||
|
@ -160,7 +160,7 @@ model Event {
|
||||||
duration Int @default(0) @map("duration_minutes")
|
duration Int @default(0) @map("duration_minutes")
|
||||||
createdAt DateTime @default(now()) @map("created_at")
|
createdAt DateTime @default(now()) @map("created_at")
|
||||||
|
|
||||||
poll Poll?
|
poll Poll?
|
||||||
|
|
||||||
@@index([userId], type: Hash)
|
@@index([userId], type: Hash)
|
||||||
@@map("events")
|
@@map("events")
|
||||||
|
@ -199,7 +199,7 @@ model Participant {
|
||||||
|
|
||||||
model Option {
|
model Option {
|
||||||
id String @id @default(cuid())
|
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")
|
duration Int @default(0) @map("duration_minutes")
|
||||||
pollId String @map("poll_id")
|
pollId String @map("poll_id")
|
||||||
poll Poll @relation(fields: [pollId], references: [id])
|
poll Poll @relation(fields: [pollId], references: [id])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue