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

76 lines
1.9 KiB
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Index extends Model
{
public function __construct()
{
$this
2021-06-09 21:10:19 +00:00
->addRule('$collection', [
'type' => self::TYPE_STRING,
'description' => 'Collection ID.',
'default' => '',
'example' => '',
])
->addRule('$id', [
'type' => self::TYPE_STRING,
'description' => 'Index ID.',
'default' => '',
'example' => '',
])
->addRule('type', [
'type' => self::TYPE_STRING,
'description' => 'Index type.',
'default' => '',
'example' => '',
])
->addRule('attributes', [
2021-06-09 21:10:19 +00:00
'type' => self::TYPE_STRING,
'description' => 'Index attributes.',
'default' => [],
'example' => [],
2021-06-09 21:10:19 +00:00
'array' => true,
])
->addRule('lengths', [
2021-06-09 21:10:19 +00:00
'type' => self::TYPE_STRING,
'description' => 'Index lengths.',
'default' => [],
'example' => [],
2021-06-09 21:10:19 +00:00
'array' => true,
'required' => false,
])
->addRule('orders', [
2021-06-09 21:10:19 +00:00
'type' => self::TYPE_STRING,
'description' => 'Index orders.',
'default' => [],
'example' => [],
2021-06-09 21:10:19 +00:00
'array' => true,
'required' => false,
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Index';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
return Response::MODEL_INDEX;
}
}