src/Entity/Comerciaux.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ComerciauxRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity
  9.  */
  10. #[ORM\Entity(repositoryClassComerciauxRepository::class)]
  11. class Comerciaux extends User
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column(type'integer')]
  16.     private $id;
  17.     #[ORM\Column(type'string'length50)]
  18.     private $nom_C;
  19.     #[ORM\Column(type'string'length50)]
  20.     private $prenom_C;
  21.     #[ORM\Column(type'string'length50)]
  22.     private $fonction_C;
  23.     #[ORM\Column(type'blob'nullabletrue)]
  24.     private $photo;
  25.     #[ORM\OneToMany(mappedBy'commercial'targetEntityEvaluationCOM::class)]
  26.     private $evaluationCOMs;
  27.     #[ORM\OneToMany(mappedBy'comercial'targetEntityAvisComerciaux::class)]
  28.     private $avisComerciauxes;
  29.     #[ORM\ManyToOne(targetEntityEntreprises::class, inversedBy'comerciauxes')]
  30.     private $entreprise;
  31.     public function __construct()
  32.     {
  33.         $this->evaluationCOMs = new ArrayCollection();
  34.         $this->avisComerciauxes = new ArrayCollection();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getNomC(): ?string
  41.     {
  42.         return $this->nom_C;
  43.     }
  44.     public function setNomC(string $nom_C): self
  45.     {
  46.         $this->nom_C $nom_C;
  47.         return $this;
  48.     }
  49.     public function getPrenomC(): ?string
  50.     {
  51.         return $this->prenom_C;
  52.     }
  53.     public function setPrenomC(string $prenom_C): self
  54.     {
  55.         $this->prenom_C $prenom_C;
  56.         return $this;
  57.     }
  58.     public function getFonctionC(): ?string
  59.     {
  60.         return $this->fonction_C;
  61.     }
  62.     public function setFonctionC(string $fonction): self
  63.     {
  64.         $this->fonction_C $fonction;
  65.         return $this;
  66.     }
  67.     public function getPhoto()
  68.     {
  69.         return $this->photo;
  70.     }
  71.     public function setPhoto($photo): self
  72.     {
  73.         $this->photo $photo;
  74.         return $this;
  75.     }
  76.     /**
  77.      * @return Collection<int, EvaluationCOM>
  78.      */
  79.     public function getEvaluationCOMs(): Collection
  80.     {
  81.         return $this->evaluationCOMs;
  82.     }
  83.     public function addEvaluationCOM(EvaluationCOM $evaluationCOM): self
  84.     {
  85.         if (!$this->evaluationCOMs->contains($evaluationCOM)) {
  86.             $this->evaluationCOMs[] = $evaluationCOM;
  87.             $evaluationCOM->setCommercial($this);
  88.         }
  89.         return $this;
  90.     }
  91.     public function removeEvaluationCOM(EvaluationCOM $evaluationCOM): self
  92.     {
  93.         if ($this->evaluationCOMs->removeElement($evaluationCOM)) {
  94.             // set the owning side to null (unless already changed)
  95.             if ($evaluationCOM->getCommercial() === $this) {
  96.                 $evaluationCOM->setCommercial(null);
  97.             }
  98.         }
  99.         return $this;
  100.     }
  101.     /**
  102.      * @return Collection<int, AvisComerciaux>
  103.      */
  104.     public function getAvisComerciauxes(): Collection
  105.     {
  106.         return $this->avisComerciauxes;
  107.     }
  108.     public function addAvisComerciaux(AvisComerciaux $avisComerciaux): self
  109.     {
  110.         if (!$this->avisComerciauxes->contains($avisComerciaux)) {
  111.             $this->avisComerciauxes[] = $avisComerciaux;
  112.             $avisComerciaux->setComercial($this);
  113.         }
  114.         return $this;
  115.     }
  116.     public function removeAvisComerciaux(AvisComerciaux $avisComerciaux): self
  117.     {
  118.         if ($this->avisComerciauxes->removeElement($avisComerciaux)) {
  119.             // set the owning side to null (unless already changed)
  120.             if ($avisComerciaux->getComercial() === $this) {
  121.                 $avisComerciaux->setComercial(null);
  122.             }
  123.         }
  124.         return $this;
  125.     }
  126.     public function getEntreprise(): ?Entreprises
  127.     {
  128.         return $this->entreprise;
  129.     }
  130.     public function setEntreprise(?Entreprises $entreprise): self
  131.     {
  132.         $this->entreprise $entreprise;
  133.         return $this;
  134.     }
  135. }