Auth, Login, Home, Venta->Listados->Precios
This commit is contained in:
16
app/src/Model/Banco.php
Normal file
16
app/src/Model/Banco.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class Banco extends Model
|
||||
{
|
||||
public ?string $nombre;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'nombre' => $this->nombre ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
18
app/src/Model/Comuna.php
Normal file
18
app/src/Model/Comuna.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class Comuna extends Model
|
||||
{
|
||||
public string $descripcion;
|
||||
public Provincia $provincia;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'descripcion' => $this->descripcion,
|
||||
'provincia' => $this->provincia
|
||||
]);
|
||||
}
|
||||
}
|
22
app/src/Model/Direccion.php
Normal file
22
app/src/Model/Direccion.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class Direccion extends Model
|
||||
{
|
||||
public string $calle;
|
||||
public int $numero;
|
||||
public string $extra;
|
||||
public Comuna $comuna;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'calle' => $this->calle,
|
||||
'numero' => $this->numero,
|
||||
'extra' => $this->extra,
|
||||
'comuna' => $this->comuna
|
||||
]);
|
||||
}
|
||||
}
|
38
app/src/Model/Inmobiliaria.php
Normal file
38
app/src/Model/Inmobiliaria.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
use Incoviba\Model\Inmobiliaria\TipoSociedad;
|
||||
|
||||
class Inmobiliaria extends Model
|
||||
{
|
||||
public int $rut;
|
||||
public ?string $dv;
|
||||
public ?string $razon;
|
||||
public ?string $abreviacion;
|
||||
public ?string $cuenta;
|
||||
public ?Banco $banco;
|
||||
public ?TipoSociedad $tipoSociedad;
|
||||
|
||||
public function rut(): string
|
||||
{
|
||||
return implode('-', [
|
||||
number_format($this->rut, 0, ',', '.'),
|
||||
$this->dv
|
||||
]);
|
||||
}
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return [
|
||||
'rut' => $this->rut,
|
||||
'dv' => $this->dv ?? '',
|
||||
'rut_formateado' => $this->rut(),
|
||||
'razon' => $this->razon ?? '',
|
||||
'abreviacion' => $this->abreviacion ?? '',
|
||||
'cuenta' => $this->cuenta ?? '',
|
||||
'banco' => $this->banco ?? '',
|
||||
'tipo_sociedad' => $this->tipoSociedad ?? ''
|
||||
];
|
||||
}
|
||||
}
|
16
app/src/Model/Inmobiliaria/TipoSociedad.php
Normal file
16
app/src/Model/Inmobiliaria/TipoSociedad.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Inmobiliaria;
|
||||
|
||||
use Incoviba\Model;
|
||||
|
||||
class TipoSociedad extends Model\Tipo
|
||||
{
|
||||
public string $abreviacion;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'abreviacion' => $this->abreviacion
|
||||
]);
|
||||
}
|
||||
}
|
25
app/src/Model/Login.php
Normal file
25
app/src/Model/Login.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal;
|
||||
|
||||
class Login extends Ideal\Model
|
||||
{
|
||||
public User $user;
|
||||
public string $selector;
|
||||
public string $token;
|
||||
public DateTimeInterface $dateTime;
|
||||
public bool $status;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'user_id' => $this->user->id,
|
||||
'selector' => $this->selector,
|
||||
'token' => $this->token,
|
||||
'date_time' => $this->dateTime->format('Y-m-d H:i:s'),
|
||||
'status' => $this->status
|
||||
]);
|
||||
}
|
||||
}
|
18
app/src/Model/Provincia.php
Normal file
18
app/src/Model/Provincia.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class Provincia extends Model
|
||||
{
|
||||
public string $descripcion;
|
||||
public Region $region;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'descripcion' => $this->descripcion,
|
||||
'region' => $this->region
|
||||
]);
|
||||
}
|
||||
}
|
32
app/src/Model/Proyecto.php
Normal file
32
app/src/Model/Proyecto.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
use Incoviba\Model\Proyecto\Superficie;
|
||||
use Incoviba\Model\Proyecto\Terreno;
|
||||
|
||||
class Proyecto extends Model
|
||||
{
|
||||
public Inmobiliaria $inmobiliaria;
|
||||
public string $descripcion;
|
||||
public Direccion $direccion;
|
||||
public Terreno $terreno;
|
||||
public Superficie $superficie;
|
||||
public float $corredor;
|
||||
public int $pisos;
|
||||
public int $subterraneos;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'inmobiliaria' => $this->inmobiliaria,
|
||||
'descripcion' => $this->descripcion,
|
||||
'direccion' => $this->direccion,
|
||||
'terreno' => $this->terreno,
|
||||
'superficie' => $this->superficie,
|
||||
'corredor' => $this->corredor,
|
||||
'pisos' => $this->pisos,
|
||||
'subterraneos' => $this->subterraneos
|
||||
]);
|
||||
}
|
||||
}
|
42
app/src/Model/Proyecto/ProyectoTipoUnidad.php
Normal file
42
app/src/Model/Proyecto/ProyectoTipoUnidad.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Proyecto;
|
||||
|
||||
use Incoviba\Common\Ideal;
|
||||
use Incoviba\Model;
|
||||
|
||||
class ProyectoTipoUnidad extends Ideal\Model
|
||||
{
|
||||
public Model\Proyecto $proyecto;
|
||||
public Model\Venta\TipoUnidad $tipoUnidad;
|
||||
public string $nombre;
|
||||
public string $abreviacion;
|
||||
public float $util;
|
||||
public float $logia;
|
||||
public float $terraza;
|
||||
public string $descripcion;
|
||||
|
||||
public function superficie(): float
|
||||
{
|
||||
return array_reduce([$this->util, $this->logia, $this->terraza], function($sum, $item) {return $sum + $item;}, 0);
|
||||
}
|
||||
public function vendible(): float
|
||||
{
|
||||
return array_reduce([$this->util, $this->logia, $this->terraza / 2], function($sum, $item) {return $sum + $item;}, 0);
|
||||
}
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'proyecto' => $this->proyecto,
|
||||
'tipo_unidad' => $this->tipoUnidad,
|
||||
'nombre' => $this->nombre,
|
||||
'abreviacion' => $this->abreviacion,
|
||||
'util' => $this->util,
|
||||
'logia' => $this->logia,
|
||||
'terraza' => $this->terraza,
|
||||
'superficie' => $this->superficie(),
|
||||
'vendible' => $this->vendible(),
|
||||
'descripcion' => $this->descripcion
|
||||
]);
|
||||
}
|
||||
}
|
8
app/src/Model/Proyecto/Superficie.php
Normal file
8
app/src/Model/Proyecto/Superficie.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Proyecto;
|
||||
|
||||
class Superficie
|
||||
{
|
||||
public float $sobre_nivel;
|
||||
public float $bajo_nivel;
|
||||
}
|
8
app/src/Model/Proyecto/Terreno.php
Normal file
8
app/src/Model/Proyecto/Terreno.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Proyecto;
|
||||
|
||||
class Terreno
|
||||
{
|
||||
public float $superficie;
|
||||
public float $valor;
|
||||
}
|
20
app/src/Model/Region.php
Normal file
20
app/src/Model/Region.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class Region extends Model
|
||||
{
|
||||
public string $descripcion;
|
||||
public string $numeral;
|
||||
public ?int $numeracion;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'descripcion' => $this->descripcion,
|
||||
'numeral' => $this->numeral,
|
||||
'numeracion' => $this->numeracion ?? 0
|
||||
]);
|
||||
}
|
||||
}
|
7
app/src/Model/Role.php
Normal file
7
app/src/Model/Role.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class Role extends Model
|
||||
{}
|
16
app/src/Model/Tipo.php
Normal file
16
app/src/Model/Tipo.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal;
|
||||
|
||||
abstract class Tipo extends Ideal\Model
|
||||
{
|
||||
public string $descripcion;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'descripcion' => $this->descripcion
|
||||
]);
|
||||
}
|
||||
}
|
28
app/src/Model/User.php
Normal file
28
app/src/Model/User.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace Incoviba\Model;
|
||||
|
||||
use Incoviba\Common\Ideal;
|
||||
use function password_verify;
|
||||
|
||||
class User extends Ideal\Model
|
||||
{
|
||||
public string $name;
|
||||
public string $password;
|
||||
public bool $enabled;
|
||||
|
||||
public function validate(string $provided_password): bool
|
||||
{
|
||||
return password_verify($provided_password, $this->password);
|
||||
}
|
||||
public function isAdmin(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'name' => $this->name
|
||||
]);
|
||||
}
|
||||
}
|
26
app/src/Model/Venta/Cierre.php
Normal file
26
app/src/Model/Venta/Cierre.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal;
|
||||
use Incoviba\Model;
|
||||
|
||||
class Cierre extends Ideal\Model
|
||||
{
|
||||
public Model\Proyecto $proyecto;
|
||||
public float $precio;
|
||||
public DateTimeInterface $dateTime;
|
||||
public bool $relacionado;
|
||||
public Propietario $propietario;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'proyecto_id' => $this->proyecto->id,
|
||||
'precio' => $this->precio,
|
||||
'date_time' => $this->dateTime->format('Y-m-d H:i:s'),
|
||||
'relacionado' => $this->relacionado,
|
||||
'propietario' => $this->propietario->rut
|
||||
]);
|
||||
}
|
||||
}
|
38
app/src/Model/Venta/Cuota.php
Normal file
38
app/src/Model/Venta/Cuota.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
use Incoviba\Model\Banco;
|
||||
|
||||
class Cuota extends Model
|
||||
{
|
||||
public Pie $pie;
|
||||
public DateTimeInterface $fecha;
|
||||
public float $valor;
|
||||
public ?bool $estado;
|
||||
public ?Banco $banco;
|
||||
public ?DateTimeInterface $fechaPago;
|
||||
public ?bool $abonado;
|
||||
public ?DateTimeInterface $fechaAbonado;
|
||||
public ?float $uf;
|
||||
public ?Pago $pago;
|
||||
public ?int $numero;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'pie_id' => $this->pie->id,
|
||||
'fecha' => $this->fecha->format('Y-m-d H:i:s'),
|
||||
'valor' => $this->valor,
|
||||
'estado' => $this->estado ?? false,
|
||||
'banco' => $this->banco,
|
||||
'fecha_pago' => $this->fechaPago->format('Y-m-d H:i:s') ?? '',
|
||||
'abonado' => $this->abonado ?? false,
|
||||
'fecha_abonado' => $this->fechaAbonado->format('Y-m-d H:i:s') ?? '',
|
||||
'uf' => $this->uf ?? 1,
|
||||
'pago' => $this->pago ?? '',
|
||||
'numero' => $this->numero ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
27
app/src/Model/Venta/Datos.php
Normal file
27
app/src/Model/Venta/Datos.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use JsonSerializable;
|
||||
use Incoviba\Model\Direccion;
|
||||
|
||||
class Datos
|
||||
{
|
||||
public ?string $sexo;
|
||||
public ?string $estado_civil;
|
||||
public ?string $profesion;
|
||||
public ?Direccion $direccion;
|
||||
public ?int $telefono;
|
||||
public ?string $email;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return [
|
||||
'sexo' => $this->sexo ?? '',
|
||||
'estado_civil' => $this->estado_civil ?? '',
|
||||
'profesion' => $this->profesion ?? '',
|
||||
'direccion' => $this->direccion ?? '',
|
||||
'telefono' => $this->telefono ?? '',
|
||||
'email' => $this->email ?? ''
|
||||
];
|
||||
}
|
||||
}
|
22
app/src/Model/Venta/EstadoPago.php
Normal file
22
app/src/Model/Venta/EstadoPago.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class EstadoPago extends Model
|
||||
{
|
||||
public Pago $pago;
|
||||
public DateTimeInterface $fecha;
|
||||
public TipoEstadoPago $tipoEstadoPago;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'pago_id' => $this->pago->id,
|
||||
'fecha' => $this->fecha->format('Y-m-d'),
|
||||
'tipo_estado_pago_id' => $this->tipoEstadoPago->id
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
21
app/src/Model/Venta/EstadoPrecio.php
Normal file
21
app/src/Model/Venta/EstadoPrecio.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal;
|
||||
|
||||
class EstadoPrecio extends Ideal\Model
|
||||
{
|
||||
public Precio $precio;
|
||||
public TipoEstadoPrecio $tipoEstadoPrecio;
|
||||
public DateTimeInterface $fecha;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'precio_id' => $this->precio->id,
|
||||
'tipo_estado_precio' => $this->tipoEstadoPrecio,
|
||||
'fecha' => $this->fecha->format('Y-m-d')
|
||||
]);
|
||||
}
|
||||
}
|
32
app/src/Model/Venta/Pago.php
Normal file
32
app/src/Model/Venta/Pago.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
use Incoviba\Model\Banco;
|
||||
|
||||
class Pago extends Model
|
||||
{
|
||||
public float $valor;
|
||||
public ?Banco $banco;
|
||||
public ?TipoPago $tipoPago;
|
||||
public ?string $identificador;
|
||||
public ?DateTimeInterface $fecha;
|
||||
public ?float $uf;
|
||||
public ?string $pagador;
|
||||
public ?Pago $asociado;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'valor' => $this->valor,
|
||||
'banco' => $this->banco ?? '',
|
||||
'tipo_pago' => $this->tipoPago ?? '',
|
||||
'identificador' => $this->identificador ?? '',
|
||||
'fecha' => $this->fecha->format('Y-m-d H:i:S') ?? '',
|
||||
'uf' => $this->uf ?? 1,
|
||||
'pagador' => $this->pagador ?? '',
|
||||
'asociado' => $this->asociado ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
27
app/src/Model/Venta/Pie.php
Normal file
27
app/src/Model/Venta/Pie.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
|
||||
class Pie extends Model
|
||||
{
|
||||
public DateTimeInterface $fecha;
|
||||
public float $valor;
|
||||
public ?float $uf;
|
||||
public int $cuotas;
|
||||
public ?Pie $asociado;
|
||||
public ?Pago $reajuste;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'fecha' => $this->fecha->format('Y-m-d H:i:s'),
|
||||
'valor' => $this->valor,
|
||||
'uf' => $this->uf ?? 1,
|
||||
'cuotas' => $this->cuotas,
|
||||
'asociado' => $this->asociado ?? '',
|
||||
'reajuste' => $this->reajuste ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
23
app/src/Model/Venta/Precio.php
Normal file
23
app/src/Model/Venta/Precio.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use Incoviba\Common\Ideal;
|
||||
|
||||
class Precio extends Ideal\Model
|
||||
{
|
||||
public Unidad $unidad;
|
||||
public float $valor;
|
||||
|
||||
public array $estados;
|
||||
public EstadoPrecio $current;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'unidad' => $this->unidad,
|
||||
'valor' => $this->valor,
|
||||
'estado_precio' => $this->current ?? [],
|
||||
'estados' => $this->estados ?? null
|
||||
]);
|
||||
}
|
||||
}
|
46
app/src/Model/Venta/Propietario.php
Normal file
46
app/src/Model/Venta/Propietario.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use Incoviba\Common\Ideal\Model;
|
||||
use Incoviba\Model\Direccion;
|
||||
|
||||
class Propietario extends Model
|
||||
{
|
||||
public int $rut;
|
||||
public string $dv;
|
||||
public string $nombres;
|
||||
public array $apellidos;
|
||||
public Datos $datos;
|
||||
public ?Propietario $representante;
|
||||
public ?bool $otro;
|
||||
|
||||
public function rut(): string
|
||||
{
|
||||
return implode('-', [
|
||||
number_format($this->rut, 0, ',', '.'),
|
||||
$this->dv
|
||||
]);
|
||||
}
|
||||
public function nombreCompleto(): string
|
||||
{
|
||||
return implode(' ', [
|
||||
$this->nombres,
|
||||
implode(' ', $this->apellidos)
|
||||
]);
|
||||
}
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge([
|
||||
'rut' => $this->rut,
|
||||
'dv' => $this->dv,
|
||||
'rut_formateado' => $this->rut(),
|
||||
'nombres' => $this->nombres,
|
||||
'apellidos' => $this->apellidos,
|
||||
'nombre_completo' => $this->nombreCompleto(),
|
||||
], $this->datos->jsonSerialize(), [
|
||||
'representante' => $this->representante ?? '',
|
||||
'otro' => $this->otro ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
8
app/src/Model/Venta/TipoEstadoPago.php
Normal file
8
app/src/Model/Venta/TipoEstadoPago.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use Incoviba\Model;
|
||||
|
||||
class TipoEstadoPago extends Model\Tipo
|
||||
{
|
||||
}
|
7
app/src/Model/Venta/TipoEstadoPrecio.php
Normal file
7
app/src/Model/Venta/TipoEstadoPrecio.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use Incoviba\Model\Tipo;
|
||||
|
||||
class TipoEstadoPrecio extends Tipo
|
||||
{}
|
8
app/src/Model/Venta/TipoPago.php
Normal file
8
app/src/Model/Venta/TipoPago.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use Incoviba\Model;
|
||||
|
||||
class TipoPago extends Model\Tipo
|
||||
{
|
||||
}
|
16
app/src/Model/Venta/TipoUnidad.php
Normal file
16
app/src/Model/Venta/TipoUnidad.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use Incoviba\Model;
|
||||
|
||||
class TipoUnidad extends Model\Tipo
|
||||
{
|
||||
public int $orden;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'orden' => $this->orden
|
||||
]);
|
||||
}
|
||||
}
|
25
app/src/Model/Venta/Unidad.php
Normal file
25
app/src/Model/Venta/Unidad.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use Incoviba\Common\Ideal;
|
||||
use Incoviba\Model;
|
||||
|
||||
class Unidad extends Ideal\Model
|
||||
{
|
||||
public ?string $subtipo = '';
|
||||
public int $piso;
|
||||
public string $descripcion;
|
||||
public ?string $orientacion = '';
|
||||
public Model\Proyecto\ProyectoTipoUnidad $proyectoTipoUnidad;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'subtipo' => $this->subtipo,
|
||||
'piso' => $this->piso,
|
||||
'descripcion' => $this->descripcion,
|
||||
'orientacion' => $this->orientacion,
|
||||
'proyecto_tipo_unidad' => $this->proyectoTipoUnidad
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user