<?php

declare(strict_types=1);

namespace App\Entity\Shop;

use ApiPlatform\Metadata\ApiResource;
use App\Entity\Access\Access;
use App\Entity\Organization\Organization;
use Doctrine\ORM\Mapping as ORM;

#[ApiResource(operations: [])]
#[ORM\Entity]
class Orders
{
    #[ORM\Id]
    #[ORM\Column(length: 100)]
    protected string $uuid;

    #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [], inversedBy: 'orders')]
    #[ORM\JoinColumn(nullable: true)]
    protected ?Organization $organization;

    #[ORM\ManyToOne(targetEntity: Access::class, cascade: [], inversedBy: 'orders')]
    protected ?Access $access;

    public function getUuid(): mixed
    {
        return $this->uuid;
    }

    public function setUuid(mixed $uuid): self
    {
        $this->uuid = $uuid;

        return $this;
    }

    public function getOrganization(): ?Organization
    {
        return $this->organization;
    }

    public function setOrganization(?Organization $organization): self
    {
        $this->organization = $organization;

        return $this;
    }

    public function getAccess(): ?Access
    {
        return $this->access;
    }

    public function setAccess(?Access $access): self
    {
        $this->access = $access;

        return $this;
    }
}
