85 lines
1.5 KiB
PHP
85 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\AwardRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: AwardRepository::class)]
|
|
class Award
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\ManyToOne(targetEntity: AwardType::class, inversedBy: 'awards')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private AwardType $awardType;
|
|
|
|
#[ORM\ManyToOne(targetEntity: Actor::class, inversedBy: 'awards')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private Actor $actor;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private string $name;
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
private ?int $year = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getAwardType(): AwardType
|
|
{
|
|
return $this->awardType;
|
|
}
|
|
|
|
public function setAwardType(AwardType $awardType): static
|
|
{
|
|
$this->awardType = $awardType;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getActor(): Actor
|
|
{
|
|
return $this->actor;
|
|
}
|
|
|
|
public function setActor(Actor $actor): static
|
|
{
|
|
$this->actor = $actor;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getName(): string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(string $name): static
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getYear(): ?int
|
|
{
|
|
return $this->year;
|
|
}
|
|
|
|
public function setYear(?int $year): static
|
|
{
|
|
$this->year = $year;
|
|
|
|
return $this;
|
|
}
|
|
}
|