src/Entity/TypeDevice.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TypeDeviceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TypeDeviceRepository::class)
  9.  */
  10. class TypeDevice
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $libelle;
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $idFournisseur;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=Modele::class, mappedBy="typeDevice")
  28.      */
  29.     private $modeles;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $libelleFournisseur;
  34.     /**
  35.      * @ORM\Column(type="integer")
  36.      */
  37.     private $typeParametres;
  38.     /**
  39.      * @ORM\Column(type="string", length=16)
  40.      */
  41.     private $downlink "0000000000000000";
  42.     /**
  43.      * @ORM\Column(type="string", length=255)
  44.      */
  45.     private $licence;
  46.     /**
  47.      * @ORM\Column(type="integer")
  48.      */
  49.     private $cout;
  50.     /**
  51.      * @ORM\Column(type="string", length=255)
  52.      */
  53.     private $fonction;
  54.     /**
  55.      * @ORM\Column(type="integer")
  56.      */
  57.     private $garantie;
  58.     /**
  59.      * @ORM\Column(type="integer")
  60.      */
  61.     private $dureeVie;
  62.     /**
  63.      * @ORM\ManyToMany(targetEntity=Reseau::class, inversedBy="typeDevices")
  64.      */
  65.     private $reseaux;
  66.     /**
  67.      * @ORM\Column(type="string", length=255)
  68.      */
  69.     private $idTypeSigfox;
  70.     /**
  71.      * @ORM\Column(type="string", length=255)
  72.      */
  73.     private $productKey;
  74.     public function __construct()
  75.     {
  76.         $this->modeles = new ArrayCollection();
  77.         $this->reseaux = new ArrayCollection();
  78.     }
  79.     public function getId(): ?int
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getLibelle(): ?string
  84.     {
  85.         return $this->libelle;
  86.     }
  87.     public function setLibelle(string $libelle): self
  88.     {
  89.         $this->libelle $libelle;
  90.         return $this;
  91.     }
  92.     public function getIdFournisseur(): ?int
  93.     {
  94.         return $this->idFournisseur;
  95.     }
  96.     public function setIdFournisseur(int $idFournisseur): self
  97.     {
  98.         $this->idFournisseur $idFournisseur;
  99.         return $this;
  100.     }
  101.     /**
  102.      * @return Collection|Modele[]
  103.      */
  104.     public function getModeles(): Collection
  105.     {
  106.         return $this->modeles;
  107.     }
  108.     public function addModele(Modele $modele): self
  109.     {
  110.         if (!$this->modeles->contains($modele)) {
  111.             $this->modeles[] = $modele;
  112.             $modele->setTypeDevice($this);
  113.         }
  114.         return $this;
  115.     }
  116.     public function removeModele(Modele $modele): self
  117.     {
  118.         if ($this->modeles->contains($modele)) {
  119.             $this->modeles->removeElement($modele);
  120.             // set the owning side to null (unless already changed)
  121.             if ($modele->getTypeDevice() === $this) {
  122.                 $modele->setTypeDevice(null);
  123.             }
  124.         }
  125.         return $this;
  126.     }
  127.     public function getLibelleFournisseur(): ?string
  128.     {
  129.         return $this->libelleFournisseur;
  130.     }
  131.     public function setLibelleFournisseur(string $libelleFournisseur): self
  132.     {
  133.         $this->libelleFournisseur $libelleFournisseur;
  134.         return $this;
  135.     }
  136.     public function getTypeParametres(): ?int
  137.     {
  138.         return $this->typeParametres;
  139.     }
  140.     public function setTypeParametres(int $typeParametres): self
  141.     {
  142.         $this->typeParametres $typeParametres;
  143.         return $this;
  144.     }
  145.     public function getDownlink(): ?string
  146.     {
  147.         return $this->downlink;
  148.     }
  149.     public function setDownlink(string $downlink): self
  150.     {
  151.         $this->downlink $downlink;
  152.         return $this;
  153.     }
  154.     public function getCout(): ?int
  155.     {
  156.         return $this->cout;
  157.     }
  158.     public function setCout(int $cout): self
  159.     {
  160.         $this->cout $cout;
  161.         return $this;
  162.     }
  163.     public function getFonction(): ?string
  164.     {
  165.         return $this->fonction;
  166.     }
  167.     public function setFonction(string $fonction): self
  168.     {
  169.         $this->fonction $fonction;
  170.         return $this;
  171.     }
  172.     public function getGarantie(): ?int
  173.     {
  174.         return $this->garantie;
  175.     }
  176.     public function setGarantie(int $garantie): self
  177.     {
  178.         $this->garantie $garantie;
  179.         return $this;
  180.     }
  181.     public function getDureeVie(): ?int
  182.     {
  183.         return $this->dureeVie;
  184.     }
  185.     public function setDureeVie(int $dureeVie): self
  186.     {
  187.         $this->dureeVie $dureeVie;
  188.         return $this;
  189.     }
  190.     /**
  191.      * @return Collection|Reseau[]
  192.      */
  193.     public function getReseaux(): Collection
  194.     {
  195.         return $this->reseaux;
  196.     }
  197.     public function addReseaux(Reseau $reseaux): self
  198.     {
  199.         if (!$this->reseaux->contains($reseaux)) {
  200.             $this->reseaux[] = $reseaux;
  201.         }
  202.         return $this;
  203.     }
  204.     public function removeReseaux(Reseau $reseaux): self
  205.     {
  206.         if ($this->reseaux->contains($reseaux)) {
  207.             $this->reseaux->removeElement($reseaux);
  208.         }
  209.         return $this;
  210.     }
  211.     public function __toString()
  212.     {
  213.         return $this->id;
  214.     }
  215.     public function getIdTypeSigfox(): ?string
  216.     {
  217.         return $this->idTypeSigfox;
  218.     }
  219.     public function setIdTypeSigfox(string $idTypeSigfox): self
  220.     {
  221.         $this->idTypeSigfox $idTypeSigfox;
  222.         return $this;
  223.     }
  224.     public function getProductKey(): ?string
  225.     {
  226.         return $this->productKey;
  227.     }
  228.     public function setProductKey(string $productKey): self
  229.     {
  230.         $this->productKey $productKey;
  231.         return $this;
  232.     }
  233.     public function getLicence(): ?string
  234.     {
  235.         return $this->licence;
  236.     }
  237.     public function setLicence(string $licence): self
  238.     {
  239.         $this->licence $licence;
  240.         return $this;
  241.     }
  242. }