feat: add team configuration fields to Event model

Add fields for team durability, partner rotation, and configuration:
- teamDurability: permanent, variable, or per_round
- partnerRotation: none, minimize_repeat, maximize_even, elo_based
- allowByes: handle odd participant counts
- teamConfiguration: JSON for additional options
- maxRosterChanges: limit roster changes per player
- requireAdminVerify: for match score verification

Refs #22
This commit is contained in:
2026-04-03 19:26:11 -07:00
parent 6547557ea4
commit 3beaa52335
2 changed files with 16 additions and 0 deletions
@@ -0,0 +1,7 @@
-- AlterTable
ALTER TABLE "events" ADD COLUMN "allowByes" BOOLEAN NOT NULL DEFAULT true,
ADD COLUMN "maxRosterChanges" INTEGER,
ADD COLUMN "partnerRotation" TEXT NOT NULL DEFAULT 'none',
ADD COLUMN "requireAdminVerify" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "teamConfiguration" JSONB,
ADD COLUMN "teamDurability" TEXT NOT NULL DEFAULT 'permanent';
+9
View File
@@ -63,6 +63,7 @@ model Event {
description String? description String?
eventDate DateTime? eventDate DateTime?
eventType String @default("tournament") eventType String @default("tournament")
tournamentType String @default("individual")
format String @default("round_robin") format String @default("round_robin")
status String @default("planned") status String @default("planned")
maxParticipants Int? maxParticipants Int?
@@ -78,6 +79,14 @@ model Event {
teams Team[] teams Team[]
rounds TournamentRound[] rounds TournamentRound[]
// Team configuration fields
teamDurability String @default("permanent") // permanent, variable, per_round
partnerRotation String @default("none") // none, minimize_repeat, maximize_even, elo_based
allowByes Boolean @default(true)
teamConfiguration Json? // Additional configuration options
maxRosterChanges Int? // Maximum roster changes per player
requireAdminVerify Boolean @default(false) // For match score verification
@@map("events") @@map("events")
} }