<?php

namespace AutoAdmin\Bundle\Content\Entity\Traits;

/**
 * Beware: indexed-column max varchar length in utf8_general_ci is 255, or 191 in utf8mb4_general_ci (MySQL limitation)
 */

use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

trait SlugAdminTrait
{
    #[ORM\Column(name: 'slug_admin', type: Types::STRING, length: 255, nullable: true, options: ['default' => null])]
    #[Groups(['slug_admin'])]
    protected ?string $slugAdmin = '';

    public function getSlugAdmin(): ?string
    {
        return $this->slugAdmin;
    }

    public function setSlugAdmin(?string $slugAdmin): void
    {
        $this->slugAdmin = $slugAdmin;
    }
}
