2024-12-03 16:45:20 -03:00
|
|
|
<?php
|
|
|
|
namespace Incoviba\Model\Persona;
|
|
|
|
|
|
|
|
use DateTimeInterface;
|
|
|
|
use Incoviba\Common\Ideal;
|
|
|
|
use Incoviba\Model\Direccion;
|
|
|
|
use Incoviba\Model\Persona;
|
|
|
|
|
|
|
|
class Datos extends Ideal\Model
|
|
|
|
{
|
|
|
|
public Persona $persona;
|
|
|
|
public ?Direccion $direccion;
|
|
|
|
public ?int $telefono;
|
|
|
|
public ?string $email;
|
|
|
|
public ?DateTimeInterface $fechaNacimiento;
|
|
|
|
public ?string $sexo;
|
|
|
|
public ?string $estadoCivil;
|
|
|
|
public ?string $nacionalidad;
|
|
|
|
public ?string $ocupacion;
|
|
|
|
|
|
|
|
public function jsonSerialize(): mixed
|
|
|
|
{
|
|
|
|
return [
|
2025-09-11 15:16:12 -03:00
|
|
|
'persona_rut' => $this->persona->rut,
|
2024-12-03 16:45:20 -03:00
|
|
|
'direccion' => $this->direccion ?? null,
|
|
|
|
'telefono' => $this->telefono ?? null,
|
|
|
|
'email' => $this->email ?? null,
|
2025-09-11 15:16:12 -03:00
|
|
|
'fechaNacimiento' => $this->fechaNacimiento?->format('Y-m-d') ?? null,
|
2024-12-03 16:45:20 -03:00
|
|
|
'sexo' => $this->sexo ?? null,
|
|
|
|
'estadoCivil' => $this->estadoCivil ?? null,
|
|
|
|
'nacionalidad' => $this->nacionalidad ?? null,
|
|
|
|
'ocupacion' => $this->ocupacion ?? null,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|