GET and POST both working.

This commit is contained in:
2021-10-29 09:29:27 +02:00
parent 69e3a0a6cd
commit 3a7af94058
5 changed files with 68 additions and 34 deletions

View File

@@ -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;
}
}
}