2023-09-12
This commit is contained in:
@ -18,7 +18,7 @@ class EstadoPago extends Ideal\Repository
|
||||
$this->setTable('estado_pago');
|
||||
}
|
||||
|
||||
public function create(?array $data = null): Define\Model
|
||||
public function create(?array $data = null): Model\Venta\EstadoPago
|
||||
{
|
||||
$map = (new Implement\Repository\MapperParser())
|
||||
->register('pago', (new Implement\Repository\Mapper())
|
||||
@ -34,7 +34,7 @@ class EstadoPago extends Ideal\Repository
|
||||
return $this->parseData(new Model\Venta\EstadoPago(), $data, $map);
|
||||
}
|
||||
|
||||
public function save(Define\Model $model): Define\Model
|
||||
public function save(Define\Model $model): Model\Venta\EstadoPago
|
||||
{
|
||||
$model->id = $this->saveNew(
|
||||
['pago', 'estado', 'fecha'],
|
||||
@ -43,7 +43,7 @@ class EstadoPago extends Ideal\Repository
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function edit(Define\Model $model, array $new_data): Define\Model
|
||||
public function edit(Define\Model $model, array $new_data): Model\Venta\EstadoPago
|
||||
{
|
||||
return $this->update($model, ['pago', 'estado', 'fecha'], $new_data);
|
||||
}
|
||||
@ -53,7 +53,7 @@ class EstadoPago extends Ideal\Repository
|
||||
$query = "SELECT * FROM `{$this->getTable()}` WHERE `pago` = ?";
|
||||
return $this->fetchMany($query, [$pago_id]);
|
||||
}
|
||||
public function fetchCurrentByPago(int $pago_id): Define\Model
|
||||
public function fetchCurrentByPago(int $pago_id): Model\Venta\EstadoPago
|
||||
{
|
||||
$query = "SELECT a.*
|
||||
FROM `{$this->getTable()}` a
|
||||
@ -61,7 +61,7 @@ FROM `{$this->getTable()}` a
|
||||
WHERE a.`pago` = ?";
|
||||
return $this->fetchOne($query, [$pago_id]);
|
||||
}
|
||||
public function fetchByPagoAndEstado(int $pago_id, int $estado_id): Define\Model
|
||||
public function fetchByPagoAndEstado(int $pago_id, int $estado_id): Model\Venta\EstadoPago
|
||||
{
|
||||
$query = "SELECT * FROM `{$this->getTable()}` WHERE `pago` = ? AND `estado` = ?";
|
||||
return $this->fetchOne($query, [$pago_id, $estado_id]);
|
||||
|
Reference in New Issue
Block a user