src/Entity/FranchiseNehmer.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FranchiseNehmerRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassFranchiseNehmerRepository::class)]
  9. class FranchiseNehmer
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length128nullabletrue)]
  16.     private ?string $email null;
  17.     #[ORM\OneToOne(inversedBy"franchise"targetEntityUser::class, cascade: ["persist""remove"])]
  18.     #[ORM\JoinColumn(name"user"nullabletrue)]
  19.     protected ?User $user;
  20.     #[ORM\OneToMany(mappedBy'franchiseNehmer'targetEntityStudio::class, cascade: ["persist"], orphanRemovaltrue)]
  21.    // #[ORM\JoinColumn(name: 'id',referencedColumnName: 'franchise_nehmer_id ', nullable: true)]
  22.     public Collection $studio;
  23.     #[ORM\Column]
  24.     private ?DateTimeImmutable $createdAt null;
  25.     #[ORM\Column]
  26.     private ?bool $addMitarbeiter null;
  27.     #[ORM\Column(length11)]
  28.     private ?string $type null;
  29.     #[ORM\Column(options: ['default' => 1])]
  30.     private ?int $isStudio null;
  31.     #[ORM\Column(options: ['default' => 1])]
  32.     private ?int $news null;
  33.     #[ORM\Column(options: ['default' => 1])]
  34.     private ?int $kurse null;
  35.     #[ORM\Column(options: ['default' => 1])]
  36.     private ?int $zeiten null;
  37.     #[ORM\Column(options: ['default' => 1])]
  38.     private ?int $dokumente null;
  39.     #[ORM\Column(options: ['default' => 1])]
  40.     private ?int $medien null;
  41.     #[ORM\Column(options: ['default' => 1])]
  42.     private ?int $content null;
  43.     #[ORM\Column(options: ['default' => 1])]
  44.     private ?int $leistungen null;
  45.     #[ORM\Column(options: ['default' => 1])]
  46.     private ?int $geoDaten null;
  47.     public function __construct()
  48.     {
  49.         $this->createdAt = new DateTimeImmutable();
  50.         $this->isStudio true;
  51.         $this->news 1;
  52.         $this->kurse 1;
  53.         $this->zeiten 1;
  54.         $this->dokumente 1;
  55.         $this->medien 1;
  56.         $this->content 1;
  57.         $this->leistungen 1;
  58.         $this->geoDaten 1;
  59.         $this->studio = new ArrayCollection();
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getEmail(): ?string
  66.     {
  67.         return $this->email;
  68.     }
  69.     public function setEmail(string $email): self
  70.     {
  71.         $this->email $email;
  72.         return $this;
  73.     }
  74.     public function getCreatedAt(): ?DateTimeImmutable
  75.     {
  76.         return $this->createdAt;
  77.     }
  78.     public function setCreatedAt(DateTimeImmutable $createdAt): self
  79.     {
  80.         $this->createdAt $createdAt;
  81.         return $this;
  82.     }
  83.     public function getUser(): ?User
  84.     {
  85.         return $this->user;
  86.     }
  87.     public function setUser(?User $user): self
  88.     {
  89.         $this->user $user;
  90.         return $this;
  91.     }
  92.     public function isAddMitarbeiter(): ?bool
  93.     {
  94.         return $this->addMitarbeiter;
  95.     }
  96.     public function setAddMitarbeiter(bool $addMitarbeiter): self
  97.     {
  98.         $this->addMitarbeiter $addMitarbeiter;
  99.         return $this;
  100.     }
  101.     public function getType(): ?string
  102.     {
  103.         return $this->type;
  104.     }
  105.     public function setType(string $type): self
  106.     {
  107.         $this->type $type;
  108.         return $this;
  109.     }
  110.     public function isNews(): ?bool
  111.     {
  112.         return $this->news;
  113.     }
  114.     public function setNews(bool $news): self
  115.     {
  116.         $this->news $news;
  117.         return $this;
  118.     }
  119.     public function isKurse(): ?bool
  120.     {
  121.         return $this->kurse;
  122.     }
  123.     public function setKurse(bool $kurse): self
  124.     {
  125.         $this->kurse $kurse;
  126.         return $this;
  127.     }
  128.     public function isZeiten(): ?bool
  129.     {
  130.         return $this->zeiten;
  131.     }
  132.     public function setZeiten(bool $zeiten): self
  133.     {
  134.         $this->zeiten $zeiten;
  135.         return $this;
  136.     }
  137.     public function isDokumente(): ?bool
  138.     {
  139.         return $this->dokumente;
  140.     }
  141.     public function setDokumente(int $dokumente): self
  142.     {
  143.         $this->dokumente $dokumente;
  144.         return $this;
  145.     }
  146.     public function isMedien(): ?bool
  147.     {
  148.         return $this->medien;
  149.     }
  150.     public function setMedien(int $medien): self
  151.     {
  152.         $this->medien $medien;
  153.         return $this;
  154.     }
  155.     public function getIsStudio(): ?bool
  156.     {
  157.         return $this->isStudio;
  158.     }
  159.     public function getNews(): ?int
  160.     {
  161.         return $this->news;
  162.     }
  163.     public function getKurse(): ?int
  164.     {
  165.         return $this->kurse;
  166.     }
  167.     public function getZeiten(): ?int
  168.     {
  169.         return $this->zeiten;
  170.     }
  171.     public function getDokumente(): ?int
  172.     {
  173.         return $this->dokumente;
  174.     }
  175.     public function getMedien(): ?int
  176.     {
  177.         return $this->medien;
  178.     }
  179.     public function setIsStudio(int $isStudio): self
  180.     {
  181.         $this->isStudio $isStudio;
  182.         return $this;
  183.     }
  184.     /**
  185.      * @return Collection<int, Studio>
  186.      */
  187.     public function getStudio(): Collection
  188.     {
  189.         return $this->studio;
  190.     }
  191.     public function addStudio(Studio $studio): self
  192.     {
  193.         if (!$this->studio->contains($studio)) {
  194.             $this->studio->add($studio);
  195.             $studio->setFranchiseNehmer($this);
  196.         }
  197.         return $this;
  198.     }
  199.     public function removeStudio(Studio $studio): self
  200.     {
  201.         if ($this->studio->removeElement($studio)) {
  202.             // set the owning side to null (unless already changed)
  203.             if ($studio->getFranchiseNehmer() === $this) {
  204.                 $studio->setFranchiseNehmer(null);
  205.             }
  206.         }
  207.         return $this;
  208.     }
  209.     public function getContent(): ?int
  210.     {
  211.         return $this->content;
  212.     }
  213.     public function setContent(?int $content): self
  214.     {
  215.         $this->content $content;
  216.         return $this;
  217.     }
  218.     public function getLeistungen(): ?int
  219.     {
  220.         return $this->leistungen;
  221.     }
  222.     public function setLeistungen(int $leistungen): self
  223.     {
  224.         $this->leistungen $leistungen;
  225.         return $this;
  226.     }
  227.     public function getGeoDaten(): ?int
  228.     {
  229.         return $this->geoDaten;
  230.     }
  231.     public function setGeoDaten(int $geoDaten): self
  232.     {
  233.         $this->geoDaten $geoDaten;
  234.         return $this;
  235.     }
  236. }