src/Entity/Entreprise.php line 13
<?phpnamespace App\Entity;use App\Repository\EntrepriseRepository;use App\Traits\TimeStampTrait;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: EntrepriseRepository::class)]#[ORM\HasLifecycleCallbacks]class Entreprise{use TimeStampTrait;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 100)]private ?string $code = null;#[ORM\Column(length: 100)]private ?string $name = null;#[ORM\Column(length: 255, nullable: true)]private ?string $adress = null;#[ORM\Column(length: 100, nullable: true)]private ?string $email = null;#[ORM\Column(length: 50, nullable: true)]private ?string $phone = null;#[ORM\Column(length: 100, nullable: true)]private ?string $pseudo = null;#[ORM\Column(length: 255, nullable: true)]private ?string $description = null;#[ORM\Column(length: 50, nullable: true)]private ?string $rccm = null;#[ORM\Column(length: 100, nullable: true)]private ?string $icon = null;#[ORM\Column(nullable: true)]private ?bool $status = null;#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: User::class)]private Collection $users;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Role::class)]private Collection $roles;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: CategoryResidence::class)]private Collection $categoryResidences;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: ResidenceImmeuble::class)]private Collection $residenceImmeubles;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: PaymentGenerator::class)]private Collection $paymentGenerators;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Prestataire::class)]private Collection $prestataires;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Incident::class)]private Collection $incidents;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Template::class)]private Collection $templates;#[ORM\Column(nullable: true)]private ?bool $smsservice = null;#[ORM\Column(nullable: true)]private ?bool $invoiceservice = null;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: PaymentGaranty::class)]private Collection $paymentGaranties;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: IncidentUpdate::class)]private Collection $incidentUpdates;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Service::class)]private Collection $services;#[ORM\ManyToOne(inversedBy: 'entreprises')]private ?Admin $admin = null;#[ORM\Column(length: 50, nullable: true)]private ?string $idnat = null;#[ORM\Column(length: 50, nullable: true)]private ?string $numeroimpot = null;#[ORM\ManyToOne(inversedBy: 'entreprises')]private ?Country $country = null;#[ORM\Column(length: 50, nullable: true)]private ?string $city = null;#[ORM\Column(length: 50, nullable: true)]private ?string $province = null;#[ORM\Column(nullable: true)]private ?int $nbrebiensimmobiliers = null;#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: Subscription::class)]private Collection $subscriptions;#[ORM\Column(nullable: true)]private ?bool $freeTrail = null;#[ORM\ManyToOne(inversedBy: 'entreprises')]private ?Package $package = null;#[ORM\Column(length: 25, nullable: true)]private ?string $period = null;#[ORM\Column]private ?bool $recallpaymentnotification = null;#[ORM\Column(length: 255, nullable: true)]private ?string $smartPaykey = null;#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: Announcement::class)]private Collection $announcements;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: CashJournal::class)]private Collection $cashJournals;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: CashJournalEntry::class)]private Collection $cashJournalEntries;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Charge::class)]private Collection $charges;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: ChargeAllocation::class)]private Collection $chargeAllocations;#[ORM\Column(nullable: true)]private ?bool $makeJournal = null;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Log::class)]private Collection $logs;#[ORM\OneToMany(mappedBy: 'marchand', targetEntity: Reservation::class)]private Collection $reservations;#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: UserEntreprise::class)]private Collection $userEntreprises;#[ORM\ManyToOne(inversedBy: 'entreprises')]private ?User $owner = null;public function __construct(){$this->users = new ArrayCollection();$this->roles = new ArrayCollection();$this->categoryResidences = new ArrayCollection();$this->residenceImmeubles = new ArrayCollection();$this->paymentGenerators = new ArrayCollection();$this->prestataires = new ArrayCollection();$this->incidents = new ArrayCollection();$this->templates = new ArrayCollection();$this->paymentGaranties = new ArrayCollection();$this->incidentUpdates = new ArrayCollection();$this->services = new ArrayCollection();$this->subscriptions = new ArrayCollection();$this->announcements = new ArrayCollection();$this->cashJournals = new ArrayCollection();$this->cashJournalEntries = new ArrayCollection();$this->charges = new ArrayCollection();$this->chargeAllocations = new ArrayCollection();$this->logs = new ArrayCollection();$this->reservations = new ArrayCollection();$this->userEntreprises = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getCode(): ?string{return $this->code;}public function setCode(string $code): static{$this->code = $code;return $this;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getAdress(): ?string{return $this->adress;}public function setAdress(?string $adress): static{$this->adress = $adress;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(?string $email): static{$this->email = $email;return $this;}public function getPhone(): ?string{return $this->phone;}public function setPhone(?string $phone): static{$this->phone = $phone;return $this;}public function getPseudo(): ?string{return $this->pseudo;}public function setPseudo(?string $pseudo): static{$this->pseudo = $pseudo;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): static{$this->description = $description;return $this;}public function getRccm(): ?string{return $this->rccm;}public function setRccm(?string $rccm): static{$this->rccm = $rccm;return $this;}public function getIcon(): ?string{return $this->icon;}public function setIcon(?string $icon): static{$this->icon = $icon;return $this;}public function isStatus(): ?bool{return $this->status;}public function setStatus(?bool $status): static{$this->status = $status;return $this;}public function __toString(): string{return $this->name;}/*** @return Collection<int, User>*/public function getUsers(): Collection{return $this->users;}public function addUser(User $user): static{if (!$this->users->contains($user)) {$this->users->add($user);$user->setEntreprise($this);}return $this;}public function removeUser(User $user): static{if ($this->users->removeElement($user)) {// set the owning side to null (unless already changed)if ($user->getEntreprise() === $this) {$user->setEntreprise(null);}}return $this;}/*** @return Collection<int, Role>*/public function getRoles(): Collection{return $this->roles;}public function addRole(Role $role): static{if (!$this->roles->contains($role)) {$this->roles->add($role);$role->setMarchand($this);}return $this;}public function removeRole(Role $role): static{if ($this->roles->removeElement($role)) {// set the owning side to null (unless already changed)if ($role->getMarchand() === $this) {$role->setMarchand(null);}}return $this;}/*** @return Collection<int, CategoryResidence>*/public function getCategoryResidences(): Collection{return $this->categoryResidences;}public function addCategoryResidence(CategoryResidence $categoryResidence): static{if (!$this->categoryResidences->contains($categoryResidence)) {$this->categoryResidences->add($categoryResidence);$categoryResidence->setMarchand($this);}return $this;}public function removeCategoryResidence(CategoryResidence $categoryResidence): static{if ($this->categoryResidences->removeElement($categoryResidence)) {// set the owning side to null (unless already changed)if ($categoryResidence->getMarchand() === $this) {$categoryResidence->setMarchand(null);}}return $this;}/*** @return Collection<int, ResidenceImmeuble>*/public function getResidenceImmeubles(): Collection{return $this->residenceImmeubles;}public function addResidenceImmeuble(ResidenceImmeuble $residenceImmeuble): static{if (!$this->residenceImmeubles->contains($residenceImmeuble)) {$this->residenceImmeubles->add($residenceImmeuble);$residenceImmeuble->setMarchand($this);}return $this;}public function removeResidenceImmeuble(ResidenceImmeuble $residenceImmeuble): static{if ($this->residenceImmeubles->removeElement($residenceImmeuble)) {// set the owning side to null (unless already changed)if ($residenceImmeuble->getMarchand() === $this) {$residenceImmeuble->setMarchand(null);}}return $this;}/*** @return Collection<int, PaymentGenerator>*/public function getPaymentGenerators(): Collection{return $this->paymentGenerators;}public function addPaymentGenerator(PaymentGenerator $paymentGenerator): static{if (!$this->paymentGenerators->contains($paymentGenerator)) {$this->paymentGenerators->add($paymentGenerator);$paymentGenerator->setMarchand($this);}return $this;}public function removePaymentGenerator(PaymentGenerator $paymentGenerator): static{if ($this->paymentGenerators->removeElement($paymentGenerator)) {// set the owning side to null (unless already changed)if ($paymentGenerator->getMarchand() === $this) {$paymentGenerator->setMarchand(null);}}return $this;}/*** @return Collection<int, Prestataire>*/public function getPrestataires(): Collection{return $this->prestataires;}public function addPrestataire(Prestataire $prestataire): static{if (!$this->prestataires->contains($prestataire)) {$this->prestataires->add($prestataire);$prestataire->setMarchand($this);}return $this;}public function removePrestataire(Prestataire $prestataire): static{if ($this->prestataires->removeElement($prestataire)) {// set the owning side to null (unless already changed)if ($prestataire->getMarchand() === $this) {$prestataire->setMarchand(null);}}return $this;}/*** @return Collection<int, Incident>*/public function getIncidents(): Collection{return $this->incidents;}public function addIncident(Incident $incident): static{if (!$this->incidents->contains($incident)) {$this->incidents->add($incident);$incident->setMarchand($this);}return $this;}public function removeIncident(Incident $incident): static{if ($this->incidents->removeElement($incident)) {// set the owning side to null (unless already changed)if ($incident->getMarchand() === $this) {$incident->setMarchand(null);}}return $this;}/*** @return Collection<int, Template>*/public function getTemplates(): Collection{return $this->templates;}public function addTemplate(Template $template): static{if (!$this->templates->contains($template)) {$this->templates->add($template);$template->setMarchand($this);}return $this;}public function removeTemplate(Template $template): static{if ($this->templates->removeElement($template)) {// set the owning side to null (unless already changed)if ($template->getMarchand() === $this) {$template->setMarchand(null);}}return $this;}public function isSmsservice(): ?bool{return $this->smsservice;}public function setSmsservice(?bool $smsservice): static{$this->smsservice = $smsservice;return $this;}public function isInvoiceservice(): ?bool{return $this->invoiceservice;}public function setInvoiceservice(?bool $invoiceservice): static{$this->invoiceservice = $invoiceservice;return $this;}/*** @return Collection<int, PaymentGaranty>*/public function getPaymentGaranties(): Collection{return $this->paymentGaranties;}public function addPaymentGaranty(PaymentGaranty $paymentGaranty): static{if (!$this->paymentGaranties->contains($paymentGaranty)) {$this->paymentGaranties->add($paymentGaranty);$paymentGaranty->setMarchand($this);}return $this;}public function removePaymentGaranty(PaymentGaranty $paymentGaranty): static{if ($this->paymentGaranties->removeElement($paymentGaranty)) {// set the owning side to null (unless already changed)if ($paymentGaranty->getMarchand() === $this) {$paymentGaranty->setMarchand(null);}}return $this;}/*** @return Collection<int, IncidentUpdate>*/public function getIncidentUpdates(): Collection{return $this->incidentUpdates;}public function addIncidentUpdate(IncidentUpdate $incidentUpdate): static{if (!$this->incidentUpdates->contains($incidentUpdate)) {$this->incidentUpdates->add($incidentUpdate);$incidentUpdate->setMarchand($this);}return $this;}public function removeIncidentUpdate(IncidentUpdate $incidentUpdate): static{if ($this->incidentUpdates->removeElement($incidentUpdate)) {// set the owning side to null (unless already changed)if ($incidentUpdate->getMarchand() === $this) {$incidentUpdate->setMarchand(null);}}return $this;}/*** @return Collection<int, Service>*/public function getServices(): Collection{return $this->services;}public function addService(Service $service): static{if (!$this->services->contains($service)) {$this->services->add($service);$service->setMarchand($this);}return $this;}public function removeService(Service $service): static{if ($this->services->removeElement($service)) {// set the owning side to null (unless already changed)if ($service->getMarchand() === $this) {$service->setMarchand(null);}}return $this;}public function getAdmin(): ?Admin{return $this->admin;}public function setAdmin(?Admin $admin): static{$this->admin = $admin;return $this;}public function getIdnat(): ?string{return $this->idnat;}public function setIdnat(?string $idnat): static{$this->idnat = $idnat;return $this;}public function getNumeroimpot(): ?string{return $this->numeroimpot;}public function setNumeroimpot(?string $numeroimpot): static{$this->numeroimpot = $numeroimpot;return $this;}public function getCountry(): ?Country{return $this->country;}public function setCountry(?Country $country): static{$this->country = $country;return $this;}public function getCity(): ?string{return $this->city;}public function setCity(?string $city): static{$this->city = $city;return $this;}public function getProvince(): ?string{return $this->province;}public function setProvince(?string $province): static{$this->province = $province;return $this;}public function getNbrebiensimmobiliers(): ?int{return $this->nbrebiensimmobiliers;}public function setNbrebiensimmobiliers(?int $nbrebiensimmobiliers): static{$this->nbrebiensimmobiliers = $nbrebiensimmobiliers;return $this;}/*** @return Collection<int, Subscription>*/public function getSubscriptions(): Collection{return $this->subscriptions;}public function addSubscription(Subscription $subscription): static{if (!$this->subscriptions->contains($subscription)) {$this->subscriptions->add($subscription);$subscription->setEntreprise($this);}return $this;}public function removeEntreprisePackage(Subscription $subscription): static{if ($this->subscriptions->removeElement($subscription)) {// set the owning side to null (unless already changed)if ($subscription->getEntreprise() === $this) {$subscription->setEntreprise(null);}}return $this;}public function isFreeTrail(): ?bool{return $this->freeTrail;}public function setFreeTrail(?bool $freeTrail): static{$this->freeTrail = $freeTrail;return $this;}public function getPackage(): ?Package{return $this->package;}public function setPackage(?Package $package): static{$this->package = $package;return $this;}public function getPeriod(): ?string{return $this->period;}public function setPeriod(?string $period): static{$this->period = $period;return $this;}public function isRecallpaymentnotification(): ?bool{return $this->recallpaymentnotification;}public function setRecallpaymentnotification(bool $recallpaymentnotification): static{$this->recallpaymentnotification = $recallpaymentnotification;return $this;}public function getSmartPaykey(): ?string{return $this->smartPaykey;}public function setSmartPaykey(?string $smartPaykey): void{$this->smartPaykey = $smartPaykey;}/*** @return Collection<int, Announcement>*/public function getAnnouncements(): Collection{return $this->announcements;}public function addAnnouncement(Announcement $announcement): static{if (!$this->announcements->contains($announcement)) {$this->announcements->add($announcement);$announcement->setEntreprise($this);}return $this;}public function removeAnnouncement(Announcement $announcement): static{if ($this->announcements->removeElement($announcement)) {// set the owning side to null (unless already changed)if ($announcement->getEntreprise() === $this) {$announcement->setEntreprise(null);}}return $this;}/*** @return Collection<int, CashJournal>*/public function getCashJournals(): Collection{return $this->cashJournals;}public function addCashJournal(CashJournal $cashJournal): static{if (!$this->cashJournals->contains($cashJournal)) {$this->cashJournals->add($cashJournal);$cashJournal->setMarchand($this);}return $this;}public function removeCashJournal(CashJournal $cashJournal): static{if ($this->cashJournals->removeElement($cashJournal)) {// set the owning side to null (unless already changed)if ($cashJournal->getMarchand() === $this) {$cashJournal->setMarchand(null);}}return $this;}/*** @return Collection<int, CashJournalEntry>*/public function getCashJournalEntries(): Collection{return $this->cashJournalEntries;}public function addCashJournalEntry(CashJournalEntry $cashJournalEntry): static{if (!$this->cashJournalEntries->contains($cashJournalEntry)) {$this->cashJournalEntries->add($cashJournalEntry);$cashJournalEntry->setMarchand($this);}return $this;}public function removeCashJournalEntry(CashJournalEntry $cashJournalEntry): static{if ($this->cashJournalEntries->removeElement($cashJournalEntry)) {// set the owning side to null (unless already changed)if ($cashJournalEntry->getMarchand() === $this) {$cashJournalEntry->setMarchand(null);}}return $this;}/*** @return Collection<int, Charge>*/public function getCharges(): Collection{return $this->charges;}public function addCharge(Charge $charge): static{if (!$this->charges->contains($charge)) {$this->charges->add($charge);$charge->setMarchand($this);}return $this;}public function removeCharge(Charge $charge): static{if ($this->charges->removeElement($charge)) {// set the owning side to null (unless already changed)if ($charge->getMarchand() === $this) {$charge->setMarchand(null);}}return $this;}/*** @return Collection<int, ChargeAllocation>*/public function getChargeAllocations(): Collection{return $this->chargeAllocations;}public function addChargeAllocation(ChargeAllocation $chargeAllocation): static{if (!$this->chargeAllocations->contains($chargeAllocation)) {$this->chargeAllocations->add($chargeAllocation);$chargeAllocation->setMarchand($this);}return $this;}public function removeChargeAllocation(ChargeAllocation $chargeAllocation): static{if ($this->chargeAllocations->removeElement($chargeAllocation)) {// set the owning side to null (unless already changed)if ($chargeAllocation->getMarchand() === $this) {$chargeAllocation->setMarchand(null);}}return $this;}public function isMakeJournal(): ?bool{return $this->makeJournal;}public function setMakeJournal(?bool $makeJournal): static{$this->makeJournal = $makeJournal;return $this;}/*** @return Collection<int, Log>*/public function getLogs(): Collection{return $this->logs;}public function addLog(Log $log): static{if (!$this->logs->contains($log)) {$this->logs->add($log);$log->setMarchand($this);}return $this;}public function removeLog(Log $log): static{if ($this->logs->removeElement($log)) {// set the owning side to null (unless already changed)if ($log->getMarchand() === $this) {$log->setMarchand(null);}}return $this;}/*** @return Collection<int, Reservation>*/public function getReservations(): Collection{return $this->reservations;}public function addReservation(Reservation $reservation): static{if (!$this->reservations->contains($reservation)) {$this->reservations->add($reservation);$reservation->setMarchand($this);}return $this;}public function removeReservation(Reservation $reservation): static{if ($this->reservations->removeElement($reservation)) {// set the owning side to null (unless already changed)if ($reservation->getMarchand() === $this) {$reservation->setMarchand(null);}}return $this;}/*** @return Collection<int, UserEntreprise>*/public function getUserEntreprises(): Collection{return $this->userEntreprises;}public function addUserEntreprise(UserEntreprise $userEntreprise): static{if (!$this->userEntreprises->contains($userEntreprise)) {$this->userEntreprises->add($userEntreprise);$userEntreprise->setEntreprise($this);}return $this;}public function removeUserEntreprise(UserEntreprise $userEntreprise): static{if ($this->userEntreprises->removeElement($userEntreprise)) {// set the owning side to null (unless already changed)if ($userEntreprise->getEntreprise() === $this) {$userEntreprise->setEntreprise(null);}}return $this;}public function getOwner(): ?User{return $this->owner;}public function setOwner(?User $owner): static{$this->owner = $owner;return $this;}}