Implemented repository mapper, and venta show
This commit is contained in:
21
app/src/Model/Venta/Comentario.php
Normal file
21
app/src/Model/Venta/Comentario.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Incoviba\Common\Ideal;
|
||||
|
||||
class Comentario extends Ideal\Model
|
||||
{
|
||||
public DateTimeInterface $fecha;
|
||||
public string $texto;
|
||||
public bool $activo;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'fecha' => $this->fecha->format('Y-m-d'),
|
||||
'texto' => $this->texto,
|
||||
'activo' => $this->activo
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user