src/Entity/Aiguilles.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AiguillesRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAiguillesRepository::class)]
  8. class Aiguilles
  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\ManyToMany(targetEntityGestionmachines::class, mappedBy'aiguilles')]
  17.     private Collection $gestionmachines;
  18.     #[ORM\ManyToOne(inversedBy'aiguilles')]
  19.     private ?Fournisseur $fournisseur null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $quantty null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $prixachat null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $coefficient null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $prixvente null;
  28.     public function __construct()
  29.     {
  30.         $this->gestionmachines = new ArrayCollection();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getNom(): ?string
  37.     {
  38.         return $this->nom;
  39.     }
  40.     public function setNom(?string $nom): self
  41.     {
  42.         $this->nom $nom;
  43.         return $this;
  44.     }
  45.     /**
  46.      * @return Collection<int, Gestionmachines>
  47.      */
  48.     public function getGestionmachines(): Collection
  49.     {
  50.         return $this->gestionmachines;
  51.     }
  52.     public function addGestionmachine(Gestionmachines $gestionmachine): self
  53.     {
  54.         if (!$this->gestionmachines->contains($gestionmachine)) {
  55.             $this->gestionmachines->add($gestionmachine);
  56.             $gestionmachine->addAiguille($this);
  57.         }
  58.         return $this;
  59.     }
  60.     public function removeGestionmachine(Gestionmachines $gestionmachine): self
  61.     {
  62.         if ($this->gestionmachines->removeElement($gestionmachine)) {
  63.             $gestionmachine->removeAiguille($this);
  64.         }
  65.         return $this;
  66.     }
  67.     public function getFournisseur(): ?Fournisseur
  68.     {
  69.         return $this->fournisseur;
  70.     }
  71.     public function setFournisseur(?Fournisseur $fournisseur): self
  72.     {
  73.         $this->fournisseur $fournisseur;
  74.         return $this;
  75.     }
  76.     public function getQuantty(): ?string
  77.     {
  78.         return $this->quantty;
  79.     }
  80.     public function setQuantty(?string $quantty): self
  81.     {
  82.         $this->quantty $quantty;
  83.         return $this;
  84.     }
  85.     public function getPrixachat(): ?string
  86.     {
  87.         return $this->prixachat;
  88.     }
  89.     public function setPrixachat(?string $prixachat): self
  90.     {
  91.         $this->prixachat $prixachat;
  92.         return $this;
  93.     }
  94.     public function getCoefficient(): ?string
  95.     {
  96.         return $this->coefficient;
  97.     }
  98.     public function setCoefficient(?string $coefficient): self
  99.     {
  100.         $this->coefficient $coefficient;
  101.         return $this;
  102.     }
  103.     public function getPrixvente(): ?string
  104.     {
  105.         return $this->prixvente;
  106.     }
  107.     public function setPrixvente(?string $prixvente): self
  108.     {
  109.         $this->prixvente $prixvente;
  110.         return $this;
  111.     }
  112. }