Help with a modeling problem

I can’t seem to get my head wrapped around how to do this. I have the
following model:

class Match < ActiveRecord::Base
has_one :winning_team, :class_name => “Team”
has_one :losing_team, :class_name => “Team”
has_one :submitter, :class_name => “User”
has_one :Approver, :class_name => “User”
has_many :games
end

Basically it has 2 Teams and 2 Users. I’m not sure what
to do with the belongs_to: for Team and User since they could
belong with a foreign_key of winning_team or losing_team and submitter
or approver respectively. What is the best way to model a situation
where
you have multiple keys referencing the same table?

–Matt

Class Match < ActiveRecord::Base
belongs_to :winning_team, :class_name => “Team”, :foreign_key =>
“winner_id”
belongs_to :losing_team, :class_name => “Team” , :foreign_key =>
“loser_id”
beongs_to :submitter, :class_name => “User”, :foreign_key =>
“submitter_id”
belongs_to :Approver, :class_name => “User”, :foreign_key =>
“approver_id”
has_many :games
end

Table should look like this:
id
winner_id
loser_id
submitter_id
approver_id

the other classes:

class User < ActiveRecord::Base
has_many :submitted_matches, :class_name => “Match”, :foreign_key =>
“submitter_id”
has_many :approved_matches, :class_name => “Match”, :foreign_key =>
"approver_id
end

class Team < ActiveRecord::Base
has_many :won_games, :class_name => “Match”, :foreign_key =>
“winner_id”
has_many :lost_games, :class_name => “Match”, :foreign_key =>
“loser_id”
end

something like that …