fix: typo

This commit is contained in:
b1ek 2024-11-28 02:37:32 +10:00
parent f9f1004b19
commit 1377fbb89a
Signed by: blek
GPG Key ID: A622C22C9BC616B2
1 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ namespace app\models;
class Subscription extends \yii\db\ActiveRecord class Subscription extends \yii\db\ActiveRecord
{ {
public $user_id; public $user_id;
public $company_id; public $blog_id;
/** /**
* {@inheritDoc} * {@inheritDoc}
@ -13,7 +13,7 @@ class Subscription extends \yii\db\ActiveRecord
public function rules() public function rules()
{ {
return [ return [
[['user_id'], 'required'], [['user_id', 'blog_id'], 'required'],
[['id'], 'integer'], [['id'], 'integer'],
]; ];
} }
@ -23,9 +23,9 @@ class Subscription extends \yii\db\ActiveRecord
return $this->hasOne(User::class, [ 'id' => 'user_id' ]); return $this->hasOne(User::class, [ 'id' => 'user_id' ]);
} }
public function getCompany() public function getBlog()
{ {
return $this->hasOne(Company::class, [ 'id' => 'company_id' ]); return $this->hasOne(Company::class, [ 'id' => 'blog_id' ]);
} }
/** /**