mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
Add $createdAt $updatedAt
This commit is contained in:
parent
1848de14cc
commit
707d9554df
2 changed files with 24 additions and 6 deletions
|
|
@ -47,7 +47,18 @@ class Attribute extends Model
|
|||
'required' => false,
|
||||
'example' => false,
|
||||
])
|
||||
;
|
||||
->addRule('$createdAt', [
|
||||
'type' => self::TYPE_DATETIME,
|
||||
'description' => 'Attribute creation date in ISO 8601 format.',
|
||||
'default' => '',
|
||||
'example' => self::TYPE_DATETIME_EXAMPLE,
|
||||
])
|
||||
->addRule('$updatedAt', [
|
||||
'type' => self::TYPE_DATETIME,
|
||||
'description' => 'Attribute update date in ISO 8601 format.',
|
||||
'default' => '',
|
||||
'example' => self::TYPE_DATETIME_EXAMPLE,
|
||||
]);
|
||||
}
|
||||
|
||||
public array $conditions = [];
|
||||
|
|
|
|||
|
|
@ -49,13 +49,22 @@ class Index extends Model
|
|||
'array' => true,
|
||||
'required' => false,
|
||||
])
|
||||
;
|
||||
->addRule('$createdAt', [
|
||||
'type' => self::TYPE_DATETIME,
|
||||
'description' => 'Index creation date in ISO 8601 format.',
|
||||
'default' => '',
|
||||
'example' => self::TYPE_DATETIME_EXAMPLE,
|
||||
])
|
||||
->addRule('$updatedAt', [
|
||||
'type' => self::TYPE_DATETIME,
|
||||
'description' => 'Index update date in ISO 8601 format.',
|
||||
'default' => '',
|
||||
'example' => self::TYPE_DATETIME_EXAMPLE,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
|
|
@ -64,8 +73,6 @@ class Index extends Model
|
|||
|
||||
/**
|
||||
* Get Collection
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue