hasOne(User::class, [ 'id' => 'user_id' ]); } public function getCompany() { return $this->hasOne(Company::class, [ 'id' => 'company_id' ]); } /** * {@inheritDoc} */ public function tableName() { return "subscriptions"; } }