<?php
namespace App\Entity\FO;
use App\Entity\GestionComerciale\Acompte;
use App\Entity\GestionComerciale\Bordereau;
use App\Entity\GestionComerciale\BordereauLCR;
use App\Entity\GestionComerciale\LCR;
use App\Entity\GestionComerciale\MouvementCaisse;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use App\Annotations\SecuredEntity;
/**
* CompteBancaire
*
* @ORM\Table("fo__compte_bancaire")
* @ORM\Entity(repositoryClass="App\Repository\FO\CompteBancaireRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
* @SecuredEntity(name="Compte Bancaire", group="REGLAGES")
*/
class CompteBancaire
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="date", type="datetime")
*/
private $date;
/**
* @ORM\Column(name="date_maj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
* @Assert\NotBlank(message="Libellé obligatoire")
*/
private $libelle;
/**
* @ORM\Column(name="date_suppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="domiciliation", type="string", length=255, nullable=true)
*/
private $domiciliation;
/**
* @ORM\Column(name="domiciliation2", type="string", length=255, nullable=true)
*/
private $domiciliation2;
/**
* @ORM\Column(name="codeEtablissement", type="string", length=255, nullable=true)
*/
private $codeEtablissement;
/**
* @ORM\Column(name="codeGuichet", type="string", length=255, nullable=true)
*/
private $codeGuichet;
/**
* @ORM\Column(name="numCompte", type="string", length=255, nullable=true)
*/
private $numCompte;
/**
* @ORM\Column(name="cleCompte", type="string", length=255, nullable=true)
*/
private $cleCompte;
/**
* @ORM\Column(name="IBAN", type="string", length=255, nullable=true)
*/
private $iBAN;
/**
* @ORM\Column(name="BIC", type="string", length=255, nullable=true)
*/
private $bIC;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="comptesBancaires")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\FO\Societe", inversedBy="comptesBancaires")
* @ORM\JoinColumn(nullable=true)
*/
private $societe;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\BordereauLCR", cascade={"persist"},mappedBy="compteBancaire")
*/
private $bordereauxLCR;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Bordereau", cascade={"persist"},mappedBy="compteBancaire")
*/
private $bordereaux;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\LCR", cascade={"persist"},mappedBy="compteBancaireSociete")
*/
private $lcrs;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Acompte", cascade={"persist"},mappedBy="compteBancaireSociete")
*/
private $reglements;
/**
* @ORM\Column(name="compta_perte", type="string", length=255, nullable=true)
*/
private $comptaPerte;
/**
* @ORM\Column(name="compta_profit", type="string", length=255, nullable=true)
*/
private $comptaProfit;
/**
* @ORM\Column(name="compta_compta", type="string", length=255, nullable=true)
*/
private $comptaCompta;
/**
* @ORM\Column(name="compta_fond", type="string", length=255, nullable=true)
*/
private $comptaFond;
/**
* @ORM\Column(name="id_import", type="string", length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\MouvementCaisse", cascade={"persist"},mappedBy="compteBancaire")
*/
private $mouvementsCaisse;
/**
* @ORM\Column(name="visible", type="boolean", nullable=true)
*/
private $visible;
/**
* @ORM\Column(name="code_journal", type="string", length=255, nullable=true)
*/
private $codeJournal;
/**
* Constructor
*/
public function __construct()
{
$this->date = new Datetime();
$this->visible = 1;
$this->mouvementsCaisse = new ArrayCollection();
$this->bordereaux = new ArrayCollection();
$this->reglements = new ArrayCollection();
$this->lcrs = new ArrayCollection();
$this->bordereauxLCR = new ArrayCollection();
}
/**
* toString
* @return string
*/
public function __toString()
{
return $this->getLibelle();
}
public function getId(): int
{
return $this->id;
}
public function setDate(DateTime $date): CompteBancaire
{
$this->date = $date;
return $this;
}
public function getDate(): DateTime
{
return $this->date;
}
public function setDateMaj(?DateTime $dateMaj): CompteBancaire
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setDateSuppression(?DateTime $dateSuppression): CompteBancaire
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDomiciliation(?string $domiciliation): CompteBancaire
{
$this->domiciliation = $domiciliation;
return $this;
}
public function getDomiciliation(): ?string
{
return $this->domiciliation;
}
public function setDomiciliation2(?string $domiciliation2): CompteBancaire
{
$this->domiciliation2 = $domiciliation2;
return $this;
}
public function getDomiciliation2(): ?string
{
return $this->domiciliation2;
}
public function setCodeEtablissement(?string $codeEtablissement): CompteBancaire
{
$this->codeEtablissement = $codeEtablissement;
return $this;
}
public function getCodeEtablissement(): ?string
{
return $this->codeEtablissement;
}
public function setCodeGuichet(?string $codeGuichet): CompteBancaire
{
$this->codeGuichet = $codeGuichet;
return $this;
}
public function getCodeGuichet(): ?string
{
return $this->codeGuichet;
}
public function setNumCompte(?string $numCompte): CompteBancaire
{
$this->numCompte = $numCompte;
return $this;
}
public function getNumCompte(): ?string
{
return $this->numCompte;
}
public function setCleCompte(?string $cleCompte): CompteBancaire
{
$this->cleCompte = $cleCompte;
return $this;
}
public function getCleCompte(): ?string
{
return $this->cleCompte;
}
public function setIBAN(?string $iBAN): CompteBancaire
{
$this->iBAN = $iBAN;
return $this;
}
public function getIBAN(): ?string
{
return $this->iBAN;
}
public function setBIC(?string $bIC): CompteBancaire
{
$this->bIC = $bIC;
return $this;
}
public function getBIC(): ?string
{
return $this->bIC;
}
public function setUtilisateur(?Utilisateur $utilisateur): CompteBancaire
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setSociete(?Societe $societe): CompteBancaire
{
$this->societe = $societe;
return $this;
}
public function getSociete(): ?Societe
{
return $this->societe;
}
public function setLibelle(?string $libelle): CompteBancaire
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setBordereauLCR(?BordereauLCR $bordereauLCR): CompteBancaire
{
$this->bordereauLCR = $bordereauLCR;
return $this;
}
public function getBordereauLCR(): ?BordereauLCR
{
return $this->bordereauLCR;
}
public function addBordereauxLCR(BordereauLCR $bordereauxLCR): CompteBancaire
{
$this->bordereauxLCR[] = $bordereauxLCR;
return $this;
}
public function removeBordereauxLCR(BordereauLCR $bordereauxLCR)
{
$this->bordereauxLCR->removeElement($bordereauxLCR);
}
public function getBordereauxLCR(): Collection
{
return $this->bordereauxLCR;
}
public function addLcr(LCR $lcr): CompteBancaire
{
$this->lcrs[] = $lcr;
return $this;
}
public function removeLcr(LCR $lcr)
{
$this->lcrs->removeElement($lcr);
}
public function getLcrs(): Collection
{
return $this->lcrs;
}
public function addReglement(Acompte $reglement): CompteBancaire
{
$this->reglements[] = $reglement;
return $this;
}
public function removeReglement(Acompte $reglement)
{
$this->reglements->removeElement($reglement);
}
public function getReglements(): Collection
{
return $this->reglements;
}
public function setComptaPerte(?string $comptaPerte): CompteBancaire
{
$this->comptaPerte = $comptaPerte;
return $this;
}
public function getComptaPerte(): ?string
{
return $this->comptaPerte;
}
public function setComptaProfit(?string $comptaProfit): CompteBancaire
{
$this->comptaProfit = $comptaProfit;
return $this;
}
public function getComptaProfit(): ?string
{
return $this->comptaProfit;
}
public function setComptaCompta(?string $comptaCompta): CompteBancaire
{
$this->comptaCompta = $comptaCompta;
return $this;
}
public function getComptaCompta(): ?string
{
return $this->comptaCompta;
}
public function setComptaFond(?string $comptaFond): CompteBancaire
{
$this->comptaFond = $comptaFond;
return $this;
}
public function getComptaFond(): ?string
{
return $this->comptaFond;
}
public function addBordereaux(Bordereau $bordereaux): CompteBancaire
{
$this->bordereaux[] = $bordereaux;
return $this;
}
public function removeBordereaux(Bordereau $bordereaux)
{
$this->bordereaux->removeElement($bordereaux);
}
public function getBordereaux(): Collection
{
return $this->bordereaux;
}
public function setIdImport(?string $idImport): CompteBancaire
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function setVisible(?bool $visible): CompteBancaire
{
$this->visible = $visible;
return $this;
}
public function getVisible(): ?bool
{
return $this->visible;
}
public function addMouvementsCaisse(MouvementCaisse $mouvementsCaisse): CompteBancaire
{
$this->mouvementsCaisse[] = $mouvementsCaisse;
return $this;
}
public function removeMouvementsCaisse(MouvementCaisse $mouvementsCaisse)
{
$this->mouvementsCaisse->removeElement($mouvementsCaisse);
}
public function getMouvementsCaisse(): Collection
{
return $this->mouvementsCaisse;
}
public function setCodeJournal(?string $codeJournal): CompteBancaire
{
$this->codeJournal = $codeJournal;
return $this;
}
public function getCodeJournal(): ?string
{
return $this->codeJournal;
}
}