<?php
namespace App\Entity;
use App\Attributes\ClassNameConverter;
use App\Attributes\ClassPropertyConverter;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
#[ORM\Entity(repositoryClass: 'App\Repository\EnterpriseRepository')]
#[Gedmo\Loggable]
#[ClassNameConverter(name: 'Entreprise')]
class Entreprise extends EntityStatus
{
public const STATUS_MERGED = 3;
public const STATUS_END_OF_ACTIVITY = 4;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('Raison sociale')]
private ?string $raisonSocial = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $adresse = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('Téléphone bureau')]
private ?string $tel1 = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $tel2 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $fax = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $email = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('N° Siren')]
private ?string $codeSiren = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('N° APE')]
private ?string $codeApe = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('N° TVA intracom')]
private ?string $numTvaIntracom = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $ancienIdentifiant = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('Identifiant comptable')]
private ?string $identifiantCompta = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('EDE négoce')]
private ?string $numEdeNegoce = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('EDE centre rassemblement')]
private ?string $numEdeCentre = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('EDE élevage')]
private ?string $numEdeElevage = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'integer', nullable: true)]
#[ClassPropertyConverter('Nb employés')]
private ?int $nombreEmployes = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $autreSpecialite = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[ClassPropertyConverter('Volume d\'animaux')]
private ?string $volumeAnimaux = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $souhaiteAdherer = false;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $figurerAnnuaireAdherents = false;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $figurerAnnuaireInternet = false;
#[ORM\Column(type: 'string', nullable: true)]
private ?string $figurerAuNomDe = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $statutPaiement = null;
#[ORM\Column(type: 'text', length: 255, nullable: true)]
private ?string $raisonNonAdhesion = null;
#[Gedmo\Versioned]
#[ORM\Column(type: 'datetime', nullable: true)]
#[ClassPropertyConverter('Date cessation')]
private ?DateTimeInterface $dateCessation = null;
#[ORM\Column(type: 'string', nullable: true)]
private ?string $chiffreDernierTotal = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $commentaires = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private bool $isTransporter = false;
#[ORM\ManyToMany(targetEntity: 'App\Entity\Commission', inversedBy: 'entreprises', cascade: ['persist'])]
private Collection $commissions;
#[ORM\ManyToOne(targetEntity: 'App\Entity\GroupeEntreprise', cascade: ['persist'], inversedBy: 'entreprises')]
private ?GroupeEntreprise $groupeEntreprise;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Departement', cascade: ['persist'], inversedBy: 'entreprises')]
#[ORM\JoinColumn(nullable: true)]
private ?Departement $departement = null;
//#[ORM\ManyToOne(targetEntity: 'App\Entity\StatutAdherent', cascade: ['persist'], inversedBy: 'entreprises')]
//private ?statutAdherent $statutAdherent;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Syndicat', cascade: ['persist'], inversedBy: 'entreprises')]
#[ORM\JoinColumn(nullable: true)]
private ?Syndicat $syndicat = null;
#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: 'App\Entity\Etablissement', cascade: ['persist', 'remove'])]
private Collection $etablissements;
#[ORM\OneToOne(inversedBy: 'entreprise', targetEntity: 'App\Entity\EntrepriseTransporteur', cascade: ['persist', 'remove'])]
private ?EntrepriseTransporteur $transporteur;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $transportPourAutrui = false;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $lienUrl = null;
#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: 'App\Entity\CommissionEntreprise', cascade: ['persist'])]
private Collection $commissionEntreprises;
#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: 'App\Entity\Cotisation', cascade: ['persist', 'remove'], fetch: 'EXTRA_LAZY')]
#[ORM\OrderBy(['year' => 'DESC'])]
private Collection $cotisations;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $ville = null;
#[ORM\Column(type: 'string', length: 60, nullable: true)]
private ?string $codePostal = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $adresse2 = null;
/** @todo START A supprimer */
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombreVeaux = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombreMaigres = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombreElevProd = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombreBoucherie = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombreOvins = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombrePorcins = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombreEquins = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nombreCaprins = null;
/** @todo END A supprimer */
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $autreActivite = null;
#[ORM\OneToOne(inversedBy: 'entreprise', targetEntity: 'App\Entity\Contact', cascade: ['persist', 'remove'], orphanRemoval: true)]
private ?Contact $contactResponsable;
#[ORM\Column(type: 'string', length: 30, nullable: true)]
private ?string $codeAdherent = null;
#[ORM\OneToMany(mappedBy: 'firm', targetEntity: Order::class, orphanRemoval: true)]
private Collection $orders;
#[ORM\OneToMany(mappedBy: 'firm', targetEntity: Contact::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OrderBy(['isResponsible' => 'DESC'])]
private Collection $contacts;
#[Gedmo\Versioned]
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: true)]
private ?Region $homeRegion = null;
#[Gedmo\Versioned]
#[ORM\Column]
#[ClassPropertyConverter('Quali négoce ?')]
private ?bool $isQualiNegoce = false;
#[Gedmo\Versioned]
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
#[ClassPropertyConverter('Date de certification')]
private ?DateTimeInterface $qualiNegoceCertificationDate = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $qualiNegoceContactName = null;
#[ORM\ManyToOne(inversedBy: 'entreprisesNew')]
private ?Commission $commission = null;
#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: EntrepriseActivity::class, cascade: ['persist', 'remove'])]
private Collection $entrepriseActivities;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $raison_non_adhesion_autre = null;
#[Gedmo\Versioned]
#[ORM\Column]
#[ClassPropertyConverter('Volume total')]
private ?int $totalCountSpecies = 0;
#[ORM\OneToMany(mappedBy: 'firm', targetEntity: FirmQualiNegoceDocument::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection $firmQualiNegoceDocuments;
#[Gedmo\Versioned]
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
#[ClassPropertyConverter('Date pré-audit')]
private ?\DateTimeInterface $qualiNegocePreAuditDate = null;
#[Gedmo\Versioned]
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
#[ClassPropertyConverter('Nom du représentant')]
private ?Contact $qualiNegoceContact = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: true)]
private ?FirmType $firmType = null;
#[ORM\OneToMany(mappedBy: 'firm', targetEntity: CotisationNotification::class, orphanRemoval: true)]
private Collection $cotisationNotifications;
#[ORM\Column]
private ?bool $isMember = false;
#[ORM\OneToMany(mappedBy: 'firm', targetEntity: FormUser::class, orphanRemoval: true)]
private Collection $formUsers;
#[ORM\OneToMany(mappedBy: 'firm', targetEntity: FirmContactQualiNegoce::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection $firmContactQualiNegoces;
public function getVars(): array
{
return get_object_vars($this);
}
public function __construct()
{
$this->commissions = new ArrayCollection();
$this->commissionEntreprises = new ArrayCollection();
$this->etablissements = new ArrayCollection();
$this->contacts = new ArrayCollection();
$this->cotisations = new ArrayCollection();
$this->orders = new ArrayCollection();
$this->entrepriseActivities = new ArrayCollection();
$this->firmQualiNegoceDocuments = new ArrayCollection();
$this->cotisationNotifications = new ArrayCollection();
$this->formUsers = new ArrayCollection();
$this->firmContactQualiNegoces = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getRaisonSocial(): ?string
{
return $this->raisonSocial;
}
public function setRaisonSocial(?string $raisonSocial): self
{
$this->raisonSocial = $raisonSocial;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getTel1(): ?string
{
return $this->tel1;
}
public function setTel1(?string $tel1): self
{
$this->tel1 = $tel1;
return $this;
}
public function getTel2(): ?string
{
return $this->tel2;
}
public function setTel2(?string $tel2): self
{
$this->tel2 = $tel2;
return $this;
}
public function getFax(): ?string
{
return $this->fax;
}
public function setFax(?string $fax): self
{
$this->fax = $fax;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getCodeSiren(): ?string
{
return $this->codeSiren;
}
public function setCodeSiren(?string $codeSiren): self
{
$this->codeSiren = $codeSiren;
return $this;
}
public function getCodeApe(): ?string
{
return $this->codeApe;
}
public function setCodeApe(?string $codeApe): self
{
$this->codeApe = $codeApe;
return $this;
}
public function getNumTvaIntracom(): ?string
{
return $this->numTvaIntracom;
}
public function setNumTvaIntracom(?string $numTvaIntracom): self
{
$this->numTvaIntracom = $numTvaIntracom;
return $this;
}
public function getIdentifiantCompta(): ?string
{
return $this->identifiantCompta;
}
public function setIdentifiantCompta(?string $identifiantCompta): self
{
$this->identifiantCompta = $identifiantCompta;
return $this;
}
public function getNumEdeNegoce(): ?string
{
return $this->numEdeNegoce;
}
public function setNumEdeNegoce(?string $numEdeNegoce): self
{
$this->numEdeNegoce = $numEdeNegoce;
return $this;
}
public function getNumEdeCentre(): ?string
{
return $this->numEdeCentre;
}
public function setNumEdeCentre(?string $numEdeCentre): self
{
$this->numEdeCentre = $numEdeCentre;
return $this;
}
public function getNumEdeElevage(): ?string
{
return $this->numEdeElevage;
}
public function setNumEdeElevage(?string $numEdeElevage): self
{
$this->numEdeElevage = $numEdeElevage;
return $this;
}
public function getNombreEmployes(): ?int
{
return $this->nombreEmployes;
}
public function setNombreEmployes(?int $nombreEmployes): self
{
$this->nombreEmployes = $nombreEmployes;
return $this;
}
public function getSectSiBovin(): ?string
{
return $this->sectSiBovin;
}
public function setSectSiBovin(?string $sectSiBovin): self
{
$this->sectSiBovin = $sectSiBovin;
return $this;
}
public function getAutreSpecialite(): ?string
{
return $this->autreSpecialite;
}
public function setAutreSpecialite(?string $autreSpecialite): self
{
$this->autreSpecialite = $autreSpecialite;
return $this;
}
public function getVolumeAnimaux(): ?string
{
return $this->volumeAnimaux;
}
public function setVolumeAnimaux(?string $volumeAnimaux): self
{
$this->volumeAnimaux = $volumeAnimaux;
return $this;
}
public function getSouhaiteAdherer(): ?bool
{
return $this->souhaiteAdherer;
}
public function setSouhaiteAdherer(?bool $souhaiteAdherer): self
{
$this->souhaiteAdherer = $souhaiteAdherer;
return $this;
}
public function getFigurerAnnuaireAdherents(): ?bool
{
return $this->figurerAnnuaireAdherents;
}
public function setFigurerAnnuaireAdherents(?bool $figurerAnnuaireAdherents): self
{
$this->figurerAnnuaireAdherents = $figurerAnnuaireAdherents;
return $this;
}
public function getFigurerAnnuaireInternet(): ?bool
{
return $this->figurerAnnuaireInternet;
}
public function setFigurerAnnuaireInternet(?bool $figurerAnnuaireInternet): self
{
$this->figurerAnnuaireInternet = $figurerAnnuaireInternet;
return $this;
}
public function getStatutPaiment(): ?bool
{
return $this->statutPaiement;
}
public function setStatutPaiment(?bool $statutPaiement): self
{
$this->statutPaiement = $statutPaiement;
return $this;
}
public function getRaisonNonAdhesion(): ?string
{
return $this->raisonNonAdhesion;
}
public function setRaisonNonAdhesion(?string $raisonNonAdhesion): self
{
$this->raisonNonAdhesion = $raisonNonAdhesion;
return $this;
}
public function getDateCessation(): ?DateTimeInterface
{
return $this->dateCessation;
}
public function setDateCessation(?DateTimeInterface $dateCessation): self
{
$this->dateCessation = $dateCessation;
return $this;
}
public function getChiffreDernierTotal(): ?string
{
return $this->chiffreDernierTotal;
}
public function setChiffreDernierTotal(?string $chiffreDernierTotal): self
{
$this->chiffreDernierTotal = $chiffreDernierTotal;
return $this;
}
public function getCommentaires(): ?string
{
return $this->commentaires;
}
public function setCommentaires(?string $commentaires): self
{
$this->commentaires = $commentaires;
return $this;
}
public function getCommissions(): Collection
{
return $this->commissions;
}
public function addCommission(Commission $commission): self
{
if (!$this->commissions->contains($commission)) {
$this->commissions[] = $commission;
}
return $this;
}
public function removeCommission(Commission $commission): self
{
if ($this->commissions->contains($commission)) {
$this->commissions->removeElement($commission);
}
return $this;
}
public function getGroupeEntreprise(): ?GroupeEntreprise
{
return $this->groupeEntreprise;
}
public function setGroupeEntreprise(?GroupeEntreprise $groupeEntreprise): self
{
$this->groupeEntreprise = $groupeEntreprise;
return $this;
}
public function getDepartement(): ?Departement
{
return $this->departement;
}
public function setDepartement(?Departement $departement): self
{
$this->departement = $departement;
return $this;
}
/*public function getStatutAdherent(): ?statutAdherent
{
return $this->statutAdherent;
}
public function setStatutAdherent(?statutAdherent $statutAdherent): self
{
$this->statutAdherent = $statutAdherent;
return $this;
}*/
public function getSyndicat(): ?Syndicat
{
return $this->syndicat;
}
public function setSyndicat(?Syndicat $syndicat): self
{
$this->syndicat = $syndicat;
return $this;
}
public function setFigurerAuNomDe($figurerAuNomDe)
{
$this->figurerAuNomDe = $figurerAuNomDe;
return $this;
}
public function getFigurerAuNomDe()
{
return $this->figurerAuNomDe;
}
public function getEtablissements(): Collection
{
return $this->etablissements;
}
public function addEtablissement(Etablissement $etablissement): self
{
if (!$this->etablissements->contains($etablissement)) {
$this->etablissements[] = $etablissement;
$etablissement->setEntreprise($this);
}
return $this;
}
public function removeEtablissement(Etablissement $etablissement): self
{
if ($this->etablissements->contains($etablissement)) {
$this->etablissements->removeElement($etablissement);
// set the owning side to null (unless already changed)
if ($etablissement->getEntreprise() === $this) {
$etablissement->setEntreprise(null);
}
}
return $this;
}
/*public function getContacts(): Collection
{
return $this->contacts;
}
public function addContact(Contact $contact): self
{
if (!$this->contacts->contains($contact)) {
$this->contacts[] = $contact;
}
return $this;
}
public function removeContact(Contact $contact): self
{
if ($this->contacts->contains($contact)) {
$this->contacts->removeElement($contact);
}
return $this;
}*/
public function getTransporteur(): ?EntrepriseTransporteur
{
return $this->transporteur;
}
public function setTransporteur(?EntrepriseTransporteur $transporteur): self
{
$this->transporteur = $transporteur;
return $this;
}
public function getTransportPourAutrui(): ?bool
{
return $this->transportPourAutrui;
}
public function setTransportPourAutrui(?bool $transportPourAutrui): self
{
$this->transportPourAutrui = $transportPourAutrui;
return $this;
}
public function getStatutPaiement(): ?bool
{
return $this->statutPaiement;
}
public function setStatutPaiement(?bool $statutPaiement): self
{
$this->statutPaiement = $statutPaiement;
return $this;
}
public function getIsTransporter(): ?bool
{
return $this->isTransporter;
}
public function setIsTransporter(bool $isTransporter): self
{
$this->isTransporter = $isTransporter;
return $this;
}
public function getLienUrl(): ?string
{
return $this->lienUrl;
}
public function setLienUrl(?string $lienUrl): self
{
$this->lienUrl = $lienUrl;
return $this;
}
public function getCommissionEntreprises(): Collection
{
return $this->commissionEntreprises;
}
public function addCommissionEntreprise(CommissionEntreprise $commissionEntreprise): self
{
if (!$this->commissionEntreprises->contains($commissionEntreprise)) {
$this->commissionEntreprises[] = $commissionEntreprise;
$commissionEntreprise->setEntreprise($this);
}
return $this;
}
public function removeCommissionEntreprise(CommissionEntreprise $commissionEntreprise): self
{
if ($this->commissionEntreprises->contains($commissionEntreprise)) {
$this->commissionEntreprises->removeElement($commissionEntreprise);
// set the owning side to null (unless already changed)
if ($commissionEntreprise->getEntreprise() === $this) {
$commissionEntreprise->setEntreprise(null);
}
}
return $this;
}
/*public function etablissementExists(): ?bool
{
return $this->etablissementExists;
}
public function setEtablissementExists(?bool $etablissementExists): self
{
$this->etablissementExists = $etablissementExists;
return $this;
}
public function contactResponsableExists(): ?bool
{
return $this->contactResponsableExists;
}
public function setContactResponsableExists(?bool $contactResponsableExists): self
{
$this->contactResponsableExists = $contactResponsableExists;
return $this;
}*/
public function getCotisations(): Collection
{
return $this->cotisations;
}
public function getCotisationByYear(int $year): bool|Cotisation
{
return $this->cotisations->filter(function(Cotisation $cotisation) use ($year) {
return (int) trim($cotisation->getYear()) == $year;
})->current();
}
public function addCotisation(Cotisation $cotisation): self
{
if (!$this->cotisations->contains($cotisation)) {
$this->cotisations[] = $cotisation;
$cotisation->setEntreprise($this);
}
return $this;
}
public function removeCotisation(Cotisation $cotisation): self
{
if ($this->cotisations->contains($cotisation)) {
$this->cotisations->removeElement($cotisation);
// set the owning side to null (unless already changed)
if ($cotisation->getEntreprise() === $this) {
$cotisation->setEntreprise(null);
}
}
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getCodePostal(): ?string
{
return $this->codePostal;
}
public function setCodePostal(?string $codePostal): self
{
$this->codePostal = $codePostal;
return $this;
}
public function getAdresse2(): ?string
{
return $this->adresse2;
}
public function setAdresse2(?string $adresse2): self
{
$this->adresse2 = $adresse2;
return $this;
}
/*public function getActivity(): Collection
{
return $this->activity;
}
public function addActivity(Activity $activity): self
{
if (!$this->activity->contains($activity)) {
$this->activity[] = $activity;
}
return $this;
}
public function removeActivity(Activity $activity): self
{
if ($this->activity->contains($activity)) {
$this->activity->removeElement($activity);
}
return $this;
}*/
public function getNombreVeaux(): ?string
{
return $this->nombreVeaux;
}
public function setNombreVeaux(?string $nombreVeaux): self
{
$this->nombreVeaux = $nombreVeaux;
return $this;
}
public function getNombreMaigres(): ?string
{
return $this->nombreMaigres;
}
public function setNombreMaigres(?string $nombreMaigres): self
{
$this->nombreMaigres = $nombreMaigres;
return $this;
}
public function getNombreElevProd(): ?string
{
return $this->nombreElevProd;
}
public function setNombreElevProd(?string $nombreElevProd): self
{
$this->nombreElevProd = $nombreElevProd;
return $this;
}
public function getNombreBoucherie(): ?string
{
return $this->nombreBoucherie;
}
public function setNombreBoucherie(?string $nombreBoucherie): self
{
$this->nombreBoucherie = $nombreBoucherie;
return $this;
}
public function getNombreOvins(): ?string
{
return $this->nombreOvins;
}
public function setNombreOvins(?string $nombreOvins): self
{
$this->nombreOvins = $nombreOvins;
return $this;
}
public function getNombrePorcins(): ?string
{
return $this->nombrePorcins;
}
public function setNombrePorcins(?string $nombrePorcins): self
{
$this->nombrePorcins = $nombrePorcins;
return $this;
}
public function getNombreEquins(): ?string
{
return $this->nombreEquins;
}
public function setNombreEquins(?string $nombreEquins): self
{
$this->nombreEquins = $nombreEquins;
return $this;
}
public function getNombreCaprins(): ?string
{
return $this->nombreCaprins;
}
public function setNombreCaprins(?string $nombreCaprins): self
{
$this->nombreCaprins = $nombreCaprins;
return $this;
}
public function getAutreActivite(): ?string
{
return $this->autreActivite;
}
public function setAutreActivite(?string $autreActivite): self
{
$this->autreActivite = $autreActivite;
return $this;
}
public function getContactResponsable(): ?Contact
{
return $this->contactResponsable;
}
public function setContactResponsable(?Contact $contactResponsable): self
{
$this->contactResponsable = $contactResponsable;
return $this;
}
public function getCodeAdherent(): ?string
{
return $this->codeAdherent;
}
public function setCodeAdherent(?string $codeAdherent): self
{
$this->codeAdherent = $codeAdherent;
return $this;
}
public function getAncienIdentifiant()
{
return $this->ancienIdentifiant;
}
public function setAncienIdentifiant($ancienIdentifiant): void
{
$this->ancienIdentifiant = $ancienIdentifiant;
}
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders->add($order);
$order->setFirm($this);
}
return $this;
}
public function removeOrder(Order $order): self
{
if ($this->orders->removeElement($order)) {
// set the owning side to null (unless already changed)
if ($order->getFirm() === $this) {
$order->setFirm(null);
}
}
return $this;
}
public function getContacts(): Collection
{
return $this->contacts;
}
public function addContact(Contact $contact): self
{
if (!$this->contacts->contains($contact)) {
$this->contacts->add($contact);
$contact->setFirm($this);
}
return $this;
}
public function removeContact(Contact $contact): self
{
if ($this->contacts->removeElement($contact)) {
// set the owning side to null (unless already changed)
if ($contact->getFirm() === $this) {
$contact->setFirm(null);
}
}
return $this;
}
public function getContactsEnabled(): Collection
{
return $this->contacts->filter(function (Contact $contact) {
return $contact->getStatus() === EntityStatus::STATUS_ENABLED;
});
}
public function getContactResponsableInContacts(): bool|Contact
{
return $this->contacts->filter(function($contact) {
return !is_null($contact->getIsResponsible()) && $contact->getIsResponsible() === true;
})->current();
}
public function getHomeRegion(): ?Region
{
return $this->homeRegion;
}
public function setHomeRegion(?Region $homeRegion): self
{
$this->homeRegion = $homeRegion;
return $this;
}
public function isIsQualiNegoce(): ?bool
{
return $this->isQualiNegoce;
}
public function setIsQualiNegoce(bool $isQualiNegoce): self
{
$this->isQualiNegoce = $isQualiNegoce;
return $this;
}
public function getQualiNegoceCertificationDate(): ?DateTimeInterface
{
return $this->qualiNegoceCertificationDate;
}
public function setQualiNegoceCertificationDate(?DateTimeInterface $qualiNegoceCertificationDate): self
{
$this->qualiNegoceCertificationDate = $qualiNegoceCertificationDate;
return $this;
}
public function getQualiNegoceContactName(): ?string
{
return $this->qualiNegoceContactName;
}
public function setQualiNegoceContactName(?string $qualiNegoceContactName): self
{
$this->qualiNegoceContactName = $qualiNegoceContactName;
return $this;
}
public function getCommission(): ?Commission
{
return $this->commission;
}
public function setCommission(?Commission $commission): self
{
$this->commission = $commission;
return $this;
}
/**
* @return Collection<int, EntrepriseActivity>
*/
public function getEntrepriseActivities(): Collection
{
return $this->entrepriseActivities;
}
public function addEntrepriseActivity(EntrepriseActivity $entrepriseActivity): self
{
if (!$this->entrepriseActivities->contains($entrepriseActivity)) {
$this->entrepriseActivities->add($entrepriseActivity);
$entrepriseActivity->setEntreprise($this);
}
return $this;
}
public function removeEntrepriseActivity(EntrepriseActivity $entrepriseActivity): self
{
if ($this->entrepriseActivities->removeElement($entrepriseActivity)) {
// set the owning side to null (unless already changed)
if ($entrepriseActivity->getEntreprise() === $this) {
$entrepriseActivity->setEntreprise(null);
}
}
return $this;
}
public function getRaisonNonAdhesionAutre(): ?string
{
return $this->raison_non_adhesion_autre;
}
public function setRaisonNonAdhesionAutre(?string $raison_non_adhesion_autre): self
{
$this->raison_non_adhesion_autre = $raison_non_adhesion_autre;
return $this;
}
public function getTotalCountSpecies(): ?int
{
return $this->totalCountSpecies;
}
public function setTotalCountSpecies(int $totalCountSpecies): self
{
$this->totalCountSpecies = $totalCountSpecies;
return $this;
}
/**
* @return Collection<int, FirmQualiNegoceDocument>
*/
public function getFirmQualiNegoceDocuments(): Collection
{
return $this->firmQualiNegoceDocuments;
}
public function addFirmQualiNegoceDocument(FirmQualiNegoceDocument $firmQualiNegoceDocument): self
{
if (!$this->firmQualiNegoceDocuments->contains($firmQualiNegoceDocument)) {
$this->firmQualiNegoceDocuments->add($firmQualiNegoceDocument);
$firmQualiNegoceDocument->setFirm($this);
}
return $this;
}
public function removeFirmQualiNegoceDocument(FirmQualiNegoceDocument $firmQualiNegoceDocument): self
{
if ($this->firmQualiNegoceDocuments->removeElement($firmQualiNegoceDocument)) {
// set the owning side to null (unless already changed)
if ($firmQualiNegoceDocument->getFirm() === $this) {
$firmQualiNegoceDocument->setFirm(null);
}
}
return $this;
}
public function getQualiNegocePreAuditDate(): ?\DateTimeInterface
{
return $this->qualiNegocePreAuditDate;
}
public function setQualiNegocePreAuditDate(?\DateTimeInterface $qualiNegocePreAuditDate): self
{
$this->qualiNegocePreAuditDate = $qualiNegocePreAuditDate;
return $this;
}
public function getQualiNegoceContact(): ?Contact
{
return $this->qualiNegoceContact;
}
public function setQualiNegoceContact(?Contact $qualiNegoceContact): self
{
$this->qualiNegoceContact = $qualiNegoceContact;
return $this;
}
public function getFirmType(): ?FirmType
{
return $this->firmType;
}
public function setFirmType(?FirmType $firmType): self
{
$this->firmType = $firmType;
return $this;
}
/**
* @return Collection<int, CotisationNotification>
*/
public function getCotisationNotifications(): Collection
{
return $this->cotisationNotifications;
}
public function addCotisationNotification(CotisationNotification $cotisationNotification): self
{
if (!$this->cotisationNotifications->contains($cotisationNotification)) {
$this->cotisationNotifications->add($cotisationNotification);
$cotisationNotification->setFirm($this);
}
return $this;
}
public function removeCotisationNotification(CotisationNotification $cotisationNotification): self
{
if ($this->cotisationNotifications->removeElement($cotisationNotification)) {
// set the owning side to null (unless already changed)
if ($cotisationNotification->getFirm() === $this) {
$cotisationNotification->setFirm(null);
}
}
return $this;
}
public function isIsMember(): ?bool
{
return $this->isMember;
}
public function setIsMember(bool $isMember): self
{
$this->isMember = $isMember;
return $this;
}
/**
* @return Collection<int, FormUser>
*/
public function getFormUsers(): Collection
{
return $this->formUsers;
}
public function addFormUser(FormUser $formUser): self
{
if (!$this->formUsers->contains($formUser)) {
$this->formUsers->add($formUser);
$formUser->setFirm($this);
}
return $this;
}
public function removeFormUser(FormUser $formUser): self
{
if ($this->formUsers->removeElement($formUser)) {
// set the owning side to null (unless already changed)
if ($formUser->getFirm() === $this) {
$formUser->setFirm(null);
}
}
return $this;
}
/**
* @return Collection<int, FirmContactQualiNegoce>
*/
public function getFirmContactQualiNegoces(): Collection
{
return $this->firmContactQualiNegoces;
}
public function addFirmContactQualiNegoce(FirmContactQualiNegoce $firmContactQualiNegoce): self
{
if (!$this->firmContactQualiNegoces->contains($firmContactQualiNegoce)) {
$this->firmContactQualiNegoces->add($firmContactQualiNegoce);
$firmContactQualiNegoce->setFirm($this);
}
return $this;
}
public function removeFirmContactQualiNegoce(FirmContactQualiNegoce $firmContactQualiNegoce): self
{
if ($this->firmContactQualiNegoces->removeElement($firmContactQualiNegoce)) {
// set the owning side to null (unless already changed)
if ($firmContactQualiNegoce->getFirm() === $this) {
$firmContactQualiNegoce->setFirm(null);
}
}
return $this;
}
}