src/Entity/WorkroomArena.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WorkroomArenaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassWorkroomArenaRepository::class)]
  8. class WorkroomArena
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\OneToOne(targetEntityWorkroom::class, inversedBy'workroomArena'cascade: ['persist''remove'])]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private $workroom;
  17.     #[ORM\Column(type'string'length255uniquetrue)]
  18.     private $uuid;
  19.     #[ORM\Column(type'datetime_immutable')]
  20.     private $createdAt;
  21.     #[ORM\Column(type'datetime_immutable')]
  22.     private $updatedAt;
  23.     #[ORM\OneToMany(targetEntityWorkroomSectionArena::class, mappedBy'workroomArena'orphanRemovaltruecascade: ['remove'])]
  24.     private $workroomSectionArenas;
  25.     #[ORM\OneToMany(targetEntityUserWorkroomArena::class, mappedBy'workroomArena'orphanRemovaltruecascade: ['remove'])]
  26.     private $userWorkroomArenas;
  27.     #[ORM\OneToOne(targetEntityChatArena::class, mappedBy'workroomArena'cascade: ['persist''remove'])]
  28.     private $chatArena;
  29.     #[ORM\Column(name'state'type'smallint'options: ['default' => 1])]
  30.     private $state;
  31.     public function __construct()
  32.     {
  33.         $this->workroomSectionArenas = new ArrayCollection();
  34.         $this->userWorkroomArenas = new ArrayCollection();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getWorkroom(): ?Workroom
  41.     {
  42.         return $this->workroom;
  43.     }
  44.     public function setWorkroom(Workroom $workroom): self
  45.     {
  46.         $this->workroom $workroom;
  47.         return $this;
  48.     }
  49.     public function getUuid(): ?string
  50.     {
  51.         return $this->uuid;
  52.     }
  53.     public function setUuid(string $uuid): self
  54.     {
  55.         $this->uuid $uuid;
  56.         return $this;
  57.     }
  58.     public function getCreatedAt(): ?\DateTimeImmutable
  59.     {
  60.         return $this->createdAt;
  61.     }
  62.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  63.     {
  64.         $this->createdAt $createdAt;
  65.         return $this;
  66.     }
  67.     public function getUpdatedAt(): ?\DateTimeImmutable
  68.     {
  69.         return $this->updatedAt;
  70.     }
  71.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  72.     {
  73.         $this->updatedAt $updatedAt;
  74.         return $this;
  75.     }
  76.     /**
  77.      * @return Collection|WorkroomSectionArena[]
  78.      */
  79.     public function getWorkroomSectionArenas(): Collection
  80.     {
  81.         return $this->workroomSectionArenas;
  82.     }
  83.     public function addWorkroomSectionArena(WorkroomSectionArena $workroomSectionArena): self
  84.     {
  85.         if (!$this->workroomSectionArenas->contains($workroomSectionArena)) {
  86.             $this->workroomSectionArenas[] = $workroomSectionArena;
  87.             $workroomSectionArena->setWorkroomArena($this);
  88.         }
  89.         return $this;
  90.     }
  91.     public function removeWorkroomSectionArena(WorkroomSectionArena $workroomSectionArena): self
  92.     {
  93.         if ($this->workroomSectionArenas->removeElement($workroomSectionArena)) {
  94.             // set the owning side to null (unless already changed)
  95.             if ($workroomSectionArena->getWorkroomArena() === $this) {
  96.                 $workroomSectionArena->setWorkroomArena(null);
  97.             }
  98.         }
  99.         return $this;
  100.     }
  101.     /**
  102.      * @return Collection|UserWorkroomArena[]
  103.      */
  104.     public function getUserWorkroomArenas(): Collection
  105.     {
  106.         return $this->userWorkroomArenas;
  107.     }
  108.     public function addUserWorkroomArena(UserWorkroomArena $userWorkroomArena): self
  109.     {
  110.         if (!$this->userWorkroomArenas->contains($userWorkroomArena)) {
  111.             $this->userWorkroomArenas[] = $userWorkroomArena;
  112.             $userWorkroomArena->setWorkroomArena($this);
  113.         }
  114.         return $this;
  115.     }
  116.     public function removeUserWorkroomArena(UserWorkroomArena $userWorkroomArena): self
  117.     {
  118.         if ($this->userWorkroomArenas->removeElement($userWorkroomArena)) {
  119.             // set the owning side to null (unless already changed)
  120.             if ($userWorkroomArena->getWorkroomArena() === $this) {
  121.                 $userWorkroomArena->setWorkroomArena(null);
  122.             }
  123.         }
  124.         return $this;
  125.     }
  126.     public function getChatArena(): ?ChatArena
  127.     {
  128.         return $this->chatArena;
  129.     }
  130.     public function setChatArena(ChatArena $chatArena): self
  131.     {
  132.         // set the owning side of the relation if necessary
  133.         if ($chatArena->getWorkroomArena() !== $this) {
  134.             $chatArena->setWorkroomArena($this);
  135.         }
  136.         $this->chatArena $chatArena;
  137.         return $this;
  138.     }
  139.     public function getState(): ?int
  140.     {
  141.         return $this->state;
  142.     }
  143.     public function setState(int $state): self
  144.     {
  145.         $this->state $state;
  146.         return $this;
  147.     }
  148. }