mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-24 03:37:23 +02:00
✨ Allow users to customize poll behaviour (#785)
This commit is contained in:
parent
14cfa2bd50
commit
b1e3f63a2e
58 changed files with 1361 additions and 1042 deletions
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "polls" ADD COLUMN "hide_participants" BOOLEAN NOT NULL DEFAULT false;
|
|
@ -0,0 +1,6 @@
|
|||
-- CreateEnum
|
||||
CREATE TYPE "participant_visibility" AS ENUM ('full', 'scoresOnly', 'limited');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "polls" ADD COLUMN "disable_comments" BOOLEAN NOT NULL DEFAULT false,
|
||||
ADD COLUMN "hide_scores" BOOLEAN NOT NULL DEFAULT false;
|
|
@ -62,6 +62,14 @@ model UserPreferences {
|
|||
@@map("user_preferences")
|
||||
}
|
||||
|
||||
enum ParticipantVisibility {
|
||||
full
|
||||
scoresOnly
|
||||
limited
|
||||
|
||||
@@map("participant_visibility")
|
||||
}
|
||||
|
||||
model Poll {
|
||||
id String @id @unique @map("id")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
@ -88,6 +96,9 @@ model Poll {
|
|||
adminUrlId String @unique @map("admin_url_id")
|
||||
eventId String? @map("event_id")
|
||||
event Event?
|
||||
hideParticipants Boolean @default(false) @map("hide_participants")
|
||||
hideScores Boolean @default(false) @map("hide_scores")
|
||||
disableComments Boolean @default(false) @map("disable_comments")
|
||||
|
||||
@@index([userId], type: Hash)
|
||||
@@map("polls")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue