[ENTITY][Subscription] Add Subscription::cacheKeys
This commit is contained in:
parent
76440961ca
commit
d74a9ad373
@ -21,6 +21,7 @@ namespace App\Entity;
|
|||||||
|
|
||||||
use App\Core\Entity;
|
use App\Core\Entity;
|
||||||
use DateTimeInterface;
|
use DateTimeInterface;
|
||||||
|
use Component\Group\Entity\LocalGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity for subscription
|
* Entity for subscription
|
||||||
@ -92,6 +93,13 @@ class Subscription extends Entity
|
|||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
// }}} Autocode
|
// }}} 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
|
public static function schemaDef(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
Loading…
Reference in New Issue
Block a user