mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
66 lines
1.3 KiB
PHP
66 lines
1.3 KiB
PHP
<?php
|
|
|
|
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
|
|
{
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private ?int $id = null;
|
|
|
|
/**
|
|
* @ORM\Column(type="json", nullable=true)
|
|
* @Serializer\Groups({"read"})
|
|
*/
|
|
private array $title = [];
|
|
|
|
/**
|
|
* @ORM\Column(type="json", nullable=true)
|
|
* @Serializer\Groups({"read"})
|
|
*/
|
|
private array $reverseTitle = [];
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getTitle(): ?array
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
public function setTitle(?array $title): self
|
|
{
|
|
$this->title = $title;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getReverseTitle(): ?array
|
|
{
|
|
return $this->reverseTitle;
|
|
}
|
|
|
|
public function setReverseTitle(?array $reverseTitle): self
|
|
{
|
|
$this->reverseTitle = $reverseTitle;
|
|
|
|
return $this;
|
|
}
|
|
} |