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

48 lines
958 B
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Continent extends Model
{
public function __construct()
{
$this
->addRule('name', [
2020-11-07 22:14:48 +00:00
'type' => self::TYPE_STRING,
'description' => 'Continent name.',
2021-01-13 15:06:36 +00:00
'default' => '',
'example' => 'Europe',
])
->addRule('code', [
2020-11-07 22:14:48 +00:00
'type' => self::TYPE_STRING,
'description' => 'Continent two letter code.',
2021-01-13 15:06:36 +00:00
'default' => '',
'example' => 'EU',
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Continent';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
return Response::MODEL_CONTINENT;
}
}