class EcCourse < ActiveRecord::Base

  belongs_to :ec_year

  # 课程目标
  has_many :ec_course_targets, :dependent => :destroy

  # 课程负责教师
  has_many :ec_course_users
  has_many :users, :through => :ec_course_users

  # 课程考核标准
  has_many :ec_course_evaluations, :dependent => :destroy

  # 课程支撑
  has_many :ec_course_supports, :dependent => :destroy

  # 工程课堂和educoder课堂关联
  has_many :courses, :through => :ec_major_courses
  has_many :ec_major_courses, :dependent => :destroy

  # 课程目标达成方法
  has_many :ec_course_achievement_methods

  # 课程等级
  has_many :ec_score_levels
end