/** * @return \yii\db\ActiveQuery */ public function getAccountCodes() { return $this->hasMany(AccountCode::className(), ['parent_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getAccount() { return $this->hasOne(AccountCode::className(), ['id' => 'account_id']); }