Files
euchre_camp/lib/euchre_camp/persistence/relations/tournament_rounds.rb
T

27 lines
891 B
Ruby

# frozen_string_literal: true
module EuchreCamp
module Persistence
module Relations
class TournamentRounds < ROM::Relation[:sql]
schema(:tournament_rounds) do
attribute :id, ROM::Types::Integer, primary_key: true
attribute :event_id, ROM::Types::Integer
attribute :round_number, ROM::Types::Integer
attribute :status, ROM::Types::String.default('pending')
attribute :scheduled_start, ROM::Types::DateTime.optional
attribute :actual_start, ROM::Types::DateTime.optional
attribute :completed_at, ROM::Types::DateTime.optional
attribute :created_at, ROM::Types::DateTime.optional
attribute :updated_at, ROM::Types::DateTime.optional
associations do
belongs_to :event
has_many :bracket_matchups
end
end
end
end
end
end