<?php
namespace Incoviba\Model\Inmobiliaria\Cuenta;

use DateTimeInterface;
use Incoviba\Common\Ideal;
use Incoviba\Model;

class Estado extends Ideal\Model
{
    public Model\Inmobiliaria\Cuenta $cuenta;
    public DateTimeInterface $fecha;
    public bool $active;

    public function jsonSerialize(): mixed
    {
        return array_merge(parent::jsonSerialize(), [
            'cuenta_id' => $this->cuenta->id,
            'fecha' => $this->fecha->format('Y-m-d'),
            'active' => $this->active
        ]);
    }
}
