<?php


namespace AutoAdmin\Bundle\Content\Entity\Traits;


use AutoAdmin\Bundle\Content\Entity\Site;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

trait SiteTrait
{
    #[ORM\ManyToOne(targetEntity: Site::class)]
    #[Groups(['site'])]
    protected ?Site $site = null;

    public function getSite(): ?Site
    {
        return $this->site;
    }

    public function setSite(?Site $site): void
    {
        $this->site = $site;
    }
}
