<?phpnamespace App\Entity;use App\Repository\LitigeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: LitigeRepository::class)]#[ORM\Table(name: '`litiges`')]class Litige{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'litiges')] private ?Task $task = null; #[ORM\ManyToOne(inversedBy: 'litiges')] private ?Companys $sender = null; #[ORM\ManyToOne(inversedBy: 'litiges')] private ?Companys $consignee = null; #[ORM\Column(length: 255, nullable: true)] private ?string $possible_reservations = null; #[ORM\Column(length: 50, nullable: true)] private ?string $type = null; #[ORM\ManyToOne(inversedBy: 'litiges')] private ?Drivers $driver = null; #[ORM\OneToMany(mappedBy: 'litige', targetEntity: LitigeStatusHistory::class)] private Collection $litigeStatusHistories; #[ORM\ManyToOne(inversedBy: 'litiges')] private ?Carriers $carrier = null; #[ORM\OneToMany(mappedBy: 'litige', targetEntity: Upload::class)] private Collection $uploads; public function __construct() { $this->litigeStatusHistories = new ArrayCollection(); $this->uploads = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTask(): ?Task { return $this->task; } public function setTask(?Task $task): self { $this->task = $task; return $this; } public function getSender(): ?Companys { return $this->sender; } public function setSender(?Companys $sender): self { $this->sender = $sender; return $this; } public function getConsignee(): ?Companys { return $this->consignee; } public function setConsignee(?Companys $consignee): self { $this->consignee = $consignee; return $this; } public function getPossibleReservations(): ?string { return $this->possible_reservations; } public function setPossibleReservations(?string $possible_reservations): self { $this->possible_reservations = $possible_reservations; return $this; } public function getType(): ?string { return $this->type; } public function setType(?string $type): self { $this->type = $type; return $this; } public function getDriver(): ?Drivers { return $this->driver; } public function setDriver(?Drivers $driver): self { $this->driver = $driver; return $this; } /** * @return Collection<int, LitigeStatusHistory> */ public function getLitigeStatusHistories(): Collection { return $this->litigeStatusHistories; } public function addLitigeStatusHistory(LitigeStatusHistory $litigeStatusHistory): static { if (!$this->litigeStatusHistories->contains($litigeStatusHistory)) { $this->litigeStatusHistories->add($litigeStatusHistory); $litigeStatusHistory->setLitige($this); } return $this; } public function removeLitigeStatusHistory(LitigeStatusHistory $litigeStatusHistory): static { if ($this->litigeStatusHistories->removeElement($litigeStatusHistory)) { // set the owning side to null (unless already changed) if ($litigeStatusHistory->getLitige() === $this) { $litigeStatusHistory->setLitige(null); } } return $this; } public function getCarrier(): ?Carriers { return $this->carrier; } public function setCarrier(?Carriers $carrier): static { $this->carrier = $carrier; return $this; } /** * @return Collection<int, Upload> */ public function getUploads(): Collection { return $this->uploads; } public function addUpload(Upload $upload): static { if (!$this->uploads->contains($upload)) { $this->uploads->add($upload); $upload->setLitige($this); } return $this; } public function removeUpload(Upload $upload): static { if ($this->uploads->removeElement($upload)) { // set the owning side to null (unless already changed) if ($upload->getLitige() === $this) { $upload->setLitige(null); } } return $this; }}