66 lines
1.2 KiB
PHP
66 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\MovieRoleRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: MovieRoleRepository::class)]
|
|
class MovieRole
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $character = null;
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'movieRoles')]
|
|
private ?Actor $actor = null;
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'actors')]
|
|
private ?Movie $movie = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getCharacter(): ?string
|
|
{
|
|
return $this->character;
|
|
}
|
|
|
|
public function setCharacter(string $character): static
|
|
{
|
|
$this->character = $character;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getActor(): ?Actor
|
|
{
|
|
return $this->actor;
|
|
}
|
|
|
|
public function setActor(?Actor $actor): static
|
|
{
|
|
$this->actor = $actor;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMovie(): ?Movie
|
|
{
|
|
return $this->movie;
|
|
}
|
|
|
|
public function setMovie(?Movie $movie): static
|
|
{
|
|
$this->movie = $movie;
|
|
|
|
return $this;
|
|
}
|
|
}
|