/** * @return \yii\db\ActiveQuery */ public function getStudentAppointments() { return $this->hasMany(\common\models\StudentAppointment::className(), ['student_id' => 'id']); }