brackt/app/models/index.ts
Chris Parsons 5a47300110
feat(models): add canonical tournament, participant, result, surface-elo models
Adds CRUD modules for the canonical tables created in commit 775b905.
Each module mirrors existing app/models conventions (database() from
~/database/context, schema from ~/database/schema, mock-based tests).

Key implementation notes:
- participant.ts exports use "Canonical" prefix (CanonicalParticipant,
  createCanonicalParticipant, etc.) to avoid collision with existing
  season-participant.ts exports
- All four models include comprehensive unit tests following the
  audit-log.test.ts pattern
- Tests use mocked db responses (no real database access)
- Upsert functions use onConflictDoUpdate for appropriate unique constraints

Part of Phase 1b of canonical tournament layer migration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:16:53 +00:00

24 lines
767 B
TypeScript

// Re-export all model functions and types
export * from "./user";
export * from "./league";
export * from "./season";
export * from "./team";
export * from "./commissioner";
export * from "./sport";
export * from "./sports-season";
export * from "./season-participant";
export * from "./season-template";
export * from "./season-template-sport";
export * from "./season-sport";
export * from "./participant-result";
export * from "./draft-slot";
export * from "./draft-pick";
export * from "./draft-queue";
export * from "./draft-timer";
export * from "./draft-utils";
export * from "./watchlist";
export * from "./audit-log";
export * from "./tournament";
export * from "./participant";
export * from "./tournament-result";
export * from "./canonical-surface-elo";