src/Entity/StudioZeiten.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StudioZeitenRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassStudioZeitenRepository::class)]
  7. class StudioZeiten
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column]
  14.     private array $montag = [];
  15.     #[ORM\Column]
  16.     private array $dienstag = [];
  17.     #[ORM\Column]
  18.     private array $mittwoch = [];
  19.     #[ORM\Column]
  20.     private array $donnerstag = [];
  21.     #[ORM\Column]
  22.     private array $freitag = [];
  23.     #[ORM\Column]
  24.     private array $samstag = [];
  25.     #[ORM\Column]
  26.     private array $sonntag = [];
  27.     #[ORM\Column]
  28.     private ?bool $open247 null;
  29.     #[ORM\OneToOne(mappedBy'zeiten'targetEntityStudio::class)]
  30.     protected ?Studio $studio;
  31.     #[ORM\Column]
  32.     private ?DateTimeImmutable $createdAt null;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $info null;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function __construct()
  40.     {
  41.         $this->montag = [];
  42.         $this->dienstag = [];
  43.         $this->mittwoch = [];
  44.         $this->donnerstag = [];
  45.         $this->freitag = [];
  46.         $this->samstag = [];
  47.         $this->sonntag = [];
  48.         $this->open247 false;
  49.         $this->createdAt = new DateTimeImmutable();
  50.     }
  51.     public function getMontag(): array
  52.     {
  53.         return $this->montag;
  54.     }
  55.     public function setMontag(array $montag): self
  56.     {
  57.         $this->montag $montag;
  58.         return $this;
  59.     }
  60.     public function getDienstag(): array
  61.     {
  62.         return $this->dienstag;
  63.     }
  64.     public function setDienstag(array $dienstag): self
  65.     {
  66.         $this->dienstag $dienstag;
  67.         return $this;
  68.     }
  69.     public function getMittwoch(): array
  70.     {
  71.         return $this->mittwoch;
  72.     }
  73.     public function setMittwoch(array $mittwoch): self
  74.     {
  75.         $this->mittwoch $mittwoch;
  76.         return $this;
  77.     }
  78.     public function getDonnerstag(): array
  79.     {
  80.         return $this->donnerstag;
  81.     }
  82.     public function setDonnerstag(array $donnerstag): self
  83.     {
  84.         $this->donnerstag $donnerstag;
  85.         return $this;
  86.     }
  87.     public function getFreitag(): array
  88.     {
  89.         return $this->freitag;
  90.     }
  91.     public function setFreitag(array $freitag): self
  92.     {
  93.         $this->freitag $freitag;
  94.         return $this;
  95.     }
  96.     public function getSamstag(): array
  97.     {
  98.         return $this->samstag;
  99.     }
  100.     public function setSamstag(array $samstag): self
  101.     {
  102.         $this->samstag $samstag;
  103.         return $this;
  104.     }
  105.     public function getSonntag(): array
  106.     {
  107.         return $this->sonntag;
  108.     }
  109.     public function setSonntag(array $sonntag): self
  110.     {
  111.         $this->sonntag $sonntag;
  112.         return $this;
  113.     }
  114.     public function isOpen247(): ?bool
  115.     {
  116.         return $this->open247;
  117.     }
  118.     public function setOpen247(bool $open247): self
  119.     {
  120.         $this->open247 $open247;
  121.         return $this;
  122.     }
  123.     public function getCreatedAt(): ?DateTimeImmutable
  124.     {
  125.         return $this->createdAt;
  126.     }
  127.     public function setCreatedAt(DateTimeImmutable $createdAt): self
  128.     {
  129.         $this->createdAt $createdAt;
  130.         return $this;
  131.     }
  132.     public function getStudio(): ?Studio
  133.     {
  134.         return $this->studio;
  135.     }
  136.     public function setStudio(?Studio $studio): self
  137.     {
  138.         // unset the owning side of the relation if necessary
  139.         if ($studio === null && $this->studio !== null) {
  140.             $this->studio->setZeiten(null);
  141.         }
  142.         // set the owning side of the relation if necessary
  143.         if ($studio !== null && $studio->getZeiten() !== $this) {
  144.             $studio->setZeiten($this);
  145.         }
  146.         $this->studio $studio;
  147.         return $this;
  148.     }
  149.     public function getInfo(): ?string
  150.     {
  151.         return $this->info;
  152.     }
  153.     public function setInfo(?string $info): self
  154.     {
  155.         $this->info $info;
  156.         return $this;
  157.     }
  158. }