This commit is contained in:
2021-12-06 17:27:57 +01:00
parent 25147704ad
commit ebd817f61e
9 changed files with 52 additions and 46 deletions

View File

@@ -11,7 +11,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity;
use DateTimeImmutable;
use DateTime;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
@@ -38,7 +38,7 @@ class AccompanyingPeriodParticipation
* @ORM\Column(type="date", nullable=true)
* @Groups({"read", "docgen:read"})
*/
private ?\DateTime $endDate = null;
private ?DateTime $endDate = null;
/**
* @ORM\Id
@@ -59,11 +59,11 @@ class AccompanyingPeriodParticipation
* @ORM\Column(type="date", nullable=false)
* @Groups({"read", "docgen:read"})
*/
private ?\DateTime $startDate = null;
private ?DateTime $startDate = null;
public function __construct(AccompanyingPeriod $accompanyingPeriod, Person $person)
{
$this->startDate = new \DateTime('now');
$this->startDate = new DateTime('now');
$this->accompanyingPeriod = $accompanyingPeriod;
$this->person = $person;
}