<?php
namespace App\Entity;
use App\Repository\AiguillesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AiguillesRepository::class)]
class Aiguilles
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nom = null;
#[ORM\ManyToMany(targetEntity: Gestionmachines::class, mappedBy: 'aiguilles')]
private Collection $gestionmachines;
#[ORM\ManyToOne(inversedBy: 'aiguilles')]
private ?Fournisseur $fournisseur = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $quantty = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prixachat = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $coefficient = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prixvente = null;
public function __construct()
{
$this->gestionmachines = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
/**
* @return Collection<int, Gestionmachines>
*/
public function getGestionmachines(): Collection
{
return $this->gestionmachines;
}
public function addGestionmachine(Gestionmachines $gestionmachine): self
{
if (!$this->gestionmachines->contains($gestionmachine)) {
$this->gestionmachines->add($gestionmachine);
$gestionmachine->addAiguille($this);
}
return $this;
}
public function removeGestionmachine(Gestionmachines $gestionmachine): self
{
if ($this->gestionmachines->removeElement($gestionmachine)) {
$gestionmachine->removeAiguille($this);
}
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setFournisseur(?Fournisseur $fournisseur): self
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getQuantty(): ?string
{
return $this->quantty;
}
public function setQuantty(?string $quantty): self
{
$this->quantty = $quantty;
return $this;
}
public function getPrixachat(): ?string
{
return $this->prixachat;
}
public function setPrixachat(?string $prixachat): self
{
$this->prixachat = $prixachat;
return $this;
}
public function getCoefficient(): ?string
{
return $this->coefficient;
}
public function setCoefficient(?string $coefficient): self
{
$this->coefficient = $coefficient;
return $this;
}
public function getPrixvente(): ?string
{
return $this->prixvente;
}
public function setPrixvente(?string $prixvente): self
{
$this->prixvente = $prixvente;
return $this;
}
}