aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model/ActorEndpoints.php
blob: f2bc85a25e1ed83040ddfc807c4c7d3e250cdc94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
namespace Digitigrade\Model;

use Digitigrade\Model;

class ActorEndpoints extends Model {
    public ?int $actorId;
    public string $basicFeed;
    public ?string $fullFeed;
    public ?string $follow;
    public ?string $unfollow;
    public ?string $acceptedFollow;
    public ?string $rejectedFollow;
    public ?string $block;
    public ?string $unblock;

    protected function setOwnerId(int $id) {
        $this->actorId = $id;
    }

    protected function getUpdateWhereClause($db): ?string {
        if (self::findWhere('actor_id = ?', [$this->actorId]) != null) {
            return "actor_id = $this->actorId";
        }
        return null;
    }
}