src/Entity/Actor.php line 12
<?phpnamespace App\Entity;use App\Repository\ActorRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;#[ORM\Entity(repositoryClass: ActorRepository::class)]class Actor{#[Groups(['main'])]#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[Groups(['main'])]#[ORM\Column(length: 255)]private string $name = '';#[Groups(['main'])]#[ORM\Column(length: 255)]private ?string $stagename = null;#[Groups(['main'])]#[ORM\Column(length: 32)]private string $gender = '';#[ORM\ManyToMany(targetEntity: Video::class, mappedBy: 'actors')]private Collection $videos;#[ORM\OneToMany(mappedBy: 'actor', targetEntity: ActorImage::class)]#[ORM\OrderBy(['position' => 'ASC'])]private Collection $images;#[Groups(['main'])]#[ORM\OneToOne(cascade: ['persist', 'remove'])]private ?ActorImage $front_image = null;public function __construct(){$this->videos = new ArrayCollection();$this->images = 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 getStagename(): ?string{return $this->stagename;}public function setStagename(string $stagename): self{$this->stagename = $stagename;return $this;}public function getGender(): ?string{return $this->gender;}public function setGender(string $gender): self{$this->gender = $gender;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->addActor($this);}return $this;}public function removeVideo(Video $video): self{if ($this->videos->removeElement($video)) {$video->removeActor($this);}return $this;}/*** @return Collection<int, ActorImage>*/public function getImages(): Collection{return $this->images;}public function addActorImage(ActorImage $image): self{if (!$this->images->contains($image)) {$this->images->add($image);$image->setActor($this);}return $this;}public function removeActorImage(ActorImage $image): self{if ($this->images->removeElement($image)) {// set the owning side to null (unless already changed)if ($image->getActor() === $this) {$image->setActor(null);}}return $this;}public function getFrontImage(): ?ActorImage{return $this->front_image;}public function setFrontImage(?ActorImage $front_image): self{$this->front_image = $front_image;return $this;}}