HegreLand/src/Entity/IncidentType.php

62 lines
1.1 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\IncidentTypeRepository;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: IncidentTypeRepository::class)]
class IncidentType
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $label = null;
#[ORM\ManyToOne(targetEntity: Incident::class, inversedBy: 'incidentType')]
private Collection $incidents;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): static
{
$this->id = $id;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
public function getIncidents(): Collection
{
return $this->incidents;
}
public function setIncidents(Collection $incidents): void
{
$this->incidents = $incidents;
}
}