Preskoči na sadržaj

E2-F1: Match CRUD API

Epic: E2: Match & Stadium Management

Size: M (Medium)

Problem / Outcome

Admins need to create and manage matches.

Scope

In-Scope:

  • CRUD /admin/matches endpoint
  • Fields: home_team, away_team, competition, date_time, venue_id, status
  • Draft/published states
  • Match status transitions

Out-of-Scope:

  • Sales phase configuration (separate feature)

Acceptance Criteria

  • AC1: Given valid match data, when admin creates match, then match ID is generated and match is in "draft" status
  • AC2: Given draft match, when admin publishes, then status changes to "published" and match appears in app
  • AC3: Given published match, when admin updates kick-off time, then system prompts for notification preference

Data Model Impact

Match table:
- id (UUID, PK)
- home_team (VARCHAR)
- away_team (VARCHAR)
- competition (VARCHAR)
- kick_off_time (TIMESTAMP)
- venue_id (UUID, FK)
- status (ENUM: draft, published, active, completed, cancelled)
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP)

Permissions/Roles

  • Admin (Match Manager)

How to Verify

npm test -- --grep "match CRUD"

Expected: Create, read, update, delete work; status transitions correct.

Dependencies

Implementation Tasks

See E2: Match ## Doc References Stadium Tasks

Doc References


Last Updated: January 2026