Merge branch 'feat-add-messaging-response-models' into feat-messages-event-config
This commit is contained in:
commit
cc1311b723
6 changed files with 252 additions and 252 deletions
|
@ -1,63 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Appwrite\Utopia\Response\Model;
|
|
||||||
|
|
||||||
use Appwrite\Utopia\Response;
|
|
||||||
use Appwrite\Utopia\Response\Model;
|
|
||||||
|
|
||||||
class Subscriber extends Model
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected bool $public = false;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this
|
|
||||||
->addRule('$id', [
|
|
||||||
'type' => self::TYPE_STRING,
|
|
||||||
'description' => 'Subscriber ID.',
|
|
||||||
'default' => '',
|
|
||||||
'example' => '259125845563242502',
|
|
||||||
])
|
|
||||||
->addRule('userId', [
|
|
||||||
'type' => self::TYPE_STRING,
|
|
||||||
'description' => 'User ID.',
|
|
||||||
'default' => '',
|
|
||||||
'example' => '259125845563242502',
|
|
||||||
])
|
|
||||||
->addRule('targetId', [
|
|
||||||
'type' => self::TYPE_STRING,
|
|
||||||
'description' => 'Target ID.',
|
|
||||||
'default' => '',
|
|
||||||
'example' => '259125845563242502',
|
|
||||||
])
|
|
||||||
->addRule('topicId', [
|
|
||||||
'type' => self::TYPE_STRING,
|
|
||||||
'description' => 'Topic ID.',
|
|
||||||
'default' => '',
|
|
||||||
'example' => '259125845563242502',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get Name
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getName(): string
|
|
||||||
{
|
|
||||||
return 'Subscriber';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get Type
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getType(): string
|
|
||||||
{
|
|
||||||
return Response::MODEL_SUBSCRIBER;
|
|
||||||
}
|
|
||||||
}
|
|
63
src/Appwrite/Utopia/Response/Model/Subscriber.php
Normal file
63
src/Appwrite/Utopia/Response/Model/Subscriber.php
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Appwrite\Utopia\Response\Model;
|
||||||
|
|
||||||
|
use Appwrite\Utopia\Response;
|
||||||
|
use Appwrite\Utopia\Response\Model;
|
||||||
|
|
||||||
|
class Subscriber extends Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected bool $public = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this
|
||||||
|
->addRule('$id', [
|
||||||
|
'type' => self::TYPE_STRING,
|
||||||
|
'description' => 'Subscriber ID.',
|
||||||
|
'default' => '',
|
||||||
|
'example' => '259125845563242502',
|
||||||
|
])
|
||||||
|
->addRule('userId', [
|
||||||
|
'type' => self::TYPE_STRING,
|
||||||
|
'description' => 'User ID.',
|
||||||
|
'default' => '',
|
||||||
|
'example' => '259125845563242502',
|
||||||
|
])
|
||||||
|
->addRule('targetId', [
|
||||||
|
'type' => self::TYPE_STRING,
|
||||||
|
'description' => 'Target ID.',
|
||||||
|
'default' => '',
|
||||||
|
'example' => '259125845563242502',
|
||||||
|
])
|
||||||
|
->addRule('topicId', [
|
||||||
|
'type' => self::TYPE_STRING,
|
||||||
|
'description' => 'Topic ID.',
|
||||||
|
'default' => '',
|
||||||
|
'example' => '259125845563242502',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getName(): string
|
||||||
|
{
|
||||||
|
return 'Subscriber';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Type
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getType(): string
|
||||||
|
{
|
||||||
|
return Response::MODEL_SUBSCRIBER;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue