<?php


namespace AutoAdmin\Bundle\Content\Entity\Traits;

use AutoAdmin\Bundle\Content\Model\TranslatableInterface;
use Symfony\Component\Serializer\Annotation\Groups;

trait TranslationTrait
{
    use IdTrait;
    use LocalizedTrait;

    /**
     * @ ORM\Id
     *
     * Autogenerated annotation:
     * ORM\ManyToOne(targetEntity="", inversedBy="translations")
     */
    #[Groups(['translatable'])]
    protected TranslatableInterface $translatable;

    public function getTranslatable(): ?TranslatableInterface
    {
        return $this->translatable;
    }

    public function setTranslatable(?TranslatableInterface $translatable = null): void
    {
        $this->translatable = $translatable;
    }
}
