35 lines
938 B
PHP
35 lines
938 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Contracts\Repositories;
|
||
|
|
|
||
|
|
use App\Contracts\Repository;
|
||
|
|
use App\Models\Order;
|
||
|
|
use Carbon\CarbonInterface;
|
||
|
|
use Domain\Models\ValueObjects\Matricule;
|
||
|
|
use Ramsey\Uuid\UuidInterface;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @extends Repository<Order, UuidInterface>
|
||
|
|
*/
|
||
|
|
interface OrderRepository extends Repository
|
||
|
|
{
|
||
|
|
public function find(UuidInterface $id): ?Order;
|
||
|
|
|
||
|
|
public function persist(Order $order): void;
|
||
|
|
|
||
|
|
public function delete(Order $order): void;
|
||
|
|
|
||
|
|
/** @return array<array-key, Order> */
|
||
|
|
public function getAll(): array;
|
||
|
|
|
||
|
|
/** @return array<array-key, Order> */
|
||
|
|
public function getValidatedOrdersForPickupDay(CarbonInterface $pickupDay): array;
|
||
|
|
|
||
|
|
public function hasValidatedOrderForPickupDay(Matricule $matricule, CarbonInterface $pickupDay): bool;
|
||
|
|
|
||
|
|
/** @return array<array-key, Order> */
|
||
|
|
public function getOrdersWithLinesAndShopForPickupDay(CarbonInterface $pickupDay): array;
|
||
|
|
}
|