2021-11-23 14:08:50 +01:00

77 lines
1.5 KiB
PHP

<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity
* @ORM\Table(name="chill_person_accompanying_period_origin")
* @Serializer\DiscriminatorMap(
* typeProperty="type",
* mapping={
* "origin": Origin::class
* })
*/
class Origin
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"read"})
*/
private $id;
/**
* @ORM\Column(type="json")
* @Groups({"read"})
*/
private $label;
/**
* @ORM\Column(type="date_immutable", nullable=true)
* @Groups({"read"})
*/
private $noActiveAfter;
public function getId(): ?int
{
return $this->id;
}
public function getLabel()
{
return $this->label;
}
public function getNoActiveAfter(): ?DateTimeImmutable
{
return $this->noActiveAfter;
}
public function setLabel(string $label): self
{
$this->label = $label;
return $this;
}
public function setNoActiveAfter(?DateTimeImmutable $noActiveAfter): self
{
$this->noActiveAfter = $noActiveAfter;
return $this;
}
}