<?php

declare(strict_types=1);

/**
 * @author Colinet Julien
 */

namespace CpCreation\VitiCore\Product\Model\Translation;

use CpCreation\VitiCore\Behavior\Impl\Translation;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
use Symfony\Component\Validator\Constraints as Assert;

#[ORM\Entity]
#[ORM\Table(name: 'product_category_translation')]
class ProductCategoryTranslation implements TranslationInterface
{
    use Translation;

    #[ORM\Id]
    #[ORM\Column(type: 'uuid')]
    #[ORM\GeneratedValue(strategy: 'NONE')]
    private UuidInterface $id;

    #[ORM\Column(type: 'text')]
    #[Assert\NotBlank]
    private ?string $name = null;

    #[ORM\Column(type: 'text', nullable: true)]
    private ?string $description = null;

    #[ORM\Column(type: 'string', length: 255, unique: true)]
    #[Gedmo\Slug(fields: ['name'])]
    private ?string $slug = null;

    #[ORM\Column(type: 'text', nullable: true)]
    private ?string $noGroupMatchMessage = null;

    #[ORM\Column(type: 'text', nullable: true)]
    private ?string $shopCategoryMessage = null;

    public function __construct()
    {
        $this->id = Uuid::uuid4();
    }

    public function getId(): UuidInterface
    {
        return $this->id;
    }

    public function getName(): ?string
    {
        return $this->name;
    }

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

    public function getDescription(): ?string
    {
        return $this->description;
    }

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

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

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

    public function getNoGroupMatchMessage(): ?string
    {
        return $this->noGroupMatchMessage;
    }

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

    public function getShopCategoryMessage(): ?string
    {
        return $this->shopCategoryMessage;
    }

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

}
