appwrite/src/Appwrite/Utopia/Response/Model/Permissions.php
2020-11-08 00:14:48 +02:00

47 lines
No EOL
1,002 B
PHP

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Permissions extends Model
{
public function __construct()
{
$this
->addRule('read', [
'type' => self::TYPE_STRING,
'description' => 'Read permissions.',
'example' => ['*', 'user:5e5ea5c16897e'],
'array' => true,
])
->addRule('write', [
'type' => self::TYPE_STRING,
'description' => 'Write permissions.',
'example' => ['*', 'user:5e5ea5c16897e'],
'array' => true,
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Permissions';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
return Response::MODEL_PERMISSIONS;
}
}