mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
normalization for docgen:read: add groups and so on (wip)
This commit is contained in:
@@ -32,38 +32,38 @@ class AccompanyingPeriodParticipation
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="participations", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="accompanyingperiod_id", referencedColumnName="id", nullable=false)
|
||||
*/
|
||||
private $accompanyingPeriod;
|
||||
private ?AccompanyingPeriod $accompanyingPeriod = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date", nullable=true)
|
||||
* @Groups({"read", "read:docgen"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private $endDate;
|
||||
private ?\DateTime $endDate = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @Groups({"read", "read:docgen"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="accompanyingPeriodParticipations")
|
||||
* @ORM\JoinColumn(name="person_id", referencedColumnName="id", nullable=false)
|
||||
* @Groups({"read", "read:docgen"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private $person;
|
||||
private ?Person $person = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date", nullable=false)
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private $startDate;
|
||||
private ?\DateTime $startDate = null;
|
||||
|
||||
public function __construct(AccompanyingPeriod $accompanyingPeriod, Person $person)
|
||||
{
|
||||
$this->startDate = new DateTimeImmutable('now');
|
||||
$this->startDate = new \DateTime('now');
|
||||
$this->accompanyingPeriod = $accompanyingPeriod;
|
||||
$this->person = $person;
|
||||
}
|
||||
@@ -73,10 +73,6 @@ class AccompanyingPeriodParticipation
|
||||
return $this->accompanyingPeriod;
|
||||
}
|
||||
|
||||
/*
|
||||
* public function setStartDate(\DateTimeInterface $startDate): self { $this->startDate = $startDate; return $this; }
|
||||
*/
|
||||
|
||||
public function getEndDate(): ?DateTimeInterface
|
||||
{
|
||||
return $this->endDate;
|
||||
|
Reference in New Issue
Block a user