MissionCategory.php
This commit is contained in:
parent
e7a9a3fd5c
commit
17fd3ef23a
@ -5,17 +5,18 @@ namespace App\Entity;
|
||||
use App\Repository\MissionCategoryRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: MissionCategoryRepository::class)]
|
||||
#[ORM\Entity]
|
||||
#[ORM\UniqueConstraint(columns: ['mission', 'category'])]
|
||||
class MissionCategory
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Mission::class, mappedBy: 'MissionCategory')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
#[ORM\ManyToOne(targetEntity: Mission::class, inversedBy: 'missionCategories')]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private ?Mission $mission = null;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Category::class, mappedBy: 'MissionCategory')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
#[ORM\ManyToOne(targetEntity: Category::class, inversedBy: 'missionCategories')]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private ?Category $category = null;
|
||||
|
||||
public function getMission(): ?Mission
|
||||
|
Loading…
Reference in New Issue
Block a user