Aggiunge i tornei con hub, pagina pubblica e tabellone per semifinali e finali.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
class TournamentRound < ApplicationRecord
|
||||
KINDS = %w[round_of_16 quarterfinal semifinal final third_place].freeze
|
||||
|
||||
belongs_to :tournament
|
||||
has_many :matches, dependent: :nullify
|
||||
|
||||
validates :kind, inclusion: { in: KINDS }
|
||||
validates :name, presence: true
|
||||
validates :position, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
|
||||
end
|
||||
Reference in New Issue
Block a user