src/Entity/Studio.php line 13
<?phpnamespace App\Entity;use App\Repository\StudioRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;#[ORM\Entity(repositoryClass: StudioRepository::class)]class Studio{#[Groups(['main'])]#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[Groups(['main'])]#[ORM\Column(length: 255)]private ?string $name = null;#[Groups(['main'])]#[ORM\Column(type: Types::TEXT)]private ?string $description = null;#[ORM\OneToMany(mappedBy: 'studio', targetEntity: Video::class)]#[ORM\OrderBy(['title' => 'ASC'])]private Collection $videos;public function __construct(){$this->videos = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(string $description): self{$this->description = $description;return $this;}/*** @return Collection<int, Video>*/public function getVideos(): Collection{return $this->videos;}public function addVideo(Video $video): self{if (!$this->videos->contains($video)) {$this->videos->add($video);$video->setStudio($this);}return $this;}public function removeVideo(Video $video): self{if ($this->videos->removeElement($video)) {// set the owning side to null (unless already changed)if ($video->getStudio() === $this) {$video->setStudio(null);}}return $this;}}