33 lines
855 B
PHP
33 lines
855 B
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\PxeTemplateRepository;
|
|
use Doctrine\DBAL\Types\Types;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|
|
|
#[ORM\Entity(repositoryClass: PxeTemplateRepository::class)]
|
|
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_NAME', fields: ['name'])]
|
|
#[UniqueEntity(fields: ['name'], message: 'validators.pxe_template.name.unique')]
|
|
class PxeTemplate extends AbstractEntity
|
|
{
|
|
use NameableTrait;
|
|
use SynchronizedTrait;
|
|
|
|
#[ORM\Column(type: Types::TEXT)]
|
|
private ?string $templateContent = null;
|
|
|
|
public function getTemplateContent(): ?string
|
|
{
|
|
return $this->templateContent;
|
|
}
|
|
|
|
public function setTemplateContent(string $templateContent): static
|
|
{
|
|
$this->templateContent = $templateContent;
|
|
|
|
return $this;
|
|
}
|
|
}
|