mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Correct response models
This commit is contained in:
@@ -10,6 +10,12 @@ class Attribute extends Model
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('$collection', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Collection ID.',
|
||||
'default' => '',
|
||||
'example' => '',
|
||||
])
|
||||
->addRule('$id', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Attribute ID.',
|
||||
@@ -39,18 +45,22 @@ class Attribute extends Model
|
||||
'description' => 'Is attribute signed?',
|
||||
'default' => true,
|
||||
'example' => true,
|
||||
'required' => false,
|
||||
])
|
||||
->addRule('array', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Is attribute an array?',
|
||||
'default' => false,
|
||||
'example' => false,
|
||||
'required' => false
|
||||
])
|
||||
->addRule('filters', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Attribute filters.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
'required' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,12 @@ class Index extends Model
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('$collection', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Collection ID.',
|
||||
'default' => '',
|
||||
'example' => '',
|
||||
])
|
||||
->addRule('$id', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index ID.',
|
||||
@@ -23,22 +29,27 @@ class Index extends Model
|
||||
'example' => '',
|
||||
])
|
||||
->addRule('attributes', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index attributes.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
])
|
||||
->addRule('lengths', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index lengths.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
'required' => false,
|
||||
])
|
||||
->addRule('orders', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index orders.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
'required' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user