You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
330 B
21 lines
330 B
5 years ago
|
class CompetitionPrize < ApplicationRecord
|
||
|
extend Enumerize
|
||
|
|
||
|
belongs_to :competition
|
||
|
|
||
|
has_many :competition_prize_users, dependent: :destroy
|
||
|
|
||
|
enumerize :category, in: %i[bonus unset]
|
||
|
|
||
|
def self.member_suffix
|
||
|
'_member'
|
||
|
end
|
||
|
|
||
|
def self.teacher_suffix
|
||
|
'_teacher'
|
||
|
end
|
||
|
|
||
|
def self.team_suffix
|
||
|
'_team'
|
||
|
end
|
||
|
end
|