aboutsummaryrefslogtreecommitdiffhomepage
path: root/WpfTest/Model
diff options
context:
space:
mode:
Diffstat (limited to 'WpfTest/Model')
-rw-r--r--WpfTest/Model/Actor.php26
-rw-r--r--WpfTest/Model/ActorEndpoints.php15
2 files changed, 41 insertions, 0 deletions
diff --git a/WpfTest/Model/Actor.php b/WpfTest/Model/Actor.php
new file mode 100644
index 0000000..cf8d7ca
--- /dev/null
+++ b/WpfTest/Model/Actor.php
@@ -0,0 +1,26 @@
+<?php
+namespace WpfTest\Model;
+
+use WpfTest\Model;
+
+class Actor extends Model {
+ public int $id;
+ public string $self;
+ public bool $isLocal = false;
+ public \DateTimeImmutable $created;
+ public ?\DateTimeImmutable $modified;
+ public ?string $homepage;
+ public string $handle;
+ public string $displayName;
+ public ?string $avatar;
+ public ?string $bio;
+ public ?string $pronouns;
+ public bool $automated = false;
+ public bool $requestToFollow = false;
+ public ActorEndpoints $endpoints;
+ public array $extensions = [];
+
+ public static function findLocalByHandle(string $handle): ?self {
+ return self::findWhere('is_local = true AND handle = ?', [$handle]);
+ }
+} \ No newline at end of file
diff --git a/WpfTest/Model/ActorEndpoints.php b/WpfTest/Model/ActorEndpoints.php
new file mode 100644
index 0000000..03dab9e
--- /dev/null
+++ b/WpfTest/Model/ActorEndpoints.php
@@ -0,0 +1,15 @@
+<?php
+namespace WpfTest\Model;
+
+use WpfTest\Model;
+
+class ActorEndpoints extends Model {
+ public string $basicFeed;
+ public ?string $fullFeed;
+ public ?string $follow;
+ public ?string $unfollow;
+ public ?string $block;
+ public ?string $unblock;
+ public ?string $subscribe;
+ public ?string $unsubscribe;
+} \ No newline at end of file