Actualizacion de Repos

This commit is contained in:
Juan Pablo Vial
2025-02-24 12:39:42 -03:00
parent 3ebe256a66
commit 0ec6ebdafe
7 changed files with 105 additions and 9 deletions

View File

@ -11,6 +11,11 @@ class Promotion extends Common\Ideal\Repository
parent::__construct($connection);
}
public function getTable(): string
{
return 'promotions';
}
public function create(?array $data = null): Model\Venta\Promotion
{
$map = (new Implement\Repository\MapperParser(['amount', 'type']))
@ -54,4 +59,4 @@ class Promotion extends Common\Ideal\Repository
->where('price_id = :price_id AND state = :state');
return $this->fetchMany($query, ['price_id' => $price_id, 'state' => Model\Venta\Promotion\State::ACTIVE]);
}
}
}