From 6306ec59babc25f76dfb5f4e143443bddefc02f5 Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 14 Mar 2023 10:32:49 +0200 Subject: [PATCH] Model relationship --- src/Appwrite/Utopia/Response/Model/AttributeBoolean.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeEmail.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeEnum.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeFloat.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeIP.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeInteger.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeList.php | 1 - .../Utopia/Response/Model/AttributeRelationship.php | 6 ++---- src/Appwrite/Utopia/Response/Model/AttributeString.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeURL.php | 1 - 10 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php b/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php index 94902aa9eb..05846817ca 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeBoolean extends Attribute { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeEmail.php b/src/Appwrite/Utopia/Response/Model/AttributeEmail.php index cdbd1056ba..078087dd4b 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeEmail.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeEmail.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeEmail extends Attribute { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeEnum.php b/src/Appwrite/Utopia/Response/Model/AttributeEnum.php index 3eab7dfdff..992b62ee3a 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeEnum.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeEnum.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeEnum extends Attribute { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php index 1318b8c7b2..266b89c330 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeFloat extends Attribute { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeIP.php b/src/Appwrite/Utopia/Response/Model/AttributeIP.php index a692664c34..cfa309317a 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeIP.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeIP.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeIP extends Attribute { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeInteger.php b/src/Appwrite/Utopia/Response/Model/AttributeInteger.php index 50c3641445..fddfe57445 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeInteger.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeInteger.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeInteger extends Attribute { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeList.php b/src/Appwrite/Utopia/Response/Model/AttributeList.php index 1bbde6d2fe..8b04475a14 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeList.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeList.php @@ -4,7 +4,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -use Utopia\Database\Document; class AttributeList extends Model { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php b/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php index f51d6550f7..22d088b874 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php @@ -15,7 +15,7 @@ class AttributeRelationship extends Attribute 'type' => self::TYPE_STRING, 'description' => 'Attribute Key.', 'default' => '', - 'example' => 'percentageCompleted', + 'example' => 'relationship', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, @@ -27,9 +27,7 @@ class AttributeRelationship extends Attribute 'type' => self::TYPE_STRING, 'description' => 'Default value for attribute when not provided. Only null is optional', 'default' => null, - 'example' => self::TYPE_DATETIME_EXAMPLE, - 'array' => false, - 'required' => false, + 'example' => 'relationship', ]) ->addRule('options', [ 'type' => [ diff --git a/src/Appwrite/Utopia/Response/Model/AttributeString.php b/src/Appwrite/Utopia/Response/Model/AttributeString.php index fa36836050..12bb42009d 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeString.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeString.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeString extends Attribute { diff --git a/src/Appwrite/Utopia/Response/Model/AttributeURL.php b/src/Appwrite/Utopia/Response/Model/AttributeURL.php index 332654f342..633d5b49d7 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeURL.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeURL.php @@ -3,7 +3,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model\Attribute; class AttributeURL extends Attribute {