<?php

namespace AutoAdmin\Bundle\Content\Entity\Traits;

/**
 * Trait SlugTrait
 *
 * @package 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;

trait SlugTrait
{
    #[ORM\Column(name: 'slug', type: Types::STRING, length: 255)]
    protected string $slug = '';

    public function getSlug(): ?string
    {
        return $this->slug;
    }

    public function setSlug(string $slug): void
    {
        $this->slug = $slug;
    }
}
