Add all and none special tags

This commit is contained in:
Tim
2025-05-10 21:10:00 +02:00
parent b8ae8bb8a7
commit 0648db62e3
5 changed files with 31 additions and 9 deletions

View File

@ -6,6 +6,7 @@ use App\Repository\TagRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: TagRepository::class)]
#[ORM\UniqueConstraint(name: 'user_tag_unique', columns: ['name', 'user_id'])]
@ -17,6 +18,8 @@ class Tag
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Assert\NotEqualTo('all')]
#[Assert\NotEqualTo('none')]
private ?string $name = null;
#[ORM\ManyToOne]