Implemented repository mapper, and venta show

This commit is contained in:
Juan Pablo Vial
2023-08-08 23:53:49 -04:00
parent ef30ae67d2
commit 59825259b6
111 changed files with 2766 additions and 612 deletions

View File

@ -5,21 +5,36 @@ use Incoviba\Common\Ideal;
class Proyecto extends Ideal\Model
{
public Inmobiliaria $inmobiliaria;
protected Inmobiliaria $inmobiliaria;
public string $descripcion;
public Direccion $direccion;
protected Direccion $direccion;
public Proyecto\Terreno $terreno;
public Proyecto\Superficie $superficie;
public float $corredor;
public int $pisos;
public int $subterraneos;
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;
}
public function jsonSerialize(): mixed
{
return array_merge(parent::jsonSerialize(), [
'inmobiliaria' => $this->inmobiliaria,
'inmobiliaria' => $this->inmobiliaria(),
'descripcion' => $this->descripcion,
'direccion' => $this->direccion,
'direccion' => $this->direccion(),
'terreno' => $this->terreno,
'superficie' => $this->superficie,
'corredor' => $this->corredor,