aboutsummaryrefslogtreecommitdiffhomepage
path: root/WpfTest/Model/Actor.php
diff options
context:
space:
mode:
authorwinter2024-12-07 21:44:42 +0000
committerwinter2024-12-07 21:44:42 +0000
commita84232811dadccf7047424f27340a7f9847bedff (patch)
treea6a0823c8b9485b6a5b60ea7ae854f9511a6ae1e /WpfTest/Model/Actor.php
parente1ad307b531c27ec6bfaf8b4d018991b0d4a78f3 (diff)
many many changes but actors are loaded from db now
Diffstat (limited to 'WpfTest/Model/Actor.php')
-rw-r--r--WpfTest/Model/Actor.php26
1 files changed, 26 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