appwrite/src/Appwrite/Utopia/Response/Model/Subsciber.php

64 lines
1.3 KiB
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Subscriber extends Model
{
/**
* @var bool
*/
2023-08-07 15:31:25 +00:00
protected bool $public = false;
2023-08-07 15:31:25 +00:00
public function __construct()
{
$this
->addRule('$id', [
'type' => self::TYPE_STRING,
'description' => 'Subscriber ID.',
'default' => '',
'example' => '259125845563242502',
2023-08-07 15:31:25 +00:00
])
->addRule('userId', [
'type' => self::TYPE_STRING,
'description' => 'User ID.',
'default' => '',
'example' => '259125845563242502',
2023-08-07 15:31:25 +00:00
])
->addRule('targetId', [
'type' => self::TYPE_STRING,
'description' => 'Target ID.',
'default' => '',
'example' => '259125845563242502',
2023-08-07 15:31:25 +00:00
])
->addRule('topicId', [
'type' => self::TYPE_STRING,
'description' => 'Topic ID.',
'default' => '',
'example' => '259125845563242502',
2023-08-07 15:31:25 +00:00
]);
}
/**
* Get Name
*
* @return string
*/
2023-08-07 15:31:25 +00:00
public function getName(): string
{
return 'Subscriber';
}
/**
* Get Type
*
* @return string
*/
2023-08-07 15:31:25 +00:00
public function getType(): string
{
return Response::MODEL_SUBSCRIBER;
}
}