[ENTITY][Subscription] Add Subscription::cacheKeys

This commit is contained in:
Hugo Sales 2021-12-27 18:24:16 +00:00
parent 76440961ca
commit d74a9ad373
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -21,6 +21,7 @@ namespace App\Entity;
use App\Core\Entity;
use DateTimeInterface;
use Component\Group\Entity\LocalGroup;
/**
* Entity for subscription
@ -92,6 +93,13 @@ class Subscription extends Entity
// @codeCoverageIgnoreEnd
// }}} Autocode
public static function cacheKeys(LocalUser|LocalGroup|Actor $subject, LocalUser|LocalGroup|Actor $target): array
{
return [
'subscribed' => "subscription-{$subject->getId()}-{$target->getId()}",
];
}
public static function schemaDef(): array
{
return [