Files
euchre_camp/app/repositories/events.rb
T
david ac858f1e6d feat(tournaments): add partnership tracking and tournament management
Implement comprehensive partnership tracking system and tournament
management features including round-robin, single/double elimination,
and Swiss system pairings.

Changes:
- Add partnership_games and partnership_stats tables
- Implement PartnershipTracker service for recording partnership data
- Add tournament generator with multiple formats
- Create tournament management actions and views
- Add acceptance tests for partnership tracking
- Fix PartnershipTracker to use single snapshot per player per match
- Fix round-robin test to query by round_number instead of hardcoded ID

Note: All 8 acceptance tests now passing
2026-03-27 12:25:34 -07:00

28 lines
545 B
Ruby

# frozen_string_literal: true
require 'rom-repository'
module EuchreCamp
module Repositories
class Events < ::EuchreCamp::Repository[:events]
commands :create, update: :by_pk, delete: :by_pk
def all
events.to_a
end
def by_id(id)
events.by_pk(id).one!
end
def upcoming
events.where(status: ['planned', 'active']).order(:event_date).to_a
end
def completed
events.where(status: 'completed').order(Sequel.desc(:event_date)).to_a
end
end
end
end