<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;class OfferEntry { /** * @var int */ private $id; /** * @var \DateTime|null */ private $dateFrom; /** * @var \DateTime|null */ private $dateTo; /** * @var string */ private $note; /** * @var \App\Entity\Offer */ private $offer; /** * Get id * * @return integer */ public function getId() { return $this->id; } public function getDateFrom() { return $this->dateFrom; } public function getDateTo() { return $this->dateTo; } public function setDateFrom($dateFrom) { $this->dateFrom = $dateFrom; } public function setDateTo($dateTo) { $this->dateTo = $dateTo; } public function getNote() { return $this->note; } public function setNote($note) { $this->note = $note; } /** * Set offer * * @param \App\Entity\Offer $offer * * @return OfferEntry */ public function setOffer(\App\Entity\Offer $offer = null) { $this->offer = $offer; return $this; } /** * Get offer * * @return \App\Entity\Offer */ public function getOffer() { return $this->offer; } public function getOfferID() { if (empty($this->offer)) { return 0; } return $this->offer->getId(); } public function getStrDateFrom() { if (empty($this->dateFrom)) { return ''; } return $this->dateFrom->format('d.m.Y'); } public function getStrDateTo() { if (empty($this->dateTo)) { return ''; } return $this->dateTo->format('d.m.Y'); }}