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