Listado proyectos
This commit is contained in:
@ -17,7 +17,7 @@ class EstadoVenta extends Ideal\Repository
|
||||
$this->setTable('estado_venta');
|
||||
}
|
||||
|
||||
public function create(?array $data = null): Define\Model
|
||||
public function create(?array $data = null): Model\Venta\EstadoVenta
|
||||
{
|
||||
$map = (new Implement\Repository\MapperParser())
|
||||
->register('venta', (new Implement\Repository\Mapper())
|
||||
@ -32,7 +32,7 @@ class EstadoVenta extends Ideal\Repository
|
||||
->register('fecha', new Implement\Repository\Mapper\DateTime('fecha'));
|
||||
return $this->parseData(new Model\Venta\EstadoVenta(), $data, $map);
|
||||
}
|
||||
public function save(Define\Model $model): Define\Model
|
||||
public function save(Define\Model $model): Model\Venta\EstadoVenta
|
||||
{
|
||||
$model->id = $this->saveNew(
|
||||
['venta', 'estado', 'fecha'],
|
||||
@ -40,7 +40,7 @@ class EstadoVenta 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\EstadoVenta
|
||||
{
|
||||
return $this->update($model, ['venta', 'estado', 'fecha'], $new_data);
|
||||
}
|
||||
@ -50,7 +50,7 @@ class EstadoVenta extends Ideal\Repository
|
||||
$query = "SELECT * FROM `{$this->getTable()}` WHERE `venta` = ?";
|
||||
return $this->fetchMany($query, [$venta_id]);
|
||||
}
|
||||
public function fetchCurrentByVenta(int $venta_id): Define\Model
|
||||
public function fetchCurrentByVenta(int $venta_id): Model\Venta\EstadoVenta
|
||||
{
|
||||
$query = "SELECT a.*
|
||||
FROM `{$this->getTable()}` a
|
||||
|
Reference in New Issue
Block a user