3 namespace Friendica\Navigation\Notifications\Entity;
6 use Friendica\BaseEntity;
11 * @property-read $verb
12 * @property-read $type
13 * @property-read $actorId
14 * @property-read $targetUriId
15 * @property-read $parentUriId
16 * @property-read $created
17 * @property-read $seen
19 class Notification extends BaseEntity
28 * @var int One of the \Friendica\Model\Post\UserNotification::TYPE_* constant values
29 * @see \Friendica\Model\Post\UserNotification
35 protected $targetUriId;
37 protected $parentUriId;
46 * Please do not use this constructor directly, instead use one of the method of the Notification factory.
52 * @param int|null $targetUriId
53 * @param int|null $parentUriId
54 * @param DateTime|null $created
57 * @param bool $dismissed
58 * @see \Friendica\Navigation\Notifications\Factory\Notification
60 public function __construct(int $uid, string $verb, int $type, int $actorId, int $targetUriId = null, int $parentUriId = null, DateTime $created = null, bool $seen = false, int $id = null, bool $dismissed = false)
65 $this->actorId = $actorId;
66 $this->targetUriId = $targetUriId;
67 $this->parentUriId = $parentUriId ?: $targetUriId;
68 $this->created = $created;
71 $this->dismissed = $dismissed;
74 public function setSeen()
79 public function setDismissed()
81 $this->dismissed = true;