blob: 6ebccb8fcb10f23308a648a17b2780faf5b17f34 (
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
|
<?php
namespace Digitigrade\Model;
use Digitigrade\Model;
class InstanceAuth extends Model {
public ?int $instanceId;
public ?string $outboundToken;
public ?string $inboundToken;
public ?string $secret;
public bool $outboundPushEnabled = false;
public bool $inboundPushEnabled = false;
protected function setOwnerId(int $id) {
$this->instanceId = $id;
}
protected function getUpdateWhereClause($db): ?string {
if (self::findWhere('instance_id = ?', [$this->instanceId]) != null) {
return "instance_id = $this->instanceId";
}
return null;
}
}
|