Fix: re-add Serializer discriminator map to Motive entity

- Enabled `type` property discrimination for serialization with `DiscriminatorMap`.
- Prepared `Motive` entity for serialization of motive types.
This commit is contained in:
2025-09-29 13:41:18 +02:00
parent 914c741578
commit 2f6b628134

View File

@@ -17,9 +17,11 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\Common\Collections\Selectable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
#[ORM\Entity()]
#[ORM\Table(name: 'motive', schema: 'chill_ticket')]
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['ticket_motive' => Motive::class])]
class Motive
{
#[ORM\Id]