HegreLand/src/Entity/Requirement.php

44 lines
902 B
PHP

<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: RequirementRepository::class)]
#[ORM\UniqueConstraint(
columns: ['mission', 'skill']
)]
class Requirement
{
#[ORM\Id]
#[ORM\ManyToOne(targetEntity: Mission::class, inversedBy: 'requirements')]
#[ORM\Column(type: 'integer')]
private ?Mission $mission = null;
#[ORM\Id]
#[ORM\ManyToOne(targetEntity: Skill::class, inversedBy: 'requirements')]
#[ORM\Column(type: 'integer')]
private ?Skill $skill = null;
public function getMission(): ?Mission
{
return $this->mission;
}
public function setMission(?Mission $mission): void
{
$this->mission = $mission;
}
public function getSkill(): ?Skill
{
return $this->skill;
}
public function setSkill(?Skill $skill): void
{
$this->skill = $skill;
}
}