addRule('key', [ 'type' => self::TYPE_STRING, 'description' => 'Attribute Key.', 'default' => '', 'example' => 'location', ]) ->addRule('type', [ 'type' => self::TYPE_JSON, 'description' => 'Attribute type.', 'default' => '', 'example' => 'point', ]) ->addRule('default', [ 'type' => self::TYPE_JSON, 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', 'default' => null, 'required' => false, 'example' => '[0, 0]' ]) ; } public array $conditions = [ 'type' => 'point' ]; /** * Get Name * * @return string */ public function getName(): string { return 'AttributePoint'; } /** * Get Type * * @return string */ public function getType(): string { return Response::MODEL_ATTRIBUTE_POINT; } }