From 4da44acb6fd92a121aa6b083ecca0faec144f0df Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 23 Feb 2020 10:56:40 +0200 Subject: [PATCH] Updated system collections --- app/config/collections.php | 79 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 83b117a7b4..3464c938e3 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -606,6 +606,16 @@ $collections = [ 'array' => true, 'list' => [Database::SYSTEM_COLLECTION_PLATFORMS], ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Domains', + 'key' => 'domains', + 'type' => 'document', + 'default' => [], + 'required' => false, + 'array' => true, + 'list' => [Database::SYSTEM_COLLECTION_DOMAINS], + ], ], ], Database::SYSTEM_COLLECTION_WEBHOOKS => [ @@ -952,6 +962,24 @@ $collections = [ 'label' => 'Updated', 'key' => 'updated', 'type' => 'numeric', + 'default' => 0, + 'required' => false, + 'array' => false, + ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Top Level Domain', + 'key' => 'tld', + 'type' => 'text', + 'default' => '', + 'required' => false, + 'array' => false, + ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Registerable Domain', + 'key' => 'registerable', + 'type' => 'text', 'default' => '', 'required' => false, 'array' => false, @@ -969,11 +997,56 @@ $collections = [ '$collection' => Database::SYSTEM_COLLECTION_RULES, 'label' => 'Certificate ID', 'key' => 'certificateId', - 'type' => 'boolean', - 'default' => false, + 'type' => 'key', + 'default' => '', + 'required' => false, + 'array' => false, + ], + ], + ], + Database::SYSTEM_COLLECTION_CERTIFICATES => [ + '$collection' => Database::SYSTEM_COLLECTION_COLLECTIONS, + '$id' => Database::SYSTEM_COLLECTION_CERTIFICATES, + '$permissions' => ['read' => ['*']], + 'name' => 'Certificates', + 'structure' => true, + 'rules' => [ + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Domain', + 'key' => 'domain', + 'type' => 'text', + 'default' => null, 'required' => true, 'array' => false, ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Issue Date', + 'key' => 'issueDate', + 'type' => 'numeric', + 'default' => 0, + 'required' => false, + 'array' => false, + ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Attempts', + 'key' => 'attempts', + 'type' => 'numeric', + 'default' => 0, + 'required' => false, + 'array' => false, + ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Log', + 'key' => 'log', + 'type' => 'text', + 'default' => '', + 'required' => false, + 'array' => false, + ], ], ], Database::SYSTEM_COLLECTION_FILES => [ @@ -1171,4 +1244,4 @@ foreach ($providers as $key => $provider) { ]; } -return $collections; +return $collections; \ No newline at end of file