first impl of event (WIP)

This commit is contained in:
2022-02-11 10:31:17 +01:00
parent f2221565c5
commit 441704dc29
5 changed files with 330 additions and 6 deletions

View File

@@ -0,0 +1,144 @@
<?php
namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
* @ORM\Table("chill_person_accompanying_period_location_history")
*/
class AccompanyingPeriodLocationHistory
{
use TrackCreationTrait;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class)
*/
private AccompanyingPeriod $period;
/**
* @ORM\ManyToOne(targetEntity=Person::class)
*/
private ?Person $personLocation;
/**
* @ORM\ManyToOne(targetEntity=Address::class)
*/
private ?Address $addressLocation;
/**
* @ORM\Column(type="date_immutable")
*/
private ?\DateTimeImmutable $startDate;
/**
* @ORM\Column(type="date_immutable")
*/
private ?\DateTimeImmutable $endDate;
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return Person|null
*/
public function getPersonLocation(): ?Person
{
return $this->personLocation;
}
/**
* @param Person|null $personLocation
* @return AccompanyingPeriodLocationHistory
*/
public function setPersonLocation(?Person $personLocation): AccompanyingPeriodLocationHistory
{
$this->personLocation = $personLocation;
return $this;
}
/**
* @return Address|null
*/
public function getAddressLocation(): ?Address
{
return $this->addressLocation;
}
/**
* @param Address|null $addressLocation
* @return AccompanyingPeriodLocationHistory
*/
public function setAddressLocation(?Address $addressLocation): AccompanyingPeriodLocationHistory
{
$this->addressLocation = $addressLocation;
return $this;
}
/**
* @return \DateTimeImmutable|null
*/
public function getStartDate(): ?\DateTimeImmutable
{
return $this->startDate;
}
/**
* @param \DateTimeImmutable|null $startDate
* @return AccompanyingPeriodLocationHistory
*/
public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriodLocationHistory
{
$this->startDate = $startDate;
return $this;
}
/**
* @return \DateTimeImmutable|null
*/
public function getEndDate(): ?\DateTimeImmutable
{
return $this->endDate;
}
/**
* @param \DateTimeImmutable|null $endDate
* @return AccompanyingPeriodLocationHistory
*/
public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriodLocationHistory
{
$this->endDate = $endDate;
return $this;
}
/**
* @return AccompanyingPeriod
*/
public function getPeriod(): AccompanyingPeriod
{
return $this->period;
}
/**
* @internal use AccompanyingPeriod::addLocationHistory
*/
public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriodLocationHistory
{
$this->period = $period;
return $this;
}
}