mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Apply suggestions from code review
Co-authored-by: Vincent (Wen Yu) Ge <vincent@appwrite.io>
This commit is contained in:
parent
d44f69df09
commit
a91ee7e80f
1 changed files with 4 additions and 4 deletions
|
|
@ -13,13 +13,13 @@ class AttributeRelationship extends Attribute
|
||||||
$this
|
$this
|
||||||
->addRule('relatedCollection', [
|
->addRule('relatedCollection', [
|
||||||
'type' => self::TYPE_STRING,
|
'type' => self::TYPE_STRING,
|
||||||
'description' => 'The Id of the related collection',
|
'description' => 'The ID of the related collection.',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'example' => 'collection',
|
'example' => 'collection',
|
||||||
])
|
])
|
||||||
->addRule('relationType', [
|
->addRule('relationType', [
|
||||||
'type' => self::TYPE_STRING,
|
'type' => self::TYPE_STRING,
|
||||||
'description' => 'The type of the relationship',
|
'description' => 'The type of the relationship.',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'example' => 'oneToOne|oneToMany|manyToOne|manyToMany',
|
'example' => 'oneToOne|oneToMany|manyToOne|manyToMany',
|
||||||
])
|
])
|
||||||
|
|
@ -31,13 +31,13 @@ class AttributeRelationship extends Attribute
|
||||||
])
|
])
|
||||||
->addRule('twoWayKey', [
|
->addRule('twoWayKey', [
|
||||||
'type' => self::TYPE_STRING,
|
'type' => self::TYPE_STRING,
|
||||||
'description' => 'The key of the two-way relationship',
|
'description' => 'The key of the two-way relationship.',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'example' => 'string',
|
'example' => 'string',
|
||||||
])
|
])
|
||||||
->addRule('onDelete', [
|
->addRule('onDelete', [
|
||||||
'type' => self::TYPE_STRING,
|
'type' => self::TYPE_STRING,
|
||||||
'description' => 'Action to take on related documents when parent document is deleted',
|
'description' => 'How deleting the parent document will propagate to child documents.',
|
||||||
'default' => 'restrict',
|
'default' => 'restrict',
|
||||||
'example' => 'restrict|cascade|setNull',
|
'example' => 'restrict|cascade|setNull',
|
||||||
])
|
])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue