/** * @return \yii\db\ActiveQuery */ public function getDoctors() { return $this->hasMany(Doctor::className(), ['status' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getPatientDoctor() { return $this->hasOne(Doctor::className(), ['doctor_id' => 'patient_doctor']); }