columna faltante del modelo
This commit is contained in:
@ -5,4 +5,12 @@ use Incoviba\Model;
|
||||
|
||||
class TipoEstadoPago extends Model\Tipo
|
||||
{
|
||||
public bool $activo;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'activo' => $this->activo
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,8 @@ class TipoEstadoPago extends Ideal\Repository
|
||||
|
||||
public function create(?array $data = null): Define\Model
|
||||
{
|
||||
$map = new Implement\Repository\MapperParser(['descripcion']);
|
||||
$map = (new Implement\Repository\MapperParser(['descripcion']))
|
||||
->register('active', (new Implement\Repository\Mapper\Boolean('active', 'activo', true)));
|
||||
return $this->parseData(new Model\Venta\TipoEstadoPago(), $data, $map);
|
||||
}
|
||||
public function save(Define\Model $model): Define\Model
|
||||
|
Reference in New Issue
Block a user