forked from lubiana/futtern
add open orders api route
This commit is contained in:
parent
5de80b0da0
commit
96b246462a
5 changed files with 79 additions and 0 deletions
|
@ -3,7 +3,9 @@
|
|||
namespace App\Entity;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\GetCollection;
|
||||
use App\Repository\FoodOrderRepository;
|
||||
use App\State\OpenFoodOrderProvider;
|
||||
use DateInterval;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
@ -15,6 +17,10 @@ use Symfony\Component\Uid\Ulid;
|
|||
use function iterator_to_array;
|
||||
|
||||
#[ORM\Entity(repositoryClass: FoodOrderRepository::class)]
|
||||
#[GetCollection(
|
||||
uriTemplate: '/food_orders/open',
|
||||
provider: OpenFoodOrderProvider::class,
|
||||
)]
|
||||
#[ApiResource]
|
||||
class FoodOrder
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue