<?php
namespace App\Entity\FO;
use App\Entity\Articles\FamilleCompta;
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;
/**
* Societe
*
* @ORM\Table("societe__societe")
* @ORM\Entity(repositoryClass="App\Repository\FO\SocieteRepository")
* @SecuredEntity(name="Societe", group="REGLAGES")
*/
class Societe
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="societe")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="signature_mail", type="text", nullable=true)
*/
private $signatureMail;
/**
* @ORM\Column(name="texte_facture", type="text", nullable=true)
*/
private $texteFacture;
/**
* @ORM\Column(name="logo", type="string", length=255, nullable=true)
*/
private $logo;
/**
* @ORM\Column(name="afficher_donnees_import", type="boolean", nullable=true)
*/
private $afficherDonneesImport;
/**
* @ORM\Column(name="date", type="datetime")
*/
private $date;
/**
* @var mailTest
* @ORM\Column(name="en_inventaire", type="boolean", nullable=true)
*/
private $enInventaire;
/**
* @ORM\Column(name="date_debut_inventaire", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateDebutInventaire;
/**
* @ORM\Column(name="date_fin_inventaire", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateFinInventaire;
/**
* @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="capital", type="string", length=255, nullable=true)
*/
private $capital;
/**
* @ORM\Column(name="rcs", type="string", length=255, nullable=true)
*/
private $rcs;
/**
* @ORM\Column(name="numTva", type="string", length=255, nullable=true)
* @Assert\NotBlank(message="Numéro de TVA obligatoire")
*/
private $numTva;
/**
* @ORM\Column(name="adresse", type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @ORM\Column(name="adresse_complementaire", type="string", length=255, nullable=true)
*/
private $adresseComplementaire;
/**
* @ORM\Column(name="code_postal", type="string", length=255, nullable=true)
*/
private $codePostal;
/**
* @ORM\Column(name="ville", type="string", length=255, nullable=true)
*/
private $ville;
/**
* @ORM\Column(name="pays", type="string", length=255, nullable=true)
*/
private $pays;
/**
* @ORM\Column(name="telephone", type="string", length=255, nullable=true)
*/
private $telephone;
/**
* @ORM\Column(name="fax", type="string", length=255, nullable=true)
*/
private $fax;
/**
* @ORM\Column(name="siteWeb", type="string", length=255, nullable=true)
*/
private $siteWeb;
/**
* @ORM\Column(name="siret", type="string", length=255, nullable=true)
* @Assert\NotBlank(message="Siret obligatoire")
*/
private $siret;
/**
* @ORM\Column(name="ape", type="string", length=255, nullable=true)
*/
private $ape;
/**
* @var string
* @Assert\Email(
* message = "Adresse email non valide"
* )
* @ORM\Column(name="email", type="string", length=255, nullable=true)
*/
private $email;
/**
* @var string
* @Assert\Email(
* message = "Adresse email non valide"
* )
* @ORM\Column(name="emailTest", type="string", length=255, nullable=true)
*/
private $emailTest;
/**
* @var mailTest
* @ORM\Column(name="mailTest", type="boolean", nullable=true)
*/
private $mailTest;
/**
*
* @ORM\Column(name="dateDebutExercice", type="datetime", nullable=true)
*/
private $dateDebutExercice;
/**
* @ORM\Column(name="dateFinExercice", type="datetime", nullable=true)
*/
private $dateFinExercice;
/**
* @ORM\Column(name="note_service", type="text", nullable=true)
*
*/
private $noteService;
/**
* @ORM\OneToMany(targetEntity="App\Entity\FO\CompteBancaire", cascade={"persist"},mappedBy="societe")
*/
private $comptesBancaires;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\FamilleCompta", cascade={"persist"})
*/
private $familleComptaFraisFixe;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\FamilleCompta", cascade={"persist"})
*/
private $familleComptaFraisPort;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\FamilleCompta", cascade={"persist"})
*/
private $familleComptaFraisAnnexes;
/**
* @var string
*
* @ORM\Column(name="mailer_user", type="string", length=255, nullable=true)
*/
private $mailerUser;
/**
* @var string
*
* @ORM\Column(name="mailer_password", type="string", length=255, nullable=true)
*/
private $mailerPassword;
/**
* @var string
*
* @ORM\Column(name="mailer_host", type="string", length=255, nullable=true)
*/
private $mailerHost;
/**
* @var string
*
* @ORM\Column(name="mailer_port", type="string", length=255, nullable=true)
*/
private $mailerPort;
public function __construct()
{
$this->date = new Datetime();
$this->afficherDonneesImport = 0;
$this->comptesBancaires = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function setDate(DateTime $date): Societe
{
$this->date = $date;
return $this;
}
public function getDate(): DateTime
{
return $this->date;
}
public function setLibelle(?string $libelle): Societe
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setNumTva(?string $numTva): Societe
{
$this->numTva = $numTva;
return $this;
}
public function getNumTva(): ?string
{
return $this->numTva;
}
public function setAdresse(?string $adresse): Societe
{
$this->adresse = $adresse;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setTelephone(?string $telephone): Societe
{
$this->telephone = $telephone;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setFax(?string $fax): Societe
{
$this->fax = $fax;
return $this;
}
public function getFax(): ?string
{
return $this->fax;
}
public function setSiteWeb(?string $siteWeb): Societe
{
$this->siteWeb = $siteWeb;
return $this;
}
public function getSiteWeb(): ?string
{
return $this->siteWeb;
}
public function setSiret(?string $siret): Societe
{
$this->siret = $siret;
return $this;
}
public function getSiret(): ?string
{
return $this->siret;
}
public function setDateMaj(?DateTime $dateMaj): Societe
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setEmail(?string $email): Societe
{
$this->email = $email;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmailTest(string $emailTest): Societe
{
$this->emailTest = $emailTest;
return $this;
}
public function getEmailTest(): ?string
{
return $this->emailTest;
}
public function setLogo(?string $logo): Societe
{
$this->logo = $logo;
return $this;
}
public function getLogo(): ?string
{
return $this->logo;
}
public function getLogoDir(): string
{
return 'uploads/logos/societe';
}
public function setUtilisateur(?Utilisateur $utilisateur): Societe
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setCapital(?string $capital): Societe
{
$this->capital = $capital;
return $this;
}
public function getCapital(): ?string
{
return $this->capital;
}
public function setRcs(?string $rcs): Societe
{
$this->rcs = $rcs;
return $this;
}
public function getRcs(): ?string
{
return $this->rcs;
}
public function setAdresseComplementaire(?string $adresseComplementaire): Societe
{
$this->adresseComplementaire = $adresseComplementaire;
return $this;
}
public function getAdresseComplementaire(): ?string
{
return $this->adresseComplementaire;
}
public function setCodePostal(?string $codePostal): Societe
{
$this->codePostal = $codePostal;
return $this;
}
public function getCodePostal(): ?string
{
return $this->codePostal;
}
public function setVille(?string $ville): Societe
{
$this->ville = $ville;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setPays(?string $pays): Societe
{
$this->pays = $pays;
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setNoteService(?string $noteService): Societe
{
$this->noteService = $noteService;
return $this;
}
public function getNoteService(): ?string
{
return $this->noteService;
}
public function setAfficherDonneesImport(?bool $afficherDonneesImport): Societe
{
$this->afficherDonneesImport = $afficherDonneesImport;
return $this;
}
public function getAfficherDonneesImport(): ?bool
{
return $this->afficherDonneesImport;
}
public function addComptesBancaire(CompteBancaire $comptesBancaire): Societe
{
$this->comptesBancaires[] = $comptesBancaire;
return $this;
}
public function removeComptesBancaire(CompteBancaire $comptesBancaire)
{
$this->comptesBancaires->removeElement($comptesBancaire);
}
public function getComptesBancaires(): Collection
{
return $this->comptesBancaires;
}
public function setMailTest(?bool $mailTest): Societe
{
$this->mailTest = $mailTest;
return $this;
}
public function getMailTest(): ?bool
{
return $this->mailTest;
}
public function setEnInventaire(?bool $enInventaire): Societe
{
$this->enInventaire = $enInventaire;
return $this;
}
public function getEnInventaire(): ?bool
{
return $this->enInventaire;
}
public function setDateDebutInventaire(?DateTime $dateDebutInventaire): Societe
{
$this->dateDebutInventaire = $dateDebutInventaire;
return $this;
}
public function getDateDebutInventaire(): ?DateTime
{
return $this->dateDebutInventaire;
}
public function setDateFinInventaire(?DateTime $dateFinInventaire): Societe
{
$this->dateFinInventaire = $dateFinInventaire;
return $this;
}
public function getDateFinInventaire(): ?DateTime
{
return $this->dateFinInventaire;
}
public function setFamilleComptaFraisFixe(?FamilleCompta $familleComptaFraisFixe): Societe
{
$this->familleComptaFraisFixe = $familleComptaFraisFixe;
return $this;
}
public function getFamilleComptaFraisFixe(): ?FamilleCompta
{
return $this->familleComptaFraisFixe;
}
public function setFamilleComptaFraisPort(?FamilleCompta $familleComptaFraisPort): Societe
{
$this->familleComptaFraisPort = $familleComptaFraisPort;
return $this;
}
public function getFamilleComptaFraisPort(): ?FamilleCompta
{
return $this->familleComptaFraisPort;
}
public function setSignatureMail(?string $signatureMail): Societe
{
$this->signatureMail = $signatureMail;
return $this;
}
public function getSignatureMail(): ?string
{
return $this->signatureMail;
}
public function getTexteFacture(): ?string
{
return $this->texteFacture;
}
public function setTexteFacture(?string $texteFacture): Societe
{
$this->texteFacture = $texteFacture;
return $this;
}
public function setDateDebutExercice(?DateTime $dateDebutExercice): Societe
{
$this->dateDebutExercice = $dateDebutExercice;
return $this;
}
public function getDateDebutExercice(): ?DateTime
{
return $this->dateDebutExercice;
}
public function setDateFinExercice(?DateTime $dateFinExercice): Societe
{
$this->dateFinExercice = $dateFinExercice;
return $this;
}
public function getDateFinExercice(): ?DateTime
{
return $this->dateFinExercice;
}
public function setFamilleComptaFraisAnnexes(?FamilleCompta $familleComptaFraisAnnexes): Societe
{
$this->familleComptaFraisAnnexes = $familleComptaFraisAnnexes;
return $this;
}
public function getFamilleComptaFraisAnnexes(): ?FamilleCompta
{
return $this->familleComptaFraisAnnexes;
}
public function setApe(?string $ape): Societe
{
$this->ape = $ape;
return $this;
}
public function getApe(): ?string
{
return $this->ape;
}
public function setMailerUser(?string $mailerUser): Societe
{
$this->mailerUser = $mailerUser;
return $this;
}
public function getMailerUser(): ?string
{
return $this->mailerUser;
}
public function setMailerPassword(?string $mailerPassword): Societe
{
$this->mailerPassword = $mailerPassword;
return $this;
}
public function getMailerPassword(): ?string
{
return $this->mailerPassword;
}
public function setMailerHost(?string $mailerHost): Societe
{
$this->mailerHost = $mailerHost;
return $this;
}
public function getMailerHost(): ?string
{
return $this->mailerHost;
}
public function setMailerPort(?string $mailerPort): Societe
{
$this->mailerPort = $mailerPort;
return $this;
}
public function getMailerPort(): ?string
{
return $this->mailerPort;
}
}