setTable('bono_pie'); } public function create(?array $data = null): Define\Model { $map = [ 'pago' => [ 'function' => function($data) { return $this->pagoRepository->fetchById($data['pago']); } ] ]; return $this->parseData(new Model\Venta\BonoPie(), $data, $map); } public function save(Define\Model $model): Define\Model { $model->id = $this->saveNew( ['valor', 'pago'], [$model->pago->valor, $model->pago->id] ); return $model; } public function edit(Define\Model $model, array $new_data): Define\Model { return $this->update($model, ['valor', 'pago'], $new_data); } }