<?php
namespace Incoviba\Model\Venta;

use Incoviba\Common\Ideal;

class ValorCierre extends Ideal\Model
{
    public Cierre $cierre;
    public TipoValorCierre $tipoValorCierre;
    public float $valor;

    public function jsonSerialize(): mixed
    {
        return array_merge(parent::jsonSerialize(), [
            'cierre_id' => $this->cierre->id,
            'tipo_valor_cierre' => $this->tipoValorCierre,
            'valor' => $this->valor
        ]);
    }
}
