<?php
namespace App\Entity;
use App\Repository\MouvementRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=MouvementRepository::class)
*/
class Mouvement
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $date;
/**
* @ORM\ManyToOne(targetEntity=Agence::class, inversedBy="mouvements")
*/
private $agenceDepart;
/**
* @ORM\ManyToOne(targetEntity=Agence::class, inversedBy="mouvementsArrivee")
*/
private $agenceArrivee;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emplacementDepart;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emplacementArrivee;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $autreMotif;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $commentaire;
/**
* @ORM\ManyToOne(targetEntity=TypeEmplacement::class)
*/
private $typeEmplacementDepart;
/**
* @ORM\ManyToOne(targetEntity=TypeEmplacement::class)
*/
private $typeEmplacementArrivee;
/**
* @ORM\ManyToOne(targetEntity=LocalAgence::class, inversedBy="locauxDepartMouvement")
*/
private $localDepart;
/**
* @ORM\ManyToOne(targetEntity=Network::class)
*/
private $nanoReseauDepart;
/**
* @ORM\ManyToOne(targetEntity=Customer::class)
*/
private $clientDepart;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
*/
private $userDepart;
/**
* @ORM\ManyToOne(targetEntity=LocalAgence::class, inversedBy="locauxArriveeMouvement")
*/
private $localArrivee;
/**
* @ORM\ManyToOne(targetEntity=Network::class)
*/
private $nanoReseauArrivee;
/**
* @ORM\ManyToOne(targetEntity=Customer::class)
*/
private $clientArrivee;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
*/
private $userArrivee;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
*/
private $gestionnaire;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $codeSecret;
/**
* @ORM\ManyToOne(targetEntity=MotifMouvement::class, inversedBy="mouvements")
*/
private $motifMouvement;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $valide;
/**
* @ORM\OneToMany(targetEntity=MaterielMouvement::class, mappedBy="mouvement", orphanRemoval=true, cascade={"persist"})
*/
private $materielMouvements;
public function __construct()
{
$this->materielMouvements = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getAgenceDepart(): ?Agence
{
return $this->agenceDepart;
}
public function setAgenceDepart(?Agence $agenceDepart): self
{
$this->agenceDepart = $agenceDepart;
return $this;
}
public function getAgenceArrivee(): ?Agence
{
return $this->agenceArrivee;
}
public function setAgenceArrivee(?Agence $agenceArrivee): self
{
$this->agenceArrivee = $agenceArrivee;
return $this;
}
public function getEmplacementDepart(): ?string
{
return $this->emplacementDepart;
}
public function setEmplacementDepart(?string $emplacementDepart): self
{
$this->emplacementDepart = $emplacementDepart;
return $this;
}
public function getEmplacementArrivee(): ?string
{
return $this->emplacementArrivee;
}
public function setEmplacementArrivee(?string $emplacementArrivee): self
{
$this->emplacementArrivee = $emplacementArrivee;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getAutreMotif(): ?string
{
return $this->autreMotif;
}
public function setAutreMotif(?string $autreMotif): self
{
$this->autreMotif = $autreMotif;
return $this;
}
public function getTypeEmplacementDepart(): ?TypeEmplacement
{
return $this->typeEmplacementDepart;
}
public function setTypeEmplacementDepart(?TypeEmplacement $typeEmplacementDepart): self
{
$this->typeEmplacementDepart = $typeEmplacementDepart;
return $this;
}
public function getTypeEmplacementArrivee(): ?TypeEmplacement
{
return $this->typeEmplacementArrivee;
}
public function setTypeEmplacementArrivee(?TypeEmplacement $typeEmplacementArrivee): self
{
$this->typeEmplacementArrivee = $typeEmplacementArrivee;
return $this;
}
public function getLocalDepart(): ?LocalAgence
{
return $this->localDepart;
}
public function setLocalDepart(?LocalAgence $localDepart): self
{
$this->localDepart = $localDepart;
return $this;
}
public function getNanoReseauDepart(): ?Network
{
return $this->nanoReseauDepart;
}
public function setNanoReseauDepart(?Network $nanoReseauDepart): self
{
$this->nanoReseauDepart = $nanoReseauDepart;
return $this;
}
public function getClientDepart(): ?Customer
{
return $this->clientDepart;
}
public function setClientDepart(?Customer $clientDepart): self
{
$this->clientDepart = $clientDepart;
return $this;
}
public function getUserDepart(): ?Users
{
return $this->userDepart;
}
public function setUserDepart(?Users $userDepart): self
{
$this->userDepart = $userDepart;
return $this;
}
public function getLocalArrivee(): ?LocalAgence
{
return $this->localArrivee;
}
public function setLocalArrivee(?LocalAgence $localArrivee): self
{
$this->localArrivee = $localArrivee;
return $this;
}
public function getNanoReseauArrivee(): ?Network
{
return $this->nanoReseauArrivee;
}
public function setNanoReseauArrivee(?Network $nanoReseauArrivee): self
{
$this->nanoReseauArrivee = $nanoReseauArrivee;
return $this;
}
public function getClientArrivee(): ?Customer
{
return $this->clientArrivee;
}
public function setClientArrivee(?Customer $clientArrivee): self
{
$this->clientArrivee = $clientArrivee;
return $this;
}
public function getUserArrivee(): ?Users
{
return $this->userArrivee;
}
public function setUserArrivee(?Users $userArrivee): self
{
$this->userArrivee = $userArrivee;
return $this;
}
public function getGestionnaire(): ?Users
{
return $this->gestionnaire;
}
public function setGestionnaire(?Users $gestionnaire): self
{
$this->gestionnaire = $gestionnaire;
return $this;
}
public function getCodeSecret(): ?string
{
return $this->codeSecret;
}
public function setCodeSecret(string $codeSecret): self
{
$this->codeSecret = $codeSecret;
return $this;
}
public function getMotifMouvement(): ?MotifMouvement
{
return $this->motifMouvement;
}
public function setMotifMouvement(?MotifMouvement $motifMouvement): self
{
$this->motifMouvement = $motifMouvement;
return $this;
}
public function getValide(): ?bool
{
return $this->valide;
}
public function setValide(?bool $valide): self
{
$this->valide = $valide;
return $this;
}
/**
* @return Collection<int, MaterielMouvement>
*/
public function getMaterielMouvements(): Collection
{
return $this->materielMouvements;
}
public function addMaterielMouvement(MaterielMouvement $materielMouvement): self
{
if (!$this->materielMouvements->contains($materielMouvement)) {
$this->materielMouvements[] = $materielMouvement;
$materielMouvement->setMouvement($this);
}
return $this;
}
public function removeMaterielMouvement(MaterielMouvement $materielMouvement): self
{
if ($this->materielMouvements->removeElement($materielMouvement)) {
// set the owning side to null (unless already changed)
if ($materielMouvement->getMouvement() === $this) {
$materielMouvement->setMouvement(null);
}
}
return $this;
}
}