<?php
namespace App\Entity;
use App\Repository\SpvRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SpvRepository::class)
*/
class Spv
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $raisonSociale;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isEnabled;
/**
* @ORM\OneToMany(targetEntity="Rib",mappedBy="spv", cascade={"persist"})
*/
private $rib;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $fluxBancaire;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $note;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $adresse;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $city;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $codePostal;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $tel;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isArchived;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $archiveAt;
/**
* @ORM\Column(type="string", length=255)
*/
private $codeSage;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isPrejeance;
/**
* @ORM\OneToOne(targetEntity="SpvEnedis",mappedBy="spv", cascade={"persist"})
*/
private $spvEnedis;
public function __construct()
{
$this->rib = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getRaisonSociale(): ?string
{
return $this->raisonSociale;
}
public function setRaisonSociale(?string $raisonSociale): self
{
$this->raisonSociale = $raisonSociale;
return $this;
}
public function getIsEnabled(): ?bool
{
return $this->isEnabled;
}
public function setIsEnabled(?bool $isEnabled): self
{
$this->isEnabled = $isEnabled;
return $this;
}
public function getFluxBancaire(): ?bool
{
return $this->fluxBancaire;
}
public function setFluxBancaire(?bool $fluxBancaire): self
{
$this->fluxBancaire = $fluxBancaire;
return $this;
}
public function getNote(): ?string
{
return $this->note;
}
public function setNote(?string $note): self
{
$this->note = $note;
return $this;
}
/**
* @return Collection|Rib[]
*/
public function getRib(): Collection
{
return $this->rib;
}
public function addRib(Rib $rib): self
{
if (!$this->rib->contains($rib)) {
$this->rib[] = $rib;
$rib->setSpv($this);
}
return $this;
}
public function removeRib(Rib $rib): self
{
if ($this->rib->removeElement($rib)) {
// set the owning side to null (unless already changed)
if ($rib->getSpv() === $this) {
$rib->setSpv(null);
}
}
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getCodePostal(): ?string
{
return $this->codePostal;
}
public function setCodePostal(?string $codePostal): self
{
$this->codePostal = $codePostal;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getTel(): ?string
{
return $this->tel;
}
public function setTel(?string $tel): self
{
$this->tel = $tel;
return $this;
}
public function getIsArchived(): ?bool
{
return $this->isArchived;
}
public function setIsArchived(?bool $isArchived): self
{
$this->isArchived = $isArchived;
return $this;
}
public function getArchiveAt(): ?\DateTimeInterface
{
return $this->archiveAt;
}
public function setArchiveAt(?\DateTimeInterface $archiveAt): self
{
$this->archiveAt = $archiveAt;
return $this;
}
public function getCodeSage(): ?string
{
return $this->codeSage;
}
public function setCodeSage(string $codeSage): self
{
$this->codeSage = $codeSage;
return $this;
}
public function getIsPrejeance(): ?bool
{
return $this->isPrejeance;
}
public function setIsPrejeance(?bool $isPrejeance): self
{
$this->isPrejeance = $isPrejeance;
return $this;
}
public function getSpvEnedis(): ?SpvEnedis
{
return $this->spvEnedis;
}
public function setSpvEnedis(?SpvEnedis $spvEnedis): self
{
// unset the owning side of the relation if necessary
if ($spvEnedis === null && $this->spvEnedis !== null) {
$this->spvEnedis->setSpv(null);
}
// set the owning side of the relation if necessary
if ($spvEnedis !== null && $spvEnedis->getSpv() !== $this) {
$spvEnedis->setSpv($this);
}
$this->spvEnedis = $spvEnedis;
return $this;
}
public function __toString()
{
return $this->name ;
}
}