src/Entity/SocSociete.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SocSocieteRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassSocSocieteRepository::class)]
  8. class SocSociete
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length500nullabletrue)]
  15.     private ?string $nom null;
  16.     #[ORM\Column(length500nullabletrue)]
  17.     private ?string $activite null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $email null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $telephone null;
  22.     #[ORM\Column(length500nullabletrue)]
  23.     private ?string $adresse null;
  24.     #[ORM\Column(nullabletrue)]
  25.     private ?float $tauxHoraire null;
  26.     #[ORM\Column(nullabletrue)]
  27.     private ?bool $statut null;
  28.     #[ORM\Column]
  29.     private ?\DateTimeImmutable $createdAt null;
  30.     #[ORM\Column]
  31.     private ?\DateTimeImmutable $updatedAt null;
  32.     #[ORM\OneToMany(targetEntityDevisClient::class, mappedBy'societe')]
  33.     private Collection $devisClients;
  34.     #[ORM\OneToMany(targetEntityDevisSection::class, mappedBy'societe')]
  35.     private Collection $devisSections;
  36.     #[ORM\OneToMany(targetEntityDevisSousSection::class, mappedBy'societe')]
  37.     private Collection $devisSousSections;
  38.     #[ORM\OneToMany(targetEntityDevisActivite::class, mappedBy'societe')]
  39.     private Collection $devisActivites;
  40.     #[ORM\OneToMany(targetEntityDevis::class, mappedBy'societe')]
  41.     private Collection $devis;
  42.     public function __construct()
  43.     {
  44.         $this->devisClients = new ArrayCollection();
  45.         $this->devisSections = new ArrayCollection();
  46.         $this->devisSousSections = new ArrayCollection();
  47.         $this->devisActivites = new ArrayCollection();
  48.         $this->devis = new ArrayCollection();
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getNom(): ?string
  55.     {
  56.         return $this->nom;
  57.     }
  58.     public function setNom(?string $nom): static
  59.     {
  60.         $this->nom $nom;
  61.         return $this;
  62.     }
  63.     public function getActivite(): ?string
  64.     {
  65.         return $this->activite;
  66.     }
  67.     public function setActivite(?string $activite): static
  68.     {
  69.         $this->activite $activite;
  70.         return $this;
  71.     }
  72.     public function getEmail(): ?string
  73.     {
  74.         return $this->email;
  75.     }
  76.     public function setEmail(?string $email): static
  77.     {
  78.         $this->email $email;
  79.         return $this;
  80.     }
  81.     public function getTelephone(): ?string
  82.     {
  83.         return $this->telephone;
  84.     }
  85.     public function setTelephone(?string $telephone): static
  86.     {
  87.         $this->telephone $telephone;
  88.         return $this;
  89.     }
  90.     public function getAdresse(): ?string
  91.     {
  92.         return $this->adresse;
  93.     }
  94.     public function setAdresse(?string $adresse): static
  95.     {
  96.         $this->adresse $adresse;
  97.         return $this;
  98.     }
  99.     public function getTauxHoraire(): ?float
  100.     {
  101.         return $this->tauxHoraire;
  102.     }
  103.     public function setTauxHoraire(?float $tauxHoraire): static
  104.     {
  105.         $this->tauxHoraire $tauxHoraire;
  106.         return $this;
  107.     }
  108.     public function isStatut(): ?bool
  109.     {
  110.         return $this->statut;
  111.     }
  112.     public function setStatut(?bool $statut): static
  113.     {
  114.         $this->statut $statut;
  115.         return $this;
  116.     }
  117.     public function getCreatedAt(): ?\DateTimeImmutable
  118.     {
  119.         return $this->createdAt;
  120.     }
  121.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  122.     {
  123.         $this->createdAt $createdAt;
  124.         return $this;
  125.     }
  126.     public function getUpdatedAt(): ?\DateTimeImmutable
  127.     {
  128.         return $this->updatedAt;
  129.     }
  130.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): static
  131.     {
  132.         $this->updatedAt $updatedAt;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @return Collection<int, DevisClient>
  137.      */
  138.     public function getDevisClients(): Collection
  139.     {
  140.         return $this->devisClients;
  141.     }
  142.     public function addDevisClient(DevisClient $devisClient): static
  143.     {
  144.         if (!$this->devisClients->contains($devisClient)) {
  145.             $this->devisClients->add($devisClient);
  146.             $devisClient->setSociete($this);
  147.         }
  148.         return $this;
  149.     }
  150.     public function removeDevisClient(DevisClient $devisClient): static
  151.     {
  152.         if ($this->devisClients->removeElement($devisClient)) {
  153.             // set the owning side to null (unless already changed)
  154.             if ($devisClient->getSociete() === $this) {
  155.                 $devisClient->setSociete(null);
  156.             }
  157.         }
  158.         return $this;
  159.     }
  160.     /**
  161.      * @return Collection<int, DevisSection>
  162.      */
  163.     public function getDevisSections(): Collection
  164.     {
  165.         return $this->devisSections;
  166.     }
  167.     public function addDevisSection(DevisSection $devisSection): static
  168.     {
  169.         if (!$this->devisSections->contains($devisSection)) {
  170.             $this->devisSections->add($devisSection);
  171.             $devisSection->setSociete($this);
  172.         }
  173.         return $this;
  174.     }
  175.     public function removeDevisSection(DevisSection $devisSection): static
  176.     {
  177.         if ($this->devisSections->removeElement($devisSection)) {
  178.             // set the owning side to null (unless already changed)
  179.             if ($devisSection->getSociete() === $this) {
  180.                 $devisSection->setSociete(null);
  181.             }
  182.         }
  183.         return $this;
  184.     }
  185.     /**
  186.      * @return Collection<int, DevisSousSection>
  187.      */
  188.     public function getDevisSousSections(): Collection
  189.     {
  190.         return $this->devisSousSections;
  191.     }
  192.     public function addDevisSousSection(DevisSousSection $devisSousSection): static
  193.     {
  194.         if (!$this->devisSousSections->contains($devisSousSection)) {
  195.             $this->devisSousSections->add($devisSousSection);
  196.             $devisSousSection->setSociete($this);
  197.         }
  198.         return $this;
  199.     }
  200.     public function removeDevisSousSection(DevisSousSection $devisSousSection): static
  201.     {
  202.         if ($this->devisSousSections->removeElement($devisSousSection)) {
  203.             // set the owning side to null (unless already changed)
  204.             if ($devisSousSection->getSociete() === $this) {
  205.                 $devisSousSection->setSociete(null);
  206.             }
  207.         }
  208.         return $this;
  209.     }
  210.     /**
  211.      * @return Collection<int, DevisActivite>
  212.      */
  213.     public function getDevisActivites(): Collection
  214.     {
  215.         return $this->devisActivites;
  216.     }
  217.     public function addDevisActivite(DevisActivite $devisActivite): static
  218.     {
  219.         if (!$this->devisActivites->contains($devisActivite)) {
  220.             $this->devisActivites->add($devisActivite);
  221.             $devisActivite->setSociete($this);
  222.         }
  223.         return $this;
  224.     }
  225.     public function removeDevisActivite(DevisActivite $devisActivite): static
  226.     {
  227.         if ($this->devisActivites->removeElement($devisActivite)) {
  228.             // set the owning side to null (unless already changed)
  229.             if ($devisActivite->getSociete() === $this) {
  230.                 $devisActivite->setSociete(null);
  231.             }
  232.         }
  233.         return $this;
  234.     }
  235.     /**
  236.      * @return Collection<int, Devis>
  237.      */
  238.     public function getDevis(): Collection
  239.     {
  240.         return $this->devis;
  241.     }
  242.     public function addDevi(Devis $devi): static
  243.     {
  244.         if (!$this->devis->contains($devi)) {
  245.             $this->devis->add($devi);
  246.             $devi->setSociete($this);
  247.         }
  248.         return $this;
  249.     }
  250.     public function removeDevi(Devis $devi): static
  251.     {
  252.         if ($this->devis->removeElement($devi)) {
  253.             // set the owning side to null (unless already changed)
  254.             if ($devi->getSociete() === $this) {
  255.                 $devi->setSociete(null);
  256.             }
  257.         }
  258.         return $this;
  259.     }
  260. }