This commit is contained in:
lubiana 2025-06-15 13:57:17 +02:00
parent 9d2f0204e3
commit ee32852789
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
12 changed files with 514 additions and 3 deletions

View file

@ -2,7 +2,14 @@
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;
use App\Repository\FoodOrderRepository;
use App\State\OpenOrdersProvider;
use DateInterval;
use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection;
@ -13,6 +20,20 @@ use Symfony\Component\Uid\Ulid;
use function iterator_to_array;
#[ApiResource(
operations: [
new GetCollection(
uriTemplate: 'food_orders/open',
description: 'Get only open orders',
provider: OpenOrdersProvider::class,
),
new GetCollection,
new Get,
new Post,
new Put,
new Delete,
]
)]
#[ORM\Entity(repositoryClass: FoodOrderRepository::class)]
class FoodOrder
{