src/Entity/PlaceDeMarche.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\PlaceDeMarcheRepository")
  8.  */
  9. class PlaceDeMarche
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $nom;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $password;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $cout;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $utilisateur;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $identifiant;
  37.     /**
  38.      * @ORM\Column(type="datetime")
  39.      */
  40.     private $createdAt;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity="App\Entity\Lead", mappedBy="marche")
  43.      */
  44.     private $leads;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="placeDeMarches")
  47.      */
  48.     private $user
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity="App\Entity\Status", inversedBy="placeDeMarches")
  51.      */
  52.     private $status;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity="App\Entity\TraitementDsDemdDachat", mappedBy="place_de_marche")
  55.      */
  56.     private $traitementDsDemdDachats;
  57.     public function __construct()
  58.     {
  59.         $this->leads = new ArrayCollection();
  60.         $this->createdAt = new \DateTime('now');
  61.         $this->traitementDsDemdDachats = new ArrayCollection();
  62.     }
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getNom(): ?string
  68.     {
  69.         return $this->nom;
  70.     }
  71.     public function setNom(string $nom): self
  72.     {
  73.         $this->nom $nom;
  74.         return $this;
  75.     }
  76.     public function getCreatedAt(): ?\DateTimeInterface
  77.     {
  78.         return $this->createdAt;
  79.     }
  80.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  81.     {
  82.         $this->createdAt $createdAt;
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return Collection|Lead[]
  87.      */
  88.     public function getLeads(): Collection
  89.     {
  90.         return $this->leads;
  91.     }
  92.     public function addLead(Lead $lead): self
  93.     {
  94.         if (!$this->leads->contains($lead)) {
  95.             $this->leads[] = $lead;
  96.             $lead->setMarche($this);
  97.         }
  98.         return $this;
  99.     }
  100.     public function removeLead(Lead $lead): self
  101.     {
  102.         if ($this->leads->contains($lead)) {
  103.             $this->leads->removeElement($lead);
  104.             // set the owning side to null (unless already changed)
  105.             if ($lead->getMarche() === $this) {
  106.                 $lead->setMarche(null);
  107.             }
  108.         }
  109.         return $this;
  110.     }
  111.     /**
  112.      * @return mixed
  113.      */
  114.     public function getPassword()
  115.     {
  116.         return $this->password;
  117.     }
  118.     /**
  119.      * @param mixed $password
  120.      * @return PlaceDeMarche
  121.      */
  122.     public function setPassword($password)
  123.     {
  124.         $this->password $password;
  125.         return $this;
  126.     }
  127.     /**
  128.      * @return mixed
  129.      */
  130.     public function getCout()
  131.     {
  132.         return $this->cout;
  133.     }
  134.     /**
  135.      * @param mixed $cout
  136.      * @return PlaceDeMarche
  137.      */
  138.     public function setCout($cout)
  139.     {
  140.         $this->cout $cout;
  141.         return $this;
  142.     }
  143.     
  144.     /**
  145.      * @return mixed
  146.      */
  147.     public function getUtilisateur()
  148.     {
  149.         return $this->utilisateur;
  150.     }
  151.     /**
  152.      * @param mixed $utilisateur
  153.      * @return PlaceDeMarche
  154.      */
  155.     public function setUtilisateur($utilisateur)
  156.     {
  157.         $this->utilisateur $utilisateur;
  158.         return $this;
  159.     }
  160.     /**
  161.      * @return mixed
  162.      */
  163.     public function getIdentifiant()
  164.     {
  165.         return $this->identifiant;
  166.     }
  167.     /**
  168.      * @param mixed $identifiant
  169.      * @return PlaceDeMarche
  170.      */
  171.     public function setIdentifiant($identifiant)
  172.     {
  173.         $this->identifiant $identifiant;
  174.         return $this;
  175.     }
  176.     public function __toString(){
  177.         return $this->nom;
  178.     }
  179.     public function getUser(): ?User
  180.     {
  181.         return $this->user;
  182.     }
  183.     public function setUser(?User $user): self
  184.     {
  185.         $this->user $user;
  186.         return $this;
  187.     }
  188.     public function getStatus(): ?Status
  189.     {
  190.         return $this->status;
  191.     }
  192.     public function setStatus(?Status $status): self
  193.     {
  194.         $this->status $status;
  195.         return $this;
  196.     }
  197.     /**
  198.      * @return Collection|TraitementDsDemdDachat[]
  199.      */
  200.     public function getTraitementDsDemdDachats(): Collection
  201.     {
  202.         return $this->traitementDsDemdDachats;
  203.     }
  204.     public function addTraitementDsDemdDachat(TraitementDsDemdDachat $traitementDsDemdDachat): self
  205.     {
  206.         if (!$this->traitementDsDemdDachats->contains($traitementDsDemdDachat)) {
  207.             $this->traitementDsDemdDachats[] = $traitementDsDemdDachat;
  208.             $traitementDsDemdDachat->setPlaceDeMarche($this);
  209.         }
  210.         return $this;
  211.     }
  212.     public function removeTraitementDsDemdDachat(TraitementDsDemdDachat $traitementDsDemdDachat): self
  213.     {
  214.         if ($this->traitementDsDemdDachats->contains($traitementDsDemdDachat)) {
  215.             $this->traitementDsDemdDachats->removeElement($traitementDsDemdDachat);
  216.             // set the owning side to null (unless already changed)
  217.             if ($traitementDsDemdDachat->getPlaceDeMarche() === $this) {
  218.                 $traitementDsDemdDachat->setPlaceDeMarche(null);
  219.             }
  220.         }
  221.         return $this;
  222.     }
  223. }