add rest api
This commit is contained in:
parent
2b5d943116
commit
d92a63fd7d
15 changed files with 2415 additions and 281 deletions
0
src/ApiResource/.gitignore
vendored
Normal file
0
src/ApiResource/.gitignore
vendored
Normal file
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Entity;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use App\Repository\FoodOrderRepository;
|
||||
use DateInterval;
|
||||
use DateTimeImmutable;
|
||||
|
@ -14,6 +15,7 @@ use Symfony\Component\Uid\Ulid;
|
|||
use function iterator_to_array;
|
||||
|
||||
#[ORM\Entity(repositoryClass: FoodOrderRepository::class)]
|
||||
#[ApiResource]
|
||||
class FoodOrder
|
||||
{
|
||||
#[ORM\Column(nullable: true)]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Entity;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use App\Repository\FoodVendorRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
@ -11,6 +12,7 @@ use Symfony\Bridge\Doctrine\Types\UlidType;
|
|||
use Symfony\Component\Uid\Ulid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: FoodVendorRepository::class)]
|
||||
#[ApiResource]
|
||||
class FoodVendor
|
||||
{
|
||||
#[ORM\Column(length: 50)]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Entity;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use App\Repository\MenuItemRepository;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
@ -12,6 +13,7 @@ use Symfony\Bridge\Doctrine\Types\UlidType;
|
|||
use Symfony\Component\Uid\Ulid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: MenuItemRepository::class)]
|
||||
#[ApiResource]
|
||||
class MenuItem
|
||||
{
|
||||
#[ORM\Column(length: 255)]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Entity;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use App\Repository\OrderItemRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator;
|
||||
|
@ -9,6 +10,7 @@ use Symfony\Bridge\Doctrine\Types\UlidType;
|
|||
use Symfony\Component\Uid\Ulid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: OrderItemRepository::class)]
|
||||
#[ApiResource]
|
||||
class OrderItem
|
||||
{
|
||||
#[ORM\Id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue