MissionCategory.php

This commit is contained in:
besbota 2024-10-17 17:17:21 +02:00 committed by ASTIER Yann
parent 3a8d60fddb
commit f71e0027eb

View File

@ -6,17 +6,16 @@ use App\Repository\MissionCategoryRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MissionCategoryRepository::class)]
#[ORM\UniqueConstraint(columns: ['mission', 'category'])]
class MissionCategory
{
#[ORM\Id]
#[ORM\ManyToOne(targetEntity: Mission::class, inversedBy: 'missionCategories')]
#[ORM\Column(type: 'integer')]
#[ORM\OneToMany(targetEntity: Mission::class, mappedBy: 'MissionCategory')]
#[ORM\JoinColumn(nullable: false)]
private ?Mission $mission = null;
#[ORM\Id]
#[ORM\ManyToOne(targetEntity: Category::class, inversedBy: 'missionCategories')]
#[ORM\Column(type: 'integer')]
#[ORM\OneToMany(targetEntity: Category::class, mappedBy: 'MissionCategory')]
#[ORM\JoinColumn(nullable: false)]
private ?Category $category = null;
public function getMission(): ?Mission