dev_aliyun
cxt 5 years ago
parent 591cea9e9c
commit b120e0fde5

@ -5,7 +5,7 @@ class CompetitionTeam < ActiveRecord::Base
has_many :team_members, :dependent => :destroy
has_many :members, conditions: 'team_members.is_teacher = 0', class_name: 'TeamMember'
has_many :teachers, conditions: 'team_members.is_teacher = 1', class_name: 'TeamMember'
has_many :teachers, conditions: 'team_members.is_teacher = 1', class_name: 'TeamMember', :order => "team_members.role ASC"
has_many :competition_scores, :dependent => :destroy
# team_type 0组队 1个人
# attr_accessible :invite_code, :name, :team_type

Loading…
Cancel
Save