src/Entity/Obliges.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ObligesRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ObligesRepository::class)
  9.  */
  10. class Obliges
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255,nullable=true)
  20.      */
  21.     private $societe;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $email;
  26.     /**
  27.      * @ORM\Column(type="string", length=255,nullable=true)
  28.      */
  29.     private $phone;
  30.     /**
  31.      * @ORM\Column(type="string", length=255,nullable=true)
  32.      */
  33.     private $photo;
  34.   
  35.    
  36.     /**
  37.      * @ORM\OneToMany(targetEntity=Deal::class, mappedBy="oblige")
  38.      */
  39.     private $deals;
  40.     /**
  41.      * @ORM\OneToMany(targetEntity=ChampsObliges::class, mappedBy="obliges")
  42.      */
  43.     private $champsobliges;
  44.     /**
  45.      * @ORM\OneToMany(targetEntity=ChampsObligesInstallateur::class, mappedBy="obliges")
  46.      */
  47.     private $champsobligeinstallateur;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $adresse;
  52.     /**
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      */
  55.     private $nom;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      */
  59.     private $siret;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, nullable=true)
  62.      */
  63.     private $prenom;
  64.     /**
  65.      * @ORM\OneToOne(targetEntity=User::class, inversedBy="obliges", cascade={"persist", "remove"})
  66.      */
  67.     private $user;
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $archive;
  72.     /**
  73.      * @ORM\OneToMany(targetEntity=Dealoblige::class, mappedBy="oblige")
  74.      */
  75.     private $dealobliges;
  76.  
  77.     ///siret ,nom prenom du dirigent 
  78.     public function __construct()
  79.     {
  80.  
  81.         $this->deals = new ArrayCollection();
  82.         $this->champsobliges = new ArrayCollection();
  83.         $this->champsobligeinstallateur = new ArrayCollection();
  84.         $this->dealobliges = new ArrayCollection();
  85.     }
  86.     public function getId(): ?int
  87.     {
  88.         return $this->id;
  89.     }
  90.     public function getSociete(): ?string
  91.     {
  92.         return $this->societe;
  93.     }
  94.     public function setSociete(string $societe): self
  95.     {
  96.         $this->societe $societe;
  97.         return $this;
  98.     }
  99.     public function getEmail(): ?string
  100.     {
  101.         return $this->email;
  102.     }
  103.     public function setEmail(string $email): self
  104.     {
  105.         $this->email $email;
  106.         return $this;
  107.     }
  108.     public function getPhone(): ?string
  109.     {
  110.         return $this->phone;
  111.     }
  112.     public function setPhone(string $phone): self
  113.     {
  114.         $this->phone $phone;
  115.         return $this;
  116.     }
  117.     public function getPhoto(): ?string
  118.     {
  119.         return $this->photo;
  120.     }
  121.     public function setPhoto(string $photo): self
  122.     {
  123.         $this->photo $photo;
  124.         return $this;
  125.     }
  126.    
  127.     /**
  128.      * @return Collection<int, Deal>
  129.      */
  130.     public function getDeals(): Collection
  131.     {
  132.         return $this->deals;
  133.     }
  134.     public function addDeal(Deal $deal): self
  135.     {
  136.         if (!$this->deals->contains($deal)) {
  137.             $this->deals[] = $deal;
  138.             $deal->setOblige($this);
  139.         }
  140.         return $this;
  141.     }
  142.     public function removeDeal(Deal $deal): self
  143.     {
  144.         if ($this->deals->removeElement($deal)) {
  145.             // set the owning side to null (unless already changed)
  146.             if ($deal->getOblige() === $this) {
  147.                 $deal->setOblige(null);
  148.             }
  149.         }
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return Collection<int, ChampsObliges>
  154.      */
  155.     public function getChampsobliges(): Collection
  156.     {
  157.         return $this->champsobliges;
  158.     }
  159.     public function addChampsoblige(ChampsObliges $champsoblige): self
  160.     {
  161.         if (!$this->champsobliges->contains($champsoblige)) {
  162.             $this->champsobliges[] = $champsoblige;
  163.             $champsoblige->setObliges($this);
  164.         }
  165.         return $this;
  166.     }
  167.     public function removeChampsoblige(ChampsObliges $champsoblige): self
  168.     {
  169.         if ($this->champsobliges->removeElement($champsoblige)) {
  170.             // set the owning side to null (unless already changed)
  171.             if ($champsoblige->getObliges() === $this) {
  172.                 $champsoblige->setObliges(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177.     /**
  178.      * @return Collection<int, ChampsObligesInstallateur>
  179.      */
  180.     public function getChampsobligeinstallateur(): Collection
  181.     {
  182.         return $this->champsobligeinstallateur;
  183.     }
  184.     public function addChampsobligeinstallateur(ChampsObligesInstallateur $champsobligeinstallateur): self
  185.     {
  186.         if (!$this->champsobligeinstallateur->contains($champsobligeinstallateur)) {
  187.             $this->champsobligeinstallateur[] = $champsobligeinstallateur;
  188.             $champsobligeinstallateur->setObliges($this);
  189.         }
  190.         return $this;
  191.     }
  192.     public function removeChampsobligeinstallateur(ChampsObligesInstallateur $champsobligeinstallateur): self
  193.     {
  194.         if ($this->champsobligeinstallateur->removeElement($champsobligeinstallateur)) {
  195.             // set the owning side to null (unless already changed)
  196.             if ($champsobligeinstallateur->getObliges() === $this) {
  197.                 $champsobligeinstallateur->setObliges(null);
  198.             }
  199.         }
  200.         return $this;
  201.     }
  202.     public function getAdresse(): ?string
  203.     {
  204.         return $this->adresse;
  205.     }
  206.     public function setAdresse(?string $adresse): self
  207.     {
  208.         $this->adresse $adresse;
  209.         return $this;
  210.     }
  211.     public function getNom(): ?string
  212.     {
  213.         return $this->nom;
  214.     }
  215.     public function setNom(string $nom): self
  216.     {
  217.         $this->nom $nom;
  218.         return $this;
  219.     }
  220.     public function getSiret(): ?string
  221.     {
  222.         return $this->siret;
  223.     }
  224.     public function setSiret(?string $siret): self
  225.     {
  226.         $this->siret $siret;
  227.         return $this;
  228.     }
  229.     public function getPrenom(): ?string
  230.     {
  231.         return $this->prenom;
  232.     }
  233.     public function setPrenom(?string $prenom): self
  234.     {
  235.         $this->prenom $prenom;
  236.         return $this;
  237.     }
  238.     public function getUser(): ?User
  239.     {
  240.         return $this->user;
  241.     }
  242.     public function setUser(?User $user): self
  243.     {
  244.         $this->user $user;
  245.         return $this;
  246.     }
  247.     public function getArchive(): ?string
  248.     {
  249.         return $this->archive;
  250.     }
  251.     public function setArchive(?string $archive): self
  252.     {
  253.         $this->archive $archive;
  254.         return $this;
  255.     }
  256.     /**
  257.      * @return Collection<int, Dealoblige>
  258.      */
  259.     public function getDealobliges(): Collection
  260.     {
  261.         return $this->dealobliges;
  262.     }
  263.     public function addDealoblige(Dealoblige $dealoblige): self
  264.     {
  265.         if (!$this->dealobliges->contains($dealoblige)) {
  266.             $this->dealobliges[] = $dealoblige;
  267.             $dealoblige->setOblige($this);
  268.         }
  269.         return $this;
  270.     }
  271.     public function removeDealoblige(Dealoblige $dealoblige): self
  272.     {
  273.         if ($this->dealobliges->removeElement($dealoblige)) {
  274.             // set the owning side to null (unless already changed)
  275.             if ($dealoblige->getOblige() === $this) {
  276.                 $dealoblige->setOblige(null);
  277.             }
  278.         }
  279.         return $this;
  280.     }
  281. }