class Team < ActiveRecord::Base
  validates :name, :required_size, :tournament_id, presence: true
  belongs_to :tournament
end

class Team < ActiveRecord::Base
  validates :name, :required_size, :tournament_id, presence: true
  belongs_to :tournament
  has_many :team_memberships
  has_many :players, through: :team_memberships
end

Define association betwean Team model and Player model
Define association betwean Team model and Player model
