2023-07-24 20:55:26 -04:00
|
|
|
<?php
|
|
|
|
namespace Incoviba\Model;
|
|
|
|
|
2023-07-28 16:22:20 -04:00
|
|
|
use Incoviba\Common\Ideal;
|
2023-07-24 20:55:26 -04:00
|
|
|
|
2023-07-28 16:22:20 -04:00
|
|
|
class Proyecto extends Ideal\Model
|
2023-07-24 20:55:26 -04:00
|
|
|
{
|
2023-08-08 23:53:49 -04:00
|
|
|
protected Inmobiliaria $inmobiliaria;
|
2023-07-24 20:55:26 -04:00
|
|
|
public string $descripcion;
|
2023-08-08 23:53:49 -04:00
|
|
|
protected Direccion $direccion;
|
2023-07-28 16:22:20 -04:00
|
|
|
public Proyecto\Terreno $terreno;
|
|
|
|
public Proyecto\Superficie $superficie;
|
2023-07-24 20:55:26 -04:00
|
|
|
public float $corredor;
|
|
|
|
public int $pisos;
|
|
|
|
public int $subterraneos;
|
2023-10-13 10:45:21 -03:00
|
|
|
protected Proyecto\Etapa $etapa;
|
2023-07-24 20:55:26 -04:00
|
|
|
|
2023-08-08 23:53:49 -04:00
|
|
|
public function inmobiliaria(): Inmobiliaria
|
|
|
|
{
|
|
|
|
if (!isset($this->inmobiliaria)) {
|
|
|
|
$this->inmobiliaria = $this->runFactory('inmobiliaria');
|
|
|
|
}
|
|
|
|
return $this->inmobiliaria;
|
|
|
|
}
|
|
|
|
public function direccion(): Direccion
|
|
|
|
{
|
|
|
|
if (!isset($this->direccion)) {
|
|
|
|
$this->direccion = $this->runFactory('direccion');
|
|
|
|
}
|
|
|
|
return $this->direccion;
|
|
|
|
}
|
|
|
|
|
2023-07-24 20:55:26 -04:00
|
|
|
public function jsonSerialize(): mixed
|
|
|
|
{
|
|
|
|
return array_merge(parent::jsonSerialize(), [
|
2023-08-08 23:53:49 -04:00
|
|
|
'inmobiliaria' => $this->inmobiliaria(),
|
2023-07-24 20:55:26 -04:00
|
|
|
'descripcion' => $this->descripcion,
|
2023-08-08 23:53:49 -04:00
|
|
|
'direccion' => $this->direccion(),
|
2023-07-24 20:55:26 -04:00
|
|
|
'terreno' => $this->terreno,
|
|
|
|
'superficie' => $this->superficie,
|
|
|
|
'corredor' => $this->corredor,
|
|
|
|
'pisos' => $this->pisos,
|
|
|
|
'subterraneos' => $this->subterraneos
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|