src/Entity/Mouvement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MouvementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=MouvementRepository::class)
  9.  */
  10. class Mouvement
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="date", nullable=true)
  20.      */
  21.     private $date;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Agence::class, inversedBy="mouvements")
  24.      */
  25.     private $agenceDepart;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Agence::class, inversedBy="mouvementsArrivee")
  28.      */
  29.     private $agenceArrivee;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $emplacementDepart;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $emplacementArrivee;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $autreMotif;
  42.     /**
  43.      * @ORM\Column(type="text", nullable=true)
  44.      */
  45.     private $commentaire;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity=TypeEmplacement::class)
  48.      */
  49.     private $typeEmplacementDepart;
  50.     /**
  51.      * @ORM\ManyToOne(targetEntity=TypeEmplacement::class)
  52.      */
  53.     private $typeEmplacementArrivee;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity=LocalAgence::class, inversedBy="locauxDepartMouvement")
  56.      */
  57.     private $localDepart;
  58.     /**
  59.      * @ORM\ManyToOne(targetEntity=Network::class)
  60.      */
  61.     private $nanoReseauDepart;
  62.     /**
  63.      * @ORM\ManyToOne(targetEntity=Customer::class)
  64.      */
  65.     private $clientDepart;
  66.     /**
  67.      * @ORM\ManyToOne(targetEntity=Users::class)
  68.      */
  69.     private $userDepart;
  70.     /**
  71.      * @ORM\ManyToOne(targetEntity=LocalAgence::class, inversedBy="locauxArriveeMouvement")
  72.      */
  73.     private $localArrivee;
  74.     /**
  75.      * @ORM\ManyToOne(targetEntity=Network::class)
  76.      */
  77.     private $nanoReseauArrivee;
  78.     /**
  79.      * @ORM\ManyToOne(targetEntity=Customer::class)
  80.      */
  81.     private $clientArrivee;
  82.     /**
  83.      * @ORM\ManyToOne(targetEntity=Users::class)
  84.      */
  85.     private $userArrivee;
  86.     /**
  87.      * @ORM\ManyToOne(targetEntity=Users::class)
  88.      */
  89.     private $gestionnaire;
  90.     /**
  91.      * @ORM\Column(type="text", nullable=true)
  92.      */
  93.     private $codeSecret;
  94.     /**
  95.      * @ORM\ManyToOne(targetEntity=MotifMouvement::class, inversedBy="mouvements")
  96.      */
  97.     private $motifMouvement;
  98.     /**
  99.      * @ORM\Column(type="boolean", nullable=true)
  100.      */
  101.     private $valide;
  102.     /**
  103.      * @ORM\OneToMany(targetEntity=MaterielMouvement::class, mappedBy="mouvement", orphanRemoval=true, cascade={"persist"})
  104.      */
  105.     private $materielMouvements;
  106.     public function __construct()
  107.     {
  108.         $this->materielMouvements = new ArrayCollection();
  109.     }
  110.     public function getId(): ?int
  111.     {
  112.         return $this->id;
  113.     }
  114.     public function getDate(): ?\DateTimeInterface
  115.     {
  116.         return $this->date;
  117.     }
  118.     public function setDate(?\DateTimeInterface $date): self
  119.     {
  120.         $this->date $date;
  121.         return $this;
  122.     }
  123.     public function getAgenceDepart(): ?Agence
  124.     {
  125.         return $this->agenceDepart;
  126.     }
  127.     public function setAgenceDepart(?Agence $agenceDepart): self
  128.     {
  129.         $this->agenceDepart $agenceDepart;
  130.         return $this;
  131.     }
  132.     public function getAgenceArrivee(): ?Agence
  133.     {
  134.         return $this->agenceArrivee;
  135.     }
  136.     public function setAgenceArrivee(?Agence $agenceArrivee): self
  137.     {
  138.         $this->agenceArrivee $agenceArrivee;
  139.         return $this;
  140.     }
  141.     public function getEmplacementDepart(): ?string
  142.     {
  143.         return $this->emplacementDepart;
  144.     }
  145.     public function setEmplacementDepart(?string $emplacementDepart): self
  146.     {
  147.         $this->emplacementDepart $emplacementDepart;
  148.         return $this;
  149.     }
  150.     public function getEmplacementArrivee(): ?string
  151.     {
  152.         return $this->emplacementArrivee;
  153.     }
  154.     public function setEmplacementArrivee(?string $emplacementArrivee): self
  155.     {
  156.         $this->emplacementArrivee $emplacementArrivee;
  157.         return $this;
  158.     }
  159.     public function getCommentaire(): ?string
  160.     {
  161.         return $this->commentaire;
  162.     }
  163.     public function setCommentaire(?string $commentaire): self
  164.     {
  165.         $this->commentaire $commentaire;
  166.         return $this;
  167.     }
  168.     public function getAutreMotif(): ?string
  169.     {
  170.         return $this->autreMotif;
  171.     }
  172.     public function setAutreMotif(?string $autreMotif): self
  173.     {
  174.         $this->autreMotif $autreMotif;
  175.         return $this;
  176.     }
  177.     public function getTypeEmplacementDepart(): ?TypeEmplacement
  178.     {
  179.         return $this->typeEmplacementDepart;
  180.     }
  181.     public function setTypeEmplacementDepart(?TypeEmplacement $typeEmplacementDepart): self
  182.     {
  183.         $this->typeEmplacementDepart $typeEmplacementDepart;
  184.         return $this;
  185.     }
  186.     public function getTypeEmplacementArrivee(): ?TypeEmplacement
  187.     {
  188.         return $this->typeEmplacementArrivee;
  189.     }
  190.     public function setTypeEmplacementArrivee(?TypeEmplacement $typeEmplacementArrivee): self
  191.     {
  192.         $this->typeEmplacementArrivee $typeEmplacementArrivee;
  193.         return $this;
  194.     }
  195.     public function getLocalDepart(): ?LocalAgence
  196.     {
  197.         return $this->localDepart;
  198.     }
  199.     public function setLocalDepart(?LocalAgence $localDepart): self
  200.     {
  201.         $this->localDepart $localDepart;
  202.         return $this;
  203.     }
  204.     public function getNanoReseauDepart(): ?Network
  205.     {
  206.         return $this->nanoReseauDepart;
  207.     }
  208.     public function setNanoReseauDepart(?Network $nanoReseauDepart): self
  209.     {
  210.         $this->nanoReseauDepart $nanoReseauDepart;
  211.         return $this;
  212.     }
  213.     public function getClientDepart(): ?Customer
  214.     {
  215.         return $this->clientDepart;
  216.     }
  217.     public function setClientDepart(?Customer $clientDepart): self
  218.     {
  219.         $this->clientDepart $clientDepart;
  220.         return $this;
  221.     }
  222.     public function getUserDepart(): ?Users
  223.     {
  224.         return $this->userDepart;
  225.     }
  226.     public function setUserDepart(?Users $userDepart): self
  227.     {
  228.         $this->userDepart $userDepart;
  229.         return $this;
  230.     }
  231.     public function getLocalArrivee(): ?LocalAgence
  232.     {
  233.         return $this->localArrivee;
  234.     }
  235.     public function setLocalArrivee(?LocalAgence $localArrivee): self
  236.     {
  237.         $this->localArrivee $localArrivee;
  238.         return $this;
  239.     }
  240.     public function getNanoReseauArrivee(): ?Network
  241.     {
  242.         return $this->nanoReseauArrivee;
  243.     }
  244.     public function setNanoReseauArrivee(?Network $nanoReseauArrivee): self
  245.     {
  246.         $this->nanoReseauArrivee $nanoReseauArrivee;
  247.         return $this;
  248.     }
  249.     public function getClientArrivee(): ?Customer
  250.     {
  251.         return $this->clientArrivee;
  252.     }
  253.     public function setClientArrivee(?Customer $clientArrivee): self
  254.     {
  255.         $this->clientArrivee $clientArrivee;
  256.         return $this;
  257.     }
  258.     public function getUserArrivee(): ?Users
  259.     {
  260.         return $this->userArrivee;
  261.     }
  262.     public function setUserArrivee(?Users $userArrivee): self
  263.     {
  264.         $this->userArrivee $userArrivee;
  265.         return $this;
  266.     }
  267.     public function getGestionnaire(): ?Users
  268.     {
  269.         return $this->gestionnaire;
  270.     }
  271.     public function setGestionnaire(?Users $gestionnaire): self
  272.     {
  273.         $this->gestionnaire $gestionnaire;
  274.         return $this;
  275.     }
  276.     public function getCodeSecret(): ?string
  277.     {
  278.         return $this->codeSecret;
  279.     }
  280.     public function setCodeSecret(string $codeSecret): self
  281.     {
  282.         $this->codeSecret $codeSecret;
  283.         return $this;
  284.     }
  285.     public function getMotifMouvement(): ?MotifMouvement
  286.     {
  287.         return $this->motifMouvement;
  288.     }
  289.     public function setMotifMouvement(?MotifMouvement $motifMouvement): self
  290.     {
  291.         $this->motifMouvement $motifMouvement;
  292.         return $this;
  293.     }
  294.     public function getValide(): ?bool
  295.     {
  296.         return $this->valide;
  297.     }
  298.     public function setValide(?bool $valide): self
  299.     {
  300.         $this->valide $valide;
  301.         return $this;
  302.     }
  303.     /**
  304.      * @return Collection<int, MaterielMouvement>
  305.      */
  306.     public function getMaterielMouvements(): Collection
  307.     {
  308.         return $this->materielMouvements;
  309.     }
  310.     public function addMaterielMouvement(MaterielMouvement $materielMouvement): self
  311.     {
  312.         if (!$this->materielMouvements->contains($materielMouvement)) {
  313.             $this->materielMouvements[] = $materielMouvement;
  314.             $materielMouvement->setMouvement($this);
  315.         }
  316.         return $this;
  317.     }
  318.     public function removeMaterielMouvement(MaterielMouvement $materielMouvement): self
  319.     {
  320.         if ($this->materielMouvements->removeElement($materielMouvement)) {
  321.             // set the owning side to null (unless already changed)
  322.             if ($materielMouvement->getMouvement() === $this) {
  323.                 $materielMouvement->setMouvement(null);
  324.             }
  325.         }
  326.         return $this;
  327.     }
  328. }