src/Entity/Incident.php line 14
<?phpnamespace App\Entity;use App\Repository\IncidentRepository;use App\Traits\TimeStampTrait;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: IncidentRepository::class)]#[ORM\HasLifecycleCallbacks]class Incident{use TimeStampTrait;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(type: 'integer')]private $id;#[ORM\Column(length: 100)]private ?string $code = null;#[ORM\ManyToOne(inversedBy: 'incidents')]private ?Location $location = null;#[ORM\Column(length: 25)]private ?string $process = null;#[ORM\Column]private ?bool $status = null;#[ORM\ManyToOne(inversedBy: 'incidents')]private ?Service $service = null;#[ORM\Column(type: 'text' ,nullable: true)]private ?string $description = null;#[ORM\ManyToOne(inversedBy: 'incidents')]private ?Entreprise $marchand = null;#[ORM\Column(length: 10, nullable: true)]private ?string $step = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]private ?string $depense = null;#[ORM\Column(length: 50, nullable: true)]private ?string $numeroticket = null;#[ORM\OneToMany(mappedBy: 'incident', targetEntity: IncidentUpdate::class)]private Collection $incidentUpdates;#[ORM\ManyToOne(inversedBy: 'incidents')]private ?User $createdBy = null;#[ORM\ManyToOne(inversedBy: 'incidents')]private ?Residence $residence = null;#[ORM\Column(length: 50, nullable: true)]private ?string $title = null;#[ORM\Column(length: 100, nullable: true)]private ?string $initiateBy = null;public function __construct(){$this->incidentUpdates = new ArrayCollection();}/*** Set id.** @param int $id** @return Habitat*/public function setId($id){$this->id = $id;return $this;}public function getId(){return $this->id;}public function getCode(): ?string{return $this->code;}public function setCode(string $code): static{$this->code = $code;return $this;}public function getLocation(): ?Location{return $this->location;}public function setLocation(?Location $location): static{$this->location = $location;return $this;}public function getProcess(): ?string{return $this->process;}public function setProcess(string $process): static{$this->process = $process;return $this;}public function isStatus(): ?bool{return $this->status;}public function setStatus(bool $status): static{$this->status = $status;return $this;}public function getService(): ?Service{return $this->service;}public function setService(?Service $service): static{$this->service = $service;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): static{$this->description = $description;return $this;}public function getMarchand(): ?Entreprise{return $this->marchand;}public function setMarchand(?Entreprise $marchand): static{$this->marchand = $marchand;return $this;}public function getStep(): ?string{return $this->step;}public function setStep(?string $step): static{$this->step = $step;return $this;}public function getDepense(): ?string{return $this->depense;}public function setDepense(?string $depense): static{$this->depense = $depense;return $this;}public function getNumeroticket(): ?string{return $this->numeroticket;}public function setNumeroticket(?string $numeroticket): static{$this->numeroticket = $numeroticket;return $this;}/*** @return Collection<int, IncidentUpdate>*/public function getIncidentUpdates(): Collection{return $this->incidentUpdates;}public function addIncidentUpdate(IncidentUpdate $incidentUpdate): static{if (!$this->incidentUpdates->contains($incidentUpdate)) {$this->incidentUpdates->add($incidentUpdate);$incidentUpdate->setIncident($this);}return $this;}public function removeIncidentUpdate(IncidentUpdate $incidentUpdate): static{if ($this->incidentUpdates->removeElement($incidentUpdate)) {// set the owning side to null (unless already changed)if ($incidentUpdate->getIncident() === $this) {$incidentUpdate->setIncident(null);}}return $this;}public function getCreatedBy(): ?User{return $this->createdBy;}public function setCreatedBy(?User $createdBy): static{$this->createdBy = $createdBy;return $this;}public function getResidence(): ?Residence{return $this->residence;}public function setResidence(?Residence $residence): static{$this->residence = $residence;return $this;}public function getTitle(): ?string{return $this->title;}public function setTitle(?string $title): static{$this->title = $title;return $this;}public function getInitiateBy(): ?string{return $this->initiateBy;}public function setInitiateBy(?string $initiateBy): static{$this->initiateBy = $initiateBy;return $this;}}