src/Entity/Fournisseur.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FournisseurRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassFournisseurRepository::class)]
  9. class Fournisseur
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $nom null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $prenom null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $adresse null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $telephone null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $numcomptebancaire null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $mf null;
  27.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  28.     private ?\DateTimeInterface $date null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $typefournisseur null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $email null;
  33.     #[ORM\OneToMany(targetEntityProduits::class, mappedBy'fournisseur'cascade: ["remove""persist"])]
  34.     private Collection $produits;
  35.     #[ORM\OneToMany(targetEntityFicheachat::class, mappedBy'fournisseur'cascade: ["remove""persist"])]
  36.     private Collection $ficheachats;
  37.     #[ORM\Column(nullabletrue)]
  38.     private ?bool $IsArchive null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $societe null;
  41.     #[ORM\OneToMany(targetEntityFicheachatcomptable::class, mappedBy'fournisseur')]
  42.     private Collection $ficheachatcomptables;
  43.     public function __construct()
  44.     {
  45.         $this->produits = new ArrayCollection();
  46.         $this->ficheachats = new ArrayCollection();
  47.         $this->ficheachatcomptables = new ArrayCollection();
  48.     }
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getNom(): ?string
  54.     {
  55.         return $this->nom;
  56.     }
  57.     public function setNom(?string $nom): static
  58.     {
  59.         $this->nom $nom;
  60.         return $this;
  61.     }
  62.     public function getPrenom(): ?string
  63.     {
  64.         return $this->prenom;
  65.     }
  66.     public function setPrenom(?string $prenom): static
  67.     {
  68.         $this->prenom $prenom;
  69.         return $this;
  70.     }
  71.     public function getAdresse(): ?string
  72.     {
  73.         return $this->adresse;
  74.     }
  75.     public function setAdresse(?string $adresse): static
  76.     {
  77.         $this->adresse $adresse;
  78.         return $this;
  79.     }
  80.     public function getTelephone(): ?string
  81.     {
  82.         return $this->telephone;
  83.     }
  84.     public function setTelephone(?string $telephone): static
  85.     {
  86.         $this->telephone $telephone;
  87.         return $this;
  88.     }
  89.     public function getNumcomptebancaire(): ?string
  90.     {
  91.         return $this->numcomptebancaire;
  92.     }
  93.     public function setNumcomptebancaire(?string $numcomptebancaire): static
  94.     {
  95.         $this->numcomptebancaire $numcomptebancaire;
  96.         return $this;
  97.     }
  98.     public function getMf(): ?string
  99.     {
  100.         return $this->mf;
  101.     }
  102.     public function setMf(?string $mf): static
  103.     {
  104.         $this->mf $mf;
  105.         return $this;
  106.     }
  107.     public function getDate(): ?\DateTimeInterface
  108.     {
  109.         return $this->date;
  110.     }
  111.     public function setDate(?\DateTimeInterface $date): static
  112.     {
  113.         $this->date $date;
  114.         return $this;
  115.     }
  116.     public function getTypefournisseur(): ?string
  117.     {
  118.         return $this->typefournisseur;
  119.     }
  120.     public function setTypefournisseur(?string $typefournisseur): static
  121.     {
  122.         $this->typefournisseur $typefournisseur;
  123.         return $this;
  124.     }
  125.     public function getEmail(): ?string
  126.     {
  127.         return $this->email;
  128.     }
  129.     public function setEmail(?string $email): static
  130.     {
  131.         $this->email $email;
  132.         return $this;
  133.     }
  134.     /**
  135.      * @return Collection<int, Produits>
  136.      */
  137.     public function getProduits(): Collection
  138.     {
  139.         return $this->produits;
  140.     }
  141.     public function addProduit(Produits $produit): static
  142.     {
  143.         if (!$this->produits->contains($produit)) {
  144.             $this->produits->add($produit);
  145.             $produit->setFournisseur($this);
  146.         }
  147.         return $this;
  148.     }
  149.     public function removeProduit(Produits $produit): static
  150.     {
  151.         if ($this->produits->removeElement($produit)) {
  152.             // set the owning side to null (unless already changed)
  153.             if ($produit->getFournisseur() === $this) {
  154.                 $produit->setFournisseur(null);
  155.             }
  156.         }
  157.         return $this;
  158.     }
  159.     /**
  160.      * @return Collection<int, Ficheachat>
  161.      */
  162.     public function getFicheachats(): Collection
  163.     {
  164.         return $this->ficheachats;
  165.     }
  166.     public function addFicheachat(Ficheachat $ficheachat): static
  167.     {
  168.         if (!$this->ficheachats->contains($ficheachat)) {
  169.             $this->ficheachats->add($ficheachat);
  170.             $ficheachat->setFournisseur($this);
  171.         }
  172.         return $this;
  173.     }
  174.     public function removeFicheachat(Ficheachat $ficheachat): static
  175.     {
  176.         if ($this->ficheachats->removeElement($ficheachat)) {
  177.             // set the owning side to null (unless already changed)
  178.             if ($ficheachat->getFournisseur() === $this) {
  179.                 $ficheachat->setFournisseur(null);
  180.             }
  181.         }
  182.         return $this;
  183.     }
  184.     public function isIsArchive(): ?bool
  185.     {
  186.         return $this->IsArchive;
  187.     }
  188.     public function setIsArchive(?bool $IsArchive): static
  189.     {
  190.         $this->IsArchive $IsArchive;
  191.         return $this;
  192.     }
  193.     public function getSociete(): ?string
  194.     {
  195.         return $this->societe;
  196.     }
  197.     public function setSociete(?string $societe): static
  198.     {
  199.         $this->societe $societe;
  200.         return $this;
  201.     }
  202.     /**
  203.      * @return Collection<int, Ficheachatcomptable>
  204.      */
  205.     public function getFicheachatcomptables(): Collection
  206.     {
  207.         return $this->ficheachatcomptables;
  208.     }
  209.     public function addFicheachatcomptable(Ficheachatcomptable $ficheachatcomptable): static
  210.     {
  211.         if (!$this->ficheachatcomptables->contains($ficheachatcomptable)) {
  212.             $this->ficheachatcomptables->add($ficheachatcomptable);
  213.             $ficheachatcomptable->setFournisseur($this);
  214.         }
  215.         return $this;
  216.     }
  217.     public function removeFicheachatcomptable(Ficheachatcomptable $ficheachatcomptable): static
  218.     {
  219.         if ($this->ficheachatcomptables->removeElement($ficheachatcomptable)) {
  220.             // set the owning side to null (unless already changed)
  221.             if ($ficheachatcomptable->getFournisseur() === $this) {
  222.                 $ficheachatcomptable->setFournisseur(null);
  223.             }
  224.         }
  225.         return $this;
  226.     }
  227. }