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