mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
GET and POST both working.
This commit is contained in:
@@ -3,10 +3,16 @@
|
||||
namespace Chill\PersonBundle\Entity\Relationships;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\ORM\Mapping\DiscriminatorColumn;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table(name="chill_person_relations")
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "relation"=Relation::class
|
||||
* })
|
||||
*/
|
||||
class Relation
|
||||
{
|
||||
@@ -15,17 +21,19 @@ class Relation
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json", nullable=true)
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $title = [];
|
||||
private array $title = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json", nullable=true)
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $reverseTitle = [];
|
||||
private array $reverseTitle = [];
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
@@ -55,4 +63,4 @@ class Relation
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user