<?php
namespace App\Entity\Gos;
use App\Repository\Gos\CalendarEventRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CalendarEventRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class CalendarEvent
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $title;
/**
* @ORM\ManyToOne(targetEntity=ProductVariant::class, inversedBy="calendarEvents")
*/
private $productVariant;
/**
* @ORM\Column(type="date")
*/
private $beginAt;
/**
* @ORM\Column(type="date")
*/
private $endAt;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $variantTitle;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $priceGross;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $postageCost;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $link;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $textColor;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $backgroundColor;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\ManyToOne(targetEntity=CalendarEventKind::class, inversedBy="calendarEvents")
* @ORM\JoinColumn(nullable=true)
* TODO set nullable to false and update existing data in prod db after deploy
*/
private $calendarEventKind;
/**
* @ORM\Column(type="boolean")
*/
private $hideDate = 0;
/** @ORM\PrePersist() */
public function onPrePersist()
{
$this->createdAt = new \DateTime();
}
/** @ORM\PreUpdate() */
public function onPreUpdate()
{
$this->updatedAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getProductVariant(): ?ProductVariant
{
return $this->productVariant;
}
public function setProductVariant(?ProductVariant $productVariant): self
{
$this->productVariant = $productVariant;
return $this;
}
public function getBeginAt(): ?\DateTimeInterface
{
return $this->beginAt;
}
public function setBeginAt(\DateTimeInterface $beginAt): self
{
$this->beginAt = $beginAt;
return $this;
}
public function getEndAt(): ?\DateTimeInterface
{
return $this->endAt;
}
public function setEndAt(\DateTimeInterface $endAt): self
{
$this->endAt = $endAt;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getVariantTitle(): ?string
{
return $this->variantTitle;
}
public function setVariantTitle(string $variantTitle): self
{
$this->variantTitle = $variantTitle;
return $this;
}
public function getPriceGross(): ?string
{
return $this->priceGross;
}
public function setPriceGross(?string $priceGross): self
{
$this->priceGross = $priceGross;
return $this;
}
public function getPostageCost(): ?string
{
return $this->postageCost;
}
public function setPostageCost(?string $postageCost): self
{
$this->postageCost = $postageCost;
return $this;
}
public function getLink(): ?string
{
return $this->link;
}
public function setLink(?string $link): self
{
$this->link = $link;
return $this;
}
public function getTextColor(): ?string
{
return $this->textColor;
}
public function setTextColor(?string $textColor): self
{
$this->textColor = $textColor;
return $this;
}
public function getBackgroundColor(): ?string
{
return $this->backgroundColor;
}
public function setBackgroundColor(?string $backgroundColor): self
{
$this->backgroundColor = $backgroundColor;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getCalendarEventKind(): ?CalendarEventKind
{
return $this->calendarEventKind;
}
public function setCalendarEventKind(?CalendarEventKind $calendarEventKind): self
{
$this->calendarEventKind = $calendarEventKind;
return $this;
}
public function getHideDate(): ?bool
{
return $this->hideDate;
}
public function setHideDate(bool $hideDate): self
{
$this->hideDate = $hideDate;
return $this;
}
}