From aabcc8eb09982e8a85996734283b7b1f70a1f04a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 15 Jun 2021 12:22:51 +0545 Subject: [PATCH] fixing structure --- app/config/collections.php | 13 +++++++++++-- src/Appwrite/Utopia/Response/Model/Bucket.php | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index a6a11f9ae3..d21010c54c 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -1452,13 +1452,22 @@ $collections = [ 'required' => false, 'array' => false, ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Date Updated', + 'key' => 'dateUpdated', + 'type' => Database::SYSTEM_VAR_TYPE_NUMERIC, + 'default' => 0, + 'required' => false, + 'array' => false, + ], [ '$collection' => Database::SYSTEM_COLLECTION_RULES, 'label' => 'Enabled', 'key' => 'enabled', 'type' => Database::SYSTEM_VAR_TYPE_BOOLEAN, 'default' => true, - 'required' => false, + 'required' => true, 'array' => false, ], [ @@ -1505,7 +1514,7 @@ $collections = [ 'type' => Database::SYSTEM_VAR_TYPE_TEXT, 'default' => '', 'required' => true, - 'array' => false, + 'array' => true, ], [ '$collection' => Database::SYSTEM_COLLECTION_RULES, diff --git a/src/Appwrite/Utopia/Response/Model/Bucket.php b/src/Appwrite/Utopia/Response/Model/Bucket.php index 4f657f009b..7fdadacd9c 100644 --- a/src/Appwrite/Utopia/Response/Model/Bucket.php +++ b/src/Appwrite/Utopia/Response/Model/Bucket.php @@ -30,6 +30,12 @@ class Bucket extends Model 'default' => 0, 'example' => 1592981250, ]) + ->addRule('dateUpdated', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Bucket updated date in Unix timestamp.', + 'default' => 0, + 'example' => 1592981250, + ]) ->addRule('name', [ 'type' => self::TYPE_STRING, 'description' => 'Bucket name.',