src/Entity/Gestionmachines.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\GestionmachinesRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassGestionmachinesRepository::class)]
  8. class Gestionmachines
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255nullabletrue)]
  15.     private ?string $nom null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $numserie null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $nbchute null;
  20.     #[ORM\ManyToMany(targetEntityAiguilles::class, inversedBy'gestionmachines')]
  21.     private Collection $aiguilles;
  22.     #[ORM\ManyToMany(targetEntityCourroie::class, inversedBy'gestionmachines')]
  23.     private Collection $courroie;
  24.     #[ORM\ManyToMany(targetEntityPlatines::class, inversedBy'gestionmachines')]
  25.     private Collection $platines;
  26.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  27.     private ?Machine $machine null;
  28.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  29.     private ?ModeleMachine $modeleMachine null;
  30.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  31.     private ?JaugeMachine $jaugeMachine null;
  32.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  33.     private ?DiametreMachine $diametreMachine null;
  34.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  35.     private ?Nbchute $nbchutee null;
  36.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  37.     private ?MarqueMachine $marqueMachine null;
  38.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  39.     private ?Client $client null;
  40.     #[ORM\ManyToMany(targetEntityFamillesdarticles::class, inversedBy'gestionmachines')]
  41.     private Collection $famillesdarticles;
  42.     #[ORM\ManyToOne(inversedBy'gestionmachines')]
  43.     private ?Structure $structure null;
  44.     #[ORM\OneToMany(mappedBy'nummachine'targetEntityIntervention::class, cascade: ["remove"])]
  45.     private Collection $interventions;
  46.     #[ORM\OneToMany(mappedBy'nummachine'targetEntityHistoriqueintervention::class, cascade: ["remove"])]
  47.     private Collection $historiqueinterventions;
  48.     #[ORM\Column(length255nullabletrue)]
  49.     private ?string $num null;
  50.     #[ORM\OneToMany(mappedBy'machine'targetEntityMachineIntervention::class)]
  51.     private Collection $machineInterventions;
  52.     public function __construct()
  53.     {
  54.         $this->aiguilles = new ArrayCollection();
  55.         $this->courroie = new ArrayCollection();
  56.         $this->platines = new ArrayCollection();
  57.         $this->famillesdarticles = new ArrayCollection();
  58.         $this->interventions = new ArrayCollection();
  59.         $this->historiqueinterventions = new ArrayCollection();
  60.         $this->machineInterventions = new ArrayCollection();
  61.     }
  62.     public function getId(): ?int
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getNom(): ?string
  67.     {
  68.         return $this->nom;
  69.     }
  70.     public function setNom(?string $nom): self
  71.     {
  72.         $this->nom $nom;
  73.         return $this;
  74.     }
  75.     public function getNumserie(): ?string
  76.     {
  77.         return $this->numserie;
  78.     }
  79.     public function setNumserie(?string $numserie): self
  80.     {
  81.         $this->numserie $numserie;
  82.         return $this;
  83.     }
  84.     public function getNbchute(): ?string
  85.     {
  86.         return $this->nbchute;
  87.     }
  88.     public function setNbchute(?string $nbchute): self
  89.     {
  90.         $this->nbchute $nbchute;
  91.         return $this;
  92.     }
  93.     /**
  94.      * @return Collection<int, Aiguilles>
  95.      */
  96.     public function getAiguilles(): Collection
  97.     {
  98.         return $this->aiguilles;
  99.     }
  100.     public function addAiguille(Aiguilles $aiguille): self
  101.     {
  102.         if (!$this->aiguilles->contains($aiguille)) {
  103.             $this->aiguilles->add($aiguille);
  104.         }
  105.         return $this;
  106.     }
  107.     public function removeAiguille(Aiguilles $aiguille): self
  108.     {
  109.         $this->aiguilles->removeElement($aiguille);
  110.         return $this;
  111.     }
  112.     /**
  113.      * @return Collection<int, Courroie>
  114.      */
  115.     public function getCourroie(): Collection
  116.     {
  117.         return $this->courroie;
  118.     }
  119.     public function addCourroie(Courroie $courroie): self
  120.     {
  121.         if (!$this->courroie->contains($courroie)) {
  122.             $this->courroie->add($courroie);
  123.         }
  124.         return $this;
  125.     }
  126.     public function removeCourroie(Courroie $courroie): self
  127.     {
  128.         $this->courroie->removeElement($courroie);
  129.         return $this;
  130.     }
  131.     /**
  132.      * @return Collection<int, Platines>
  133.      */
  134.     public function getPlatines(): Collection
  135.     {
  136.         return $this->platines;
  137.     }
  138.     public function addPlatine(Platines $platine): self
  139.     {
  140.         if (!$this->platines->contains($platine)) {
  141.             $this->platines->add($platine);
  142.         }
  143.         return $this;
  144.     }
  145.     public function removePlatine(Platines $platine): self
  146.     {
  147.         $this->platines->removeElement($platine);
  148.         return $this;
  149.     }
  150.     public function getMachine(): ?Machine
  151.     {
  152.         return $this->machine;
  153.     }
  154.     public function setMachine(?Machine $machine): self
  155.     {
  156.         $this->machine $machine;
  157.         return $this;
  158.     }
  159.     public function getModeleMachine(): ?ModeleMachine
  160.     {
  161.         return $this->modeleMachine;
  162.     }
  163.     public function setModeleMachine(?ModeleMachine $modeleMachine): self
  164.     {
  165.         $this->modeleMachine $modeleMachine;
  166.         return $this;
  167.     }
  168.     public function getJaugeMachine(): ?JaugeMachine
  169.     {
  170.         return $this->jaugeMachine;
  171.     }
  172.     public function setJaugeMachine(?JaugeMachine $jaugeMachine): self
  173.     {
  174.         $this->jaugeMachine $jaugeMachine;
  175.         return $this;
  176.     }
  177.     public function getDiametreMachine(): ?DiametreMachine
  178.     {
  179.         return $this->diametreMachine;
  180.     }
  181.     public function setDiametreMachine(?DiametreMachine $diametreMachine): self
  182.     {
  183.         $this->diametreMachine $diametreMachine;
  184.         return $this;
  185.     }
  186.     public function getNbchutee(): ?Nbchute
  187.     {
  188.         return $this->nbchutee;
  189.     }
  190.     public function setNbchutee(?Nbchute $nbchutee): self
  191.     {
  192.         $this->nbchutee $nbchutee;
  193.         return $this;
  194.     }
  195.     public function getMarqueMachine(): ?MarqueMachine
  196.     {
  197.         return $this->marqueMachine;
  198.     }
  199.     public function setMarqueMachine(?MarqueMachine $marqueMachine): self
  200.     {
  201.         $this->marqueMachine $marqueMachine;
  202.         return $this;
  203.     }
  204.     public function getClient(): ?Client
  205.     {
  206.         return $this->client;
  207.     }
  208.     public function setClient(?Client $client): self
  209.     {
  210.         $this->client $client;
  211.         return $this;
  212.     }
  213.     /**
  214.      * @return Collection<int, Famillesdarticles>
  215.      */
  216.     public function getFamillesdarticles(): Collection
  217.     {
  218.         return $this->famillesdarticles;
  219.     }
  220.     public function addFamillesdarticle(Famillesdarticles $famillesdarticle): self
  221.     {
  222.         if (!$this->famillesdarticles->contains($famillesdarticle)) {
  223.             $this->famillesdarticles->add($famillesdarticle);
  224.         }
  225.         return $this;
  226.     }
  227.     public function removeFamillesdarticle(Famillesdarticles $famillesdarticle): self
  228.     {
  229.         $this->famillesdarticles->removeElement($famillesdarticle);
  230.         return $this;
  231.     }
  232.     /**
  233.      * @return Collection<int, Structure>
  234.      */
  235.     public function getStructure(): ?Structure
  236.     {
  237.         return $this->structure;
  238.     }
  239.     public function setStructure(?Structure $structure): self
  240.     {
  241.         $this->structure $structure;
  242.         return $this;
  243.     }
  244.     /**
  245.      * @return Collection<int, Intervention>
  246.      */
  247.     public function getInterventions(): Collection
  248.     {
  249.         return $this->interventions;
  250.     }
  251.     public function addIntervention(Intervention $intervention): static
  252.     {
  253.         if (!$this->interventions->contains($intervention)) {
  254.             $this->interventions->add($intervention);
  255.             $intervention->setNummachine($this);
  256.         }
  257.         return $this;
  258.     }
  259.     public function removeIntervention(Intervention $intervention): static
  260.     {
  261.         if ($this->interventions->removeElement($intervention)) {
  262.             // set the owning side to null (unless already changed)
  263.             if ($intervention->getNummachine() === $this) {
  264.                 $intervention->setNummachine(null);
  265.             }
  266.         }
  267.         return $this;
  268.     }
  269.     /**
  270.      * @return Collection<int, Historiqueintervention>
  271.      */
  272.     public function getHistoriqueinterventions(): Collection
  273.     {
  274.         return $this->historiqueinterventions;
  275.     }
  276.     public function addHistoriqueintervention(Historiqueintervention $historiqueintervention): static
  277.     {
  278.         if (!$this->historiqueinterventions->contains($historiqueintervention)) {
  279.             $this->historiqueinterventions->add($historiqueintervention);
  280.             $historiqueintervention->setNummachine($this);
  281.         }
  282.         return $this;
  283.     }
  284.     public function removeHistoriqueintervention(Historiqueintervention $historiqueintervention): static
  285.     {
  286.         if ($this->historiqueinterventions->removeElement($historiqueintervention)) {
  287.             // set the owning side to null (unless already changed)
  288.             if ($historiqueintervention->getNummachine() === $this) {
  289.                 $historiqueintervention->setNummachine(null);
  290.             }
  291.         }
  292.         return $this;
  293.     }
  294.     public function getNum(): ?string
  295.     {
  296.         return $this->num;
  297.     }
  298.     public function setNum(?string $num): self
  299.     {
  300.         $this->num $num;
  301.         return $this;
  302.     }
  303.     /**
  304.      * @return Collection<int, MachineIntervention>
  305.      */
  306.     public function getMachineInterventions(): Collection
  307.     {
  308.         return $this->machineInterventions;
  309.     }
  310.     public function addMachineIntervention(MachineIntervention $machineIntervention): self
  311.     {
  312.         if (!$this->machineInterventions->contains($machineIntervention)) {
  313.             $this->machineInterventions->add($machineIntervention);
  314.             $machineIntervention->setMachine($this);
  315.         }
  316.         return $this;
  317.     }
  318.     public function removeMachineIntervention(MachineIntervention $machineIntervention): self
  319.     {
  320.         if ($this->machineInterventions->removeElement($machineIntervention)) {
  321.             // set the owning side to null (unless already changed)
  322.             if ($machineIntervention->getMachine() === $this) {
  323.                 $machineIntervention->setMachine(null);
  324.             }
  325.         }
  326.         return $this;
  327.     }
  328. }