validates_uniqueness_of :teacher_id, scope: [:semester_id, :class_id]