TimestampBehavior::class, ], [ 'class' => PrimaryKeyValueBehavior::class, 'value' => function() { return Uuid::uuid4()->toString(); }, ], ]; } public function getAccount(): ActiveQuery { return $this->hasOne(Account::class, ['id' => 'account_id']); } public function isExpired(): bool { return time() > $this->updated_at + self::LIFETIME; } }