mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add a discrimnator type on onbjects
This commit is contained in:
@@ -26,6 +26,8 @@ use Chill\PersonBundle\Repository\AccompanyingPeriodParticipationRepository;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
|
||||
/**
|
||||
* AccompanyingPeriodParticipation Class
|
||||
@@ -33,6 +35,9 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
* @package Chill\PersonBundle\Entity
|
||||
* @ORM\Entity(repositoryClass=AccompanyingPeriodParticipationRepository::class)
|
||||
* @ORM\Table(name="chill_person_accompanying_period_participation")
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "accompanying_period_participation"=AccompanyingPeriodParticipation::class
|
||||
* })
|
||||
*/
|
||||
class AccompanyingPeriodParticipation
|
||||
{
|
||||
@@ -40,12 +45,14 @@ class AccompanyingPeriodParticipation
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="accompanyingPeriodParticipations")
|
||||
* @ORM\JoinColumn(name="person_id", referencedColumnName="id", nullable=false)
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private $person;
|
||||
|
||||
@@ -57,11 +64,13 @@ class AccompanyingPeriodParticipation
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date", nullable=false)
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private $startDate;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date", nullable=true)
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private $endDate = null;
|
||||
|
||||
|
Reference in New Issue
Block a user