public function getAccs() { return $this->hasMany(Accounts::className(), array('parent_account_id' => 'id')); }
/** * @return \yii\db\ActiveQuery */ public function getAccounts() { return $this->hasOne(Accounts::className(), ['id' => 'accounts_id']); }
public function getAccount() { return $this->hasOne(Accounts::className(), array('id' => 'account_id')); }