mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 02:25:00 +00:00
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:
@@ -17,9 +17,11 @@ use Doctrine\Common\Collections\Collection;
|
|||||||
use Doctrine\Common\Collections\ReadableCollection;
|
use Doctrine\Common\Collections\ReadableCollection;
|
||||||
use Doctrine\Common\Collections\Selectable;
|
use Doctrine\Common\Collections\Selectable;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
|
|
||||||
#[ORM\Entity()]
|
#[ORM\Entity()]
|
||||||
#[ORM\Table(name: 'motive', schema: 'chill_ticket')]
|
#[ORM\Table(name: 'motive', schema: 'chill_ticket')]
|
||||||
|
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['ticket_motive' => Motive::class])]
|
||||||
class Motive
|
class Motive
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
Reference in New Issue
Block a user