<?php


namespace AutoAdmin\Bundle\Content\Entity;

use AutoAdmin\Bundle\Content\Repository\StaticTextRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Table(name: 'static_text')]
#[ORM\Entity(repositoryClass: StaticTextRepository::class)]
#[ORM\UniqueConstraint(name: 'translatable_unique', columns: [
    'site_id',
    'trans_key',
    'domain',
])]
class StaticText extends Content
{
    #[ORM\Column(name: 'trans_key', type: Types::STRING, length: 255)]
    protected string $key;

    #[ORM\Column(name: 'domain', type: Types::STRING, length: 255)]
    protected string $domain = 'messages';

    public function getKey(): string
    {
        return $this->key;
    }

    public function setKey(string $key): void
    {
        $this->key = $key;
    }

    public function getDomain(): string
    {
        return $this->domain;
    }

    public function setDomain(string $domain): void
    {
        $this->domain = $domain;
    }
}
