Redis
This commit is contained in:
@ -16,7 +16,16 @@ class Subsidio extends Ideal\Repository
|
||||
|
||||
public function create(?array $data = null): Model\Venta\Subsidio
|
||||
{
|
||||
$map = new Implement\Repository\MapperParser(['pago', 'subsidio']);
|
||||
$map = (new Implement\Repository\MapperParser())
|
||||
->register('pago', (new Implement\Repository\Mapper())
|
||||
->setProperty('ahorro')
|
||||
->setFunction(function($data) {
|
||||
return $this->pagoRepository->fetchById($data['pago']);
|
||||
}))
|
||||
->register('subsidio', (new Implement\Repository\Mapper())
|
||||
->setFunction(function($data) {
|
||||
return $this->pagoRepository->fetchById($data['subsidio']);
|
||||
}));
|
||||
return $this->parseData(new Model\Venta\Subsidio(), $data, $map);
|
||||
}
|
||||
public function save(Define\Model $model): Model\Venta\Subsidio
|
||||
|
Reference in New Issue
Block a user