aboutsummaryrefslogtreecommitdiffhomepage
path: root/WpfTest/Model/NotePrivacy.php
diff options
context:
space:
mode:
authorwinter2024-12-09 21:31:54 +0000
committerwinter2024-12-09 21:31:54 +0000
commit4c7bde1400820f36caf8b2a5374007384c3018f3 (patch)
tree83ed26ff368117b8e392f7bc28736482077fc2f4 /WpfTest/Model/NotePrivacy.php
parent50edbd3907c26a2d4d616421de9bb51a4d083c1b (diff)
rename to Digitigrade / PawPub
:3
Diffstat (limited to 'WpfTest/Model/NotePrivacy.php')
-rw-r--r--WpfTest/Model/NotePrivacy.php39
1 files changed, 0 insertions, 39 deletions
diff --git a/WpfTest/Model/NotePrivacy.php b/WpfTest/Model/NotePrivacy.php
deleted file mode 100644
index b955447..0000000
--- a/WpfTest/Model/NotePrivacy.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-namespace WpfTest\Model;
-
-use WpfTest\Model;
-
-class NotePrivacy extends Model implements \JsonSerializable {
- public ?int $noteId;
- public NotePrivacyScope $scope;
- /**
- * @var Actor[]
- */
- public array $alsoVisibleTo = [];
- public bool $indexable;
- public NotePrivacyInteractors $canReshare = NotePrivacyInteractors::ALL;
- public NotePrivacyInteractors $canReply = NotePrivacyInteractors::ALL;
- public NotePrivacyInteractors $canOtherInteract = NotePrivacyInteractors::ALL;
-
- protected function setOwnerId(int $id) {
- $this->noteId = $id;
- }
-
- protected function getUpdateWhereClause($db): ?string {
- if (self::findWhere('note_id = ?', [$this->noteId]) != null) {
- return "note_id = $this->noteId";
- }
- return null;
- }
-
- public function jsonSerialize(): array {
- return [
- 'scope' => $this->scope->value,
- 'alsoVisibleTo' => $this->alsoVisibleTo,
- 'indexable' => $this->indexable,
- 'canReshare' => $this->canReshare->value,
- 'canReply' => $this->canReply->value,
- 'canOtherInteract' => $this->canOtherInteract->value
- ];
- }
-} \ No newline at end of file