src/Entity/StudioKurse.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StudioKurseRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassStudioKurseRepository::class)]
  7. class StudioKurse
  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\OneToOne(mappedBy'studioKurse'targetEntityStudio::class)]
  28.     protected ?Studio $studio;
  29.     #[ORM\Column]
  30.     private ?DateTimeImmutable $createdAt null;
  31.     public function __construct()
  32.     {
  33.         $this->montag = [];
  34.         $this->dienstag = [];
  35.         $this->mittwoch = [];
  36.         $this->donnerstag = [];
  37.         $this->freitag = [];
  38.         $this->samstag = [];
  39.         $this->sonntag = [];
  40.         $this->createdAt = new DateTimeImmutable();
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getMontag(): array
  47.     {
  48.         return $this->montag;
  49.     }
  50.     public function setMontag(array $montag): self
  51.     {
  52.         $this->montag $montag;
  53.         return $this;
  54.     }
  55.     public function getDienstag(): array
  56.     {
  57.         return $this->dienstag;
  58.     }
  59.     public function setDienstag(array $dienstag): self
  60.     {
  61.         $this->dienstag $dienstag;
  62.         return $this;
  63.     }
  64.     public function getMittwoch(): array
  65.     {
  66.         return $this->mittwoch;
  67.     }
  68.     public function setMittwoch(array $mittwoch): self
  69.     {
  70.         $this->mittwoch $mittwoch;
  71.         return $this;
  72.     }
  73.     public function getDonnerstag(): array
  74.     {
  75.         return $this->donnerstag;
  76.     }
  77.     public function setDonnerstag(array $donnerstag): self
  78.     {
  79.         $this->donnerstag $donnerstag;
  80.         return $this;
  81.     }
  82.     public function getFreitag(): array
  83.     {
  84.         return $this->freitag;
  85.     }
  86.     public function setFreitag(array $freitag): self
  87.     {
  88.         $this->freitag $freitag;
  89.         return $this;
  90.     }
  91.     public function getSamstag(): array
  92.     {
  93.         return $this->samstag;
  94.     }
  95.     public function setSamstag(array $samstag): self
  96.     {
  97.         $this->samstag $samstag;
  98.         return $this;
  99.     }
  100.     public function getSonntag(): array
  101.     {
  102.         return $this->sonntag;
  103.     }
  104.     public function setSonntag(array $sonntag): self
  105.     {
  106.         $this->sonntag $sonntag;
  107.         return $this;
  108.     }
  109.     public function getCreatedAt(): ?DateTimeImmutable
  110.     {
  111.         return $this->createdAt;
  112.     }
  113.     public function setCreatedAt(DateTimeImmutable $createdAt): self
  114.     {
  115.         $this->createdAt $createdAt;
  116.         return $this;
  117.     }
  118.     public function getStudio(): ?Studio
  119.     {
  120.         return $this->studio;
  121.     }
  122.     public function setStudio(?Studio $studio): self
  123.     {
  124.         // unset the owning side of the relation if necessary
  125.         if ($studio === null && $this->studio !== null) {
  126.             $this->studio->setStudioKurse(null);
  127.         }
  128.         // set the owning side of the relation if necessary
  129.         if ($studio !== null && $studio->getStudioKurse() !== $this) {
  130.             $studio->setStudioKurse($this);
  131.         }
  132.         $this->studio $studio;
  133.         return $this;
  134.     }
  135. }