src/Entity/Gos/CalendarEvent.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\CalendarEventRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CalendarEventRepository::class)
  7.  *  @ORM\HasLifecycleCallbacks()
  8.  */
  9. class CalendarEvent
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $title;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=ProductVariant::class, inversedBy="calendarEvents")
  23.      */
  24.     private $productVariant;
  25.     /**
  26.      * @ORM\Column(type="date")
  27.      */
  28.     private $beginAt;
  29.     /**
  30.      * @ORM\Column(type="date")
  31.      */
  32.     private $endAt;
  33.     /**
  34.      * @ORM\Column(type="datetime")
  35.      */
  36.     private $createdAt;
  37.     /**
  38.      * @ORM\Column(type="datetime", nullable=true)
  39.      */
  40.     private $updatedAt;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $variantTitle;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $priceGross;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $postageCost;
  53.     /**
  54.      * @ORM\Column(type="string", length=255, nullable=true)
  55.      */
  56.     private $link;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      */
  60.     private $textColor;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      */
  64.     private $backgroundColor;
  65.     /**
  66.      * @ORM\Column(type="text", nullable=true)
  67.      */
  68.     private $description;
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity=CalendarEventKind::class, inversedBy="calendarEvents")
  71.      * @ORM\JoinColumn(nullable=true)
  72.      * TODO set nullable to false and update existing data in prod db after deploy
  73.      */
  74.     private $calendarEventKind;
  75.     /**
  76.      * @ORM\Column(type="boolean")
  77.      */
  78.     private $hideDate 0;
  79.     /** @ORM\PrePersist() */
  80.     public function onPrePersist()
  81.     {
  82.         $this->createdAt = new \DateTime();
  83.     }
  84.     /** @ORM\PreUpdate() */
  85.     public function onPreUpdate()
  86.     {
  87.         $this->updatedAt = new \DateTime();
  88.     }
  89.     public function getId(): ?int
  90.     {
  91.         return $this->id;
  92.     }
  93.     public function getTitle(): ?string
  94.     {
  95.         return $this->title;
  96.     }
  97.     public function setTitle(?string $title): self
  98.     {
  99.         $this->title $title;
  100.         return $this;
  101.     }
  102.     public function getProductVariant(): ?ProductVariant
  103.     {
  104.         return $this->productVariant;
  105.     }
  106.     public function setProductVariant(?ProductVariant $productVariant): self
  107.     {
  108.         $this->productVariant $productVariant;
  109.         return $this;
  110.     }
  111.     public function getBeginAt(): ?\DateTimeInterface
  112.     {
  113.         return $this->beginAt;
  114.     }
  115.     public function setBeginAt(\DateTimeInterface $beginAt): self
  116.     {
  117.         $this->beginAt $beginAt;
  118.         return $this;
  119.     }
  120.     public function getEndAt(): ?\DateTimeInterface
  121.     {
  122.         return $this->endAt;
  123.     }
  124.     public function setEndAt(\DateTimeInterface $endAt): self
  125.     {
  126.         $this->endAt $endAt;
  127.         return $this;
  128.     }
  129.     public function getCreatedAt(): ?\DateTimeInterface
  130.     {
  131.         return $this->createdAt;
  132.     }
  133.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  134.     {
  135.         $this->createdAt $createdAt;
  136.         return $this;
  137.     }
  138.     public function getUpdatedAt(): ?\DateTimeInterface
  139.     {
  140.         return $this->updatedAt;
  141.     }
  142.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  143.     {
  144.         $this->updatedAt $updatedAt;
  145.         return $this;
  146.     }
  147.     public function getVariantTitle(): ?string
  148.     {
  149.         return $this->variantTitle;
  150.     }
  151.     public function setVariantTitle(string $variantTitle): self
  152.     {
  153.         $this->variantTitle $variantTitle;
  154.         return $this;
  155.     }
  156.     public function getPriceGross(): ?string
  157.     {
  158.         return $this->priceGross;
  159.     }
  160.     public function setPriceGross(?string $priceGross): self
  161.     {
  162.         $this->priceGross $priceGross;
  163.         return $this;
  164.     }
  165.     public function getPostageCost(): ?string
  166.     {
  167.         return $this->postageCost;
  168.     }
  169.     public function setPostageCost(?string $postageCost): self
  170.     {
  171.         $this->postageCost $postageCost;
  172.         return $this;
  173.     }
  174.     public function getLink(): ?string
  175.     {
  176.         return $this->link;
  177.     }
  178.     public function setLink(?string $link): self
  179.     {
  180.         $this->link $link;
  181.         return $this;
  182.     }
  183.     public function getTextColor(): ?string
  184.     {
  185.         return $this->textColor;
  186.     }
  187.     public function setTextColor(?string $textColor): self
  188.     {
  189.         $this->textColor $textColor;
  190.         return $this;
  191.     }
  192.     public function getBackgroundColor(): ?string
  193.     {
  194.         return $this->backgroundColor;
  195.     }
  196.     public function setBackgroundColor(?string $backgroundColor): self
  197.     {
  198.         $this->backgroundColor $backgroundColor;
  199.         return $this;
  200.     }
  201.     public function getDescription(): ?string
  202.     {
  203.         return $this->description;
  204.     }
  205.     public function setDescription(?string $description): self
  206.     {
  207.         $this->description $description;
  208.         return $this;
  209.     }
  210.     public function getCalendarEventKind(): ?CalendarEventKind
  211.     {
  212.         return $this->calendarEventKind;
  213.     }
  214.     public function setCalendarEventKind(?CalendarEventKind $calendarEventKind): self
  215.     {
  216.         $this->calendarEventKind $calendarEventKind;
  217.         return $this;
  218.     }
  219.     public function getHideDate(): ?bool
  220.     {
  221.         return $this->hideDate;
  222.     }
  223.     public function setHideDate(bool $hideDate): self
  224.     {
  225.         $this->hideDate $hideDate;
  226.         return $this;
  227.     }
  228. }