turniere-backend/app/models/match.rb

10 lines
192 B
Ruby

# frozen_string_literal: true
class Match < ApplicationRecord
belongs_to :stage
belongs_to :group
has_many :scores, dependent: :destroy
validates :scores, length: { maximum: 2 }
end