src/Entity/Spv.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SpvRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SpvRepository::class)
  9.  */
  10. class Spv
  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)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $raisonSociale;
  26.     /**
  27.      * @ORM\Column(type="boolean", nullable=true)
  28.      */
  29.     private $isEnabled;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity="Rib",mappedBy="spv", cascade={"persist"})
  32.      */
  33.     private $rib;
  34.     /**
  35.      * @ORM\Column(type="boolean", nullable=true)
  36.      */
  37.     private $fluxBancaire;
  38.     /**
  39.      * @ORM\Column(type="text", nullable=true)
  40.      */
  41.     private $note;
  42.     /**
  43.      * @ORM\Column(type="text", nullable=true)
  44.      */
  45.     private $adresse;
  46.     /**
  47.      * @ORM\Column(type="text", nullable=true)
  48.      */
  49.     private $city;
  50.     /**
  51.      * @ORM\Column(type="text", nullable=true)
  52.      */
  53.     private $codePostal;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $email;
  58.     /**
  59.      * @ORM\Column(type="text", nullable=true)
  60.      */
  61.     private $tel;
  62.     /**
  63.      * @ORM\Column(type="boolean", nullable=true)
  64.      */
  65.     private $isArchived;
  66.     /**
  67.      * @ORM\Column(type="datetime", nullable=true)
  68.      */
  69.     private $archiveAt;
  70.     /**
  71.      * @ORM\Column(type="string", length=255)
  72.      */
  73.     private $codeSage;
  74.     /**
  75.      * @ORM\Column(type="boolean", nullable=true)
  76.      */
  77.     private $isPrejeance;
  78.     /**
  79.      * @ORM\OneToOne(targetEntity="SpvEnedis",mappedBy="spv", cascade={"persist"})
  80.      */
  81.     private $spvEnedis;
  82.     public function __construct()
  83.     {
  84.         $this->rib = new ArrayCollection();
  85.     }
  86.     public function getId(): ?int
  87.     {
  88.         return $this->id;
  89.     }
  90.     public function getName(): ?string
  91.     {
  92.         return $this->name;
  93.     }
  94.     public function setName(string $name): self
  95.     {
  96.         $this->name = $name;
  97.         return $this;
  98.     }
  99.     public function getRaisonSociale(): ?string
  100.     {
  101.         return $this->raisonSociale;
  102.     }
  103.     public function setRaisonSociale(?string $raisonSociale): self
  104.     {
  105.         $this->raisonSociale = $raisonSociale;
  106.         return $this;
  107.     }
  108.     public function getIsEnabled(): ?bool
  109.     {
  110.         return $this->isEnabled;
  111.     }
  112.     public function setIsEnabled(?bool $isEnabled): self
  113.     {
  114.         $this->isEnabled = $isEnabled;
  115.         return $this;
  116.     }
  117.     public function getFluxBancaire(): ?bool
  118.     {
  119.         return $this->fluxBancaire;
  120.     }
  121.     public function setFluxBancaire(?bool $fluxBancaire): self
  122.     {
  123.         $this->fluxBancaire = $fluxBancaire;
  124.         return $this;
  125.     }
  126.     public function getNote(): ?string
  127.     {
  128.         return $this->note;
  129.     }
  130.     public function setNote(?string $note): self
  131.     {
  132.         $this->note = $note;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @return Collection|Rib[]
  137.      */
  138.     public function getRib(): Collection
  139.     {
  140.         return $this->rib;
  141.     }
  142.     public function addRib(Rib $rib): self
  143.     {
  144.         if (!$this->rib->contains($rib)) {
  145.             $this->rib[] = $rib;
  146.             $rib->setSpv($this);
  147.         }
  148.         return $this;
  149.     }
  150.     public function removeRib(Rib $rib): self
  151.     {
  152.         if ($this->rib->removeElement($rib)) {
  153.             // set the owning side to null (unless already changed)
  154.             if ($rib->getSpv() === $this) {
  155.                 $rib->setSpv(null);
  156.             }
  157.         }
  158.         return $this;
  159.     }
  160.     public function getAdresse(): ?string
  161.     {
  162.         return $this->adresse;
  163.     }
  164.     public function setAdresse(?string $adresse): self
  165.     {
  166.         $this->adresse = $adresse;
  167.         return $this;
  168.     }
  169.     public function getCity(): ?string
  170.     {
  171.         return $this->city;
  172.     }
  173.     public function setCity(?string $city): self
  174.     {
  175.         $this->city = $city;
  176.         return $this;
  177.     }
  178.     public function getCodePostal(): ?string
  179.     {
  180.         return $this->codePostal;
  181.     }
  182.     public function setCodePostal(?string $codePostal): self
  183.     {
  184.         $this->codePostal = $codePostal;
  185.         return $this;
  186.     }
  187.     public function getEmail(): ?string
  188.     {
  189.         return $this->email;
  190.     }
  191.     public function setEmail(?string $email): self
  192.     {
  193.         $this->email = $email;
  194.         return $this;
  195.     }
  196.     public function getTel(): ?string
  197.     {
  198.         return $this->tel;
  199.     }
  200.     public function setTel(?string $tel): self
  201.     {
  202.         $this->tel = $tel;
  203.         return $this;
  204.     }
  205.     public function getIsArchived(): ?bool
  206.     {
  207.         return $this->isArchived;
  208.     }
  209.     public function setIsArchived(?bool $isArchived): self
  210.     {
  211.         $this->isArchived = $isArchived;
  212.         return $this;
  213.     }
  214.     public function getArchiveAt(): ?\DateTimeInterface
  215.     {
  216.         return $this->archiveAt;
  217.     }
  218.     public function setArchiveAt(?\DateTimeInterface $archiveAt): self
  219.     {
  220.         $this->archiveAt = $archiveAt;
  221.         return $this;
  222.     }
  223.     public function getCodeSage(): ?string
  224.     {
  225.         return $this->codeSage;
  226.     }
  227.     public function setCodeSage(string $codeSage): self
  228.     {
  229.         $this->codeSage = $codeSage;
  230.         return $this;
  231.     }
  232.     public function getIsPrejeance(): ?bool
  233.     {
  234.         return $this->isPrejeance;
  235.     }
  236.     public function setIsPrejeance(?bool $isPrejeance): self
  237.     {
  238.         $this->isPrejeance = $isPrejeance;
  239.         return $this;
  240.     }
  241.     public function getSpvEnedis(): ?SpvEnedis
  242.     {
  243.         return $this->spvEnedis;
  244.     }
  245.     public function setSpvEnedis(?SpvEnedis $spvEnedis): self
  246.     {
  247.         // unset the owning side of the relation if necessary
  248.         if ($spvEnedis === null && $this->spvEnedis !== null) {
  249.             $this->spvEnedis->setSpv(null);
  250.         }
  251.         // set the owning side of the relation if necessary
  252.         if ($spvEnedis !== null && $spvEnedis->getSpv() !== $this) {
  253.             $spvEnedis->setSpv($this);
  254.         }
  255.         $this->spvEnedis = $spvEnedis;
  256.         return $this;
  257.     }
  258.     public function __toString()
  259.     {
  260.         return $this->name ;
  261.     }
  262. }