Orders.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Shop;
  4. use ApiPlatform\Metadata\ApiResource;
  5. use App\Entity\Access\Access;
  6. use App\Entity\Organization\Organization;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ApiResource(operations: [])]
  9. #[ORM\Entity]
  10. class Orders
  11. {
  12. #[ORM\Id]
  13. #[ORM\Column(length: 100)]
  14. protected string $uuid;
  15. #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [], inversedBy: 'orders')]
  16. protected Organization $organization;
  17. #[ORM\ManyToOne(targetEntity: Access::class, cascade: [], inversedBy: 'orders')]
  18. protected ?Access $access;
  19. function getUuid(): mixed
  20. {
  21. return $this->uuid;
  22. }
  23. function setUuid(mixed $uuid): self
  24. {
  25. $this->uuid = $uuid;
  26. return $this;
  27. }
  28. function getOrganization(): Organization
  29. {
  30. return $this->organization;
  31. }
  32. function setOrganization(Organization $organization): self
  33. {
  34. $this->organization = $organization;
  35. return $this;
  36. }
  37. function getAccess(): ?Access
  38. {
  39. return $this->access;
  40. }
  41. function setAccess(?Access $access): self
  42. {
  43. $this->access = $access;
  44. return $this;
  45. }
  46. }