24 lines
575 B
PHP
24 lines
575 B
PHP
<?php
|
|
namespace Incoviba\Common;
|
|
|
|
use Incoviba\API\Common\Alias\Model;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $descripcion
|
|
* @property string $numeral
|
|
* @property int $numeracion
|
|
*/
|
|
class Region extends Model {
|
|
public static $_table = 'region';
|
|
protected static $fields = ['descripcion', 'numeral', 'numeracion'];
|
|
|
|
protected ?array $provincias;
|
|
public function provincias(): ?array {
|
|
if ($this->provincias === null) {
|
|
$this->provincias = $this->parentOf(Provincia::class, [Model::CHILD_KEY => 'region']);
|
|
}
|
|
return $this->provincias;
|
|
}
|
|
}
|