From c18af032aec40fd7f5cc80537b84b9e2d9054d07 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Mar 2023 18:20:15 +1300 Subject: [PATCH] Remove redundant model attributes --- .../Response/Model/AttributeRelationship.php | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php b/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php index 52c44c7391..71b2039aea 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php @@ -11,18 +11,6 @@ class AttributeRelationship extends Attribute parent::__construct(); $this - ->addRule('key', [ - 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', - 'default' => '', - 'example' => 'relationship', - ]) - ->addRule('type', [ - 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', - 'default' => '', - 'example' => 'relationship', - ]) ->addRule('default', [ 'type' => self::TYPE_STRING, 'description' => 'Default value for attribute when not provided. Only null is optional', @@ -43,25 +31,19 @@ class AttributeRelationship extends Attribute ]) ->addRule('twoWay', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Is the relationship going two ways?', + 'description' => 'Is the relationship two-way?', 'default' => null, 'example' => 'relationship', ]) ->addRule('twoWayKey', [ 'type' => self::TYPE_STRING, - 'description' => 'The key of the 2 way relationship', + 'description' => 'The key of the two-way relationship', 'default' => null, 'example' => 'string', ]) -// ->addRule('onUpdate', [ -// 'type' => self::TYPE_STRING, -// 'description' => 'How to set related documents after parent document is updated', -// 'default' => null, -// 'example' => 'restrict|cascade|setNull', -// ]) ->addRule('onDelete', [ 'type' => self::TYPE_STRING, - 'description' => 'How to set related documents after parent document is deleted', + 'description' => 'Action to take on related documents when parent document is deleted', 'default' => null, 'example' => 'restrict|cascade|setNull', ])