appwrite/src/Appwrite/Utopia/Response/Model/ColumnLine.php

60 lines
1.3 KiB
PHP
Raw Normal View History

2025-08-22 07:17:15 +00:00
<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
class ColumnLine extends Column
{
public function __construct()
{
parent::__construct();
$this
->addRule('key', [
'type' => self::TYPE_STRING,
'description' => 'Column Key.',
'default' => '',
'example' => 'route',
])
->addRule('type', [
2025-09-01 05:57:57 +00:00
'type' => self::TYPE_JSON,
2025-08-22 07:17:15 +00:00
'description' => 'Column type.',
'default' => '',
'example' => 'linestring',
])
->addRule('default', [
'type' => self::TYPE_STRING,
'description' => 'Default value for column when not provided. Cannot be set when column is required.',
'default' => null,
'required' => false,
'example' => '[[0, 0], [1, 1]]'
])
;
}
public array $conditions = [
'type' => 'linestring'
];
/**
* Get Name
*
* @return string
*/
public function getName(): string
{
return 'ColumnLine';
}
/**
* Get Type
*
* @return string
*/
public function getType(): string
{
return Response::MODEL_COLUMN_LINE;
}
}