class ClassStudentEnrollment < ApplicationRecord
  include Base::ClassStudentEnrollment
  audited

  associations_for legacy: true do |a|
    a.belongs_to :school, optional: true
    a.belongs_to :school_year
    a.belongs_to :student
    a.belongs_to :classroom, keys: :ClassID
  end

  scope :by_class_ids, ->(ids) { where(class_id: ids) }
end
