TimestampBehavior::class, 'updatedAtAttribute' => false, ], ]; } public function generateSecret(): void { $this->secret = Yii::$app->security->generateRandomString(64); } public function getAccount(): ActiveQuery { return $this->hasOne(Account::class, ['id' => 'account_id']); } public function getSessions(): ActiveQuery { return $this->hasMany(OauthSession::class, ['client_id' => 'id']); } public static function find(): OauthClientQuery { return Yii::createObject(OauthClientQuery::class, [static::class]); } }