Migraciones
This commit is contained in:
@ -6,24 +6,22 @@ use Incoviba\Model;
|
||||
|
||||
class Proveedor extends Ideal\Model
|
||||
{
|
||||
public Model\Inmobiliaria $inmobiliaria;
|
||||
public Model\Sociedad $sociedad;
|
||||
|
||||
protected array $tipos;
|
||||
public function tipos(): array
|
||||
{
|
||||
if (!isset($this->tipos)) {
|
||||
$this->tipos = $this->runFactory('tipos');
|
||||
}
|
||||
return $this->tipos;
|
||||
}
|
||||
public int $rut;
|
||||
public string $digito;
|
||||
public string $nombre;
|
||||
public ?string $razon;
|
||||
public ?DatosProveedor $datos;
|
||||
public ?Model\Persona $contacto;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'inmobiliaria' => $this->inmobiliaria,
|
||||
'sociedad' => $this->sociedad,
|
||||
'tipos' => $this->tipos(),
|
||||
]);
|
||||
return [
|
||||
'rut' => $this->rut,
|
||||
'digito' => $this->digito,
|
||||
'nombre' => $this->nombre,
|
||||
'razon' => $this->razon,
|
||||
'datos' => $this->datos,
|
||||
'contacto' => $this->contacto
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user