/** * @return \yii\db\ActiveQuery */ public function getPersonals() { return $this->hasMany(Personal::className(), ['department_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getPersonalUser() { return $this->hasOne(Personal::className(), ['user_id' => 'personal_user_id']); }