src/Entity/Entreprise.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EntrepriseRepository;
  4. use App\Traits\TimeStampTrait;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassEntrepriseRepository::class)]
  9. #[ORM\HasLifecycleCallbacks]
  10. class Entreprise
  11. {
  12.     use TimeStampTrait;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length100)]
  18.     private ?string $code null;
  19.     #[ORM\Column(length100)]
  20.     private ?string $name null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $adress null;
  23.     #[ORM\Column(length100nullabletrue)]
  24.     private ?string $email null;
  25.     #[ORM\Column(length50nullabletrue)]
  26.     private ?string $phone null;
  27.     #[ORM\Column(length100nullabletrue)]
  28.     private ?string $pseudo null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $description null;
  31.     #[ORM\Column(length50nullabletrue)]
  32.     private ?string $rccm null;
  33.     #[ORM\Column(length100nullabletrue)]
  34.     private ?string $icon null;
  35.     #[ORM\Column(nullabletrue)]
  36.     private ?bool $status null;
  37.     #[ORM\OneToMany(mappedBy'entreprise'targetEntityUser::class)]
  38.     private Collection $users;
  39.     #[ORM\OneToMany(mappedBy'marchand'targetEntityRole::class)]
  40.     private Collection $roles;
  41.     #[ORM\OneToMany(mappedBy'marchand'targetEntityCategoryResidence::class)]
  42.     private Collection $categoryResidences;
  43.     #[ORM\OneToMany(mappedBy'marchand'targetEntityResidenceImmeuble::class)]
  44.     private Collection $residenceImmeubles;
  45.     #[ORM\OneToMany(mappedBy'marchand'targetEntityPaymentGenerator::class)]
  46.     private Collection $paymentGenerators;
  47.     #[ORM\OneToMany(mappedBy'marchand'targetEntityPrestataire::class)]
  48.     private Collection $prestataires;
  49.     #[ORM\OneToMany(mappedBy'marchand'targetEntityIncident::class)]
  50.     private Collection $incidents;
  51.     #[ORM\OneToMany(mappedBy'marchand'targetEntityTemplate::class)]
  52.     private Collection $templates;
  53.     #[ORM\Column(nullabletrue)]
  54.     private ?bool $smsservice null;
  55.     #[ORM\Column(nullabletrue)]
  56.     private ?bool $invoiceservice null;
  57.     #[ORM\OneToMany(mappedBy'marchand'targetEntityPaymentGaranty::class)]
  58.     private Collection $paymentGaranties;
  59.     #[ORM\OneToMany(mappedBy'marchand'targetEntityIncidentUpdate::class)]
  60.     private Collection $incidentUpdates;
  61.     #[ORM\OneToMany(mappedBy'marchand'targetEntityService::class)]
  62.     private Collection $services;
  63.     #[ORM\ManyToOne(inversedBy'entreprises')]
  64.     private ?Admin $admin null;
  65.     #[ORM\Column(length50nullabletrue)]
  66.     private ?string $idnat null;
  67.     #[ORM\Column(length50nullabletrue)]
  68.     private ?string $numeroimpot null;
  69.     #[ORM\ManyToOne(inversedBy'entreprises')]
  70.     private ?Country $country null;
  71.     #[ORM\Column(length50nullabletrue)]
  72.     private ?string $city null;
  73.     #[ORM\Column(length50nullabletrue)]
  74.     private ?string $province null;
  75.     #[ORM\Column(nullabletrue)]
  76.     private ?int $nbrebiensimmobiliers null;
  77.     #[ORM\OneToMany(mappedBy'entreprise'targetEntitySubscription::class)]
  78.     private Collection $subscriptions;
  79.     #[ORM\Column(nullabletrue)]
  80.     private ?bool $freeTrail null;
  81.     #[ORM\ManyToOne(inversedBy'entreprises')]
  82.     private ?Package $package null;
  83.     #[ORM\Column(length25nullabletrue)]
  84.     private ?string $period null;
  85.     #[ORM\Column]
  86.     private ?bool $recallpaymentnotification null;
  87.     #[ORM\Column(length255nullabletrue)]
  88.     private ?string $smartPaykey null;
  89.     #[ORM\OneToMany(mappedBy'entreprise'targetEntityAnnouncement::class)]
  90.     private Collection $announcements;
  91.     #[ORM\OneToMany(mappedBy'marchand'targetEntityCashJournal::class)]
  92.     private Collection $cashJournals;
  93.     #[ORM\OneToMany(mappedBy'marchand'targetEntityCashJournalEntry::class)]
  94.     private Collection $cashJournalEntries;
  95.     #[ORM\OneToMany(mappedBy'marchand'targetEntityCharge::class)]
  96.     private Collection $charges;
  97.     #[ORM\OneToMany(mappedBy'marchand'targetEntityChargeAllocation::class)]
  98.     private Collection $chargeAllocations;
  99.     #[ORM\Column(nullabletrue)]
  100.     private ?bool $makeJournal null;
  101.     #[ORM\OneToMany(mappedBy'marchand'targetEntityLog::class)]
  102.     private Collection $logs;
  103.     #[ORM\OneToMany(mappedBy'marchand'targetEntityReservation::class)]
  104.     private Collection $reservations;
  105.     #[ORM\OneToMany(mappedBy'entreprise'targetEntityUserEntreprise::class)]
  106.     private Collection $userEntreprises;
  107.     #[ORM\ManyToOne(inversedBy'entreprises')]
  108.     private ?User $owner null;
  109.     public function __construct()
  110.     {
  111.         $this->users = new ArrayCollection();
  112.         $this->roles = new ArrayCollection();
  113.         $this->categoryResidences = new ArrayCollection();
  114.         $this->residenceImmeubles = new ArrayCollection();
  115.         $this->paymentGenerators = new ArrayCollection();
  116.         $this->prestataires = new ArrayCollection();
  117.         $this->incidents = new ArrayCollection();
  118.         $this->templates = new ArrayCollection();
  119.         $this->paymentGaranties = new ArrayCollection();
  120.         $this->incidentUpdates = new ArrayCollection();
  121.         $this->services = new ArrayCollection();
  122.         $this->subscriptions = new ArrayCollection();
  123.         $this->announcements = new ArrayCollection();
  124.         $this->cashJournals = new ArrayCollection();
  125.         $this->cashJournalEntries = new ArrayCollection();
  126.         $this->charges = new ArrayCollection();
  127.         $this->chargeAllocations = new ArrayCollection();
  128.         $this->logs = new ArrayCollection();
  129.         $this->reservations = new ArrayCollection();
  130.         $this->userEntreprises = new ArrayCollection();
  131.     }
  132.     public function getId(): ?int
  133.     {
  134.         return $this->id;
  135.     }
  136.     public function getCode(): ?string
  137.     {
  138.         return $this->code;
  139.     }
  140.     public function setCode(string $code): static
  141.     {
  142.         $this->code $code;
  143.         return $this;
  144.     }
  145.     public function getName(): ?string
  146.     {
  147.         return $this->name;
  148.     }
  149.     public function setName(string $name): static
  150.     {
  151.         $this->name $name;
  152.         return $this;
  153.     }
  154.     public function getAdress(): ?string
  155.     {
  156.         return $this->adress;
  157.     }
  158.     public function setAdress(?string $adress): static
  159.     {
  160.         $this->adress $adress;
  161.         return $this;
  162.     }
  163.     public function getEmail(): ?string
  164.     {
  165.         return $this->email;
  166.     }
  167.     public function setEmail(?string $email): static
  168.     {
  169.         $this->email $email;
  170.         return $this;
  171.     }
  172.     public function getPhone(): ?string
  173.     {
  174.         return $this->phone;
  175.     }
  176.     public function setPhone(?string $phone): static
  177.     {
  178.         $this->phone $phone;
  179.         return $this;
  180.     }
  181.     public function getPseudo(): ?string
  182.     {
  183.         return $this->pseudo;
  184.     }
  185.     public function setPseudo(?string $pseudo): static
  186.     {
  187.         $this->pseudo $pseudo;
  188.         return $this;
  189.     }
  190.     public function getDescription(): ?string
  191.     {
  192.         return $this->description;
  193.     }
  194.     public function setDescription(?string $description): static
  195.     {
  196.         $this->description $description;
  197.         return $this;
  198.     }
  199.     public function getRccm(): ?string
  200.     {
  201.         return $this->rccm;
  202.     }
  203.     public function setRccm(?string $rccm): static
  204.     {
  205.         $this->rccm $rccm;
  206.         return $this;
  207.     }
  208.     public function getIcon(): ?string
  209.     {
  210.         return $this->icon;
  211.     }
  212.     public function setIcon(?string $icon): static
  213.     {
  214.         $this->icon $icon;
  215.         return $this;
  216.     }
  217.     public function isStatus(): ?bool
  218.     {
  219.         return $this->status;
  220.     }
  221.     public function setStatus(?bool $status): static
  222.     {
  223.         $this->status $status;
  224.         return $this;
  225.     }
  226.     public function __toString(): string
  227.     {
  228.         return $this->name;
  229.     }
  230.     /**
  231.      * @return Collection<int, User>
  232.      */
  233.     public function getUsers(): Collection
  234.     {
  235.         return $this->users;
  236.     }
  237.     public function addUser(User $user): static
  238.     {
  239.         if (!$this->users->contains($user)) {
  240.             $this->users->add($user);
  241.             $user->setEntreprise($this);
  242.         }
  243.         return $this;
  244.     }
  245.     public function removeUser(User $user): static
  246.     {
  247.         if ($this->users->removeElement($user)) {
  248.             // set the owning side to null (unless already changed)
  249.             if ($user->getEntreprise() === $this) {
  250.                 $user->setEntreprise(null);
  251.             }
  252.         }
  253.         return $this;
  254.     }
  255.     /**
  256.      * @return Collection<int, Role>
  257.      */
  258.     public function getRoles(): Collection
  259.     {
  260.         return $this->roles;
  261.     }
  262.     public function addRole(Role $role): static
  263.     {
  264.         if (!$this->roles->contains($role)) {
  265.             $this->roles->add($role);
  266.             $role->setMarchand($this);
  267.         }
  268.         return $this;
  269.     }
  270.     public function removeRole(Role $role): static
  271.     {
  272.         if ($this->roles->removeElement($role)) {
  273.             // set the owning side to null (unless already changed)
  274.             if ($role->getMarchand() === $this) {
  275.                 $role->setMarchand(null);
  276.             }
  277.         }
  278.         return $this;
  279.     }
  280.     /**
  281.      * @return Collection<int, CategoryResidence>
  282.      */
  283.     public function getCategoryResidences(): Collection
  284.     {
  285.         return $this->categoryResidences;
  286.     }
  287.     public function addCategoryResidence(CategoryResidence $categoryResidence): static
  288.     {
  289.         if (!$this->categoryResidences->contains($categoryResidence)) {
  290.             $this->categoryResidences->add($categoryResidence);
  291.             $categoryResidence->setMarchand($this);
  292.         }
  293.         return $this;
  294.     }
  295.     public function removeCategoryResidence(CategoryResidence $categoryResidence): static
  296.     {
  297.         if ($this->categoryResidences->removeElement($categoryResidence)) {
  298.             // set the owning side to null (unless already changed)
  299.             if ($categoryResidence->getMarchand() === $this) {
  300.                 $categoryResidence->setMarchand(null);
  301.             }
  302.         }
  303.         return $this;
  304.     }
  305.     /**
  306.      * @return Collection<int, ResidenceImmeuble>
  307.      */
  308.     public function getResidenceImmeubles(): Collection
  309.     {
  310.         return $this->residenceImmeubles;
  311.     }
  312.     public function addResidenceImmeuble(ResidenceImmeuble $residenceImmeuble): static
  313.     {
  314.         if (!$this->residenceImmeubles->contains($residenceImmeuble)) {
  315.             $this->residenceImmeubles->add($residenceImmeuble);
  316.             $residenceImmeuble->setMarchand($this);
  317.         }
  318.         return $this;
  319.     }
  320.     public function removeResidenceImmeuble(ResidenceImmeuble $residenceImmeuble): static
  321.     {
  322.         if ($this->residenceImmeubles->removeElement($residenceImmeuble)) {
  323.             // set the owning side to null (unless already changed)
  324.             if ($residenceImmeuble->getMarchand() === $this) {
  325.                 $residenceImmeuble->setMarchand(null);
  326.             }
  327.         }
  328.         return $this;
  329.     }
  330.     /**
  331.      * @return Collection<int, PaymentGenerator>
  332.      */
  333.     public function getPaymentGenerators(): Collection
  334.     {
  335.         return $this->paymentGenerators;
  336.     }
  337.     public function addPaymentGenerator(PaymentGenerator $paymentGenerator): static
  338.     {
  339.         if (!$this->paymentGenerators->contains($paymentGenerator)) {
  340.             $this->paymentGenerators->add($paymentGenerator);
  341.             $paymentGenerator->setMarchand($this);
  342.         }
  343.         return $this;
  344.     }
  345.     public function removePaymentGenerator(PaymentGenerator $paymentGenerator): static
  346.     {
  347.         if ($this->paymentGenerators->removeElement($paymentGenerator)) {
  348.             // set the owning side to null (unless already changed)
  349.             if ($paymentGenerator->getMarchand() === $this) {
  350.                 $paymentGenerator->setMarchand(null);
  351.             }
  352.         }
  353.         return $this;
  354.     }
  355.     /**
  356.      * @return Collection<int, Prestataire>
  357.      */
  358.     public function getPrestataires(): Collection
  359.     {
  360.         return $this->prestataires;
  361.     }
  362.     public function addPrestataire(Prestataire $prestataire): static
  363.     {
  364.         if (!$this->prestataires->contains($prestataire)) {
  365.             $this->prestataires->add($prestataire);
  366.             $prestataire->setMarchand($this);
  367.         }
  368.         return $this;
  369.     }
  370.     public function removePrestataire(Prestataire $prestataire): static
  371.     {
  372.         if ($this->prestataires->removeElement($prestataire)) {
  373.             // set the owning side to null (unless already changed)
  374.             if ($prestataire->getMarchand() === $this) {
  375.                 $prestataire->setMarchand(null);
  376.             }
  377.         }
  378.         return $this;
  379.     }
  380.     /**
  381.      * @return Collection<int, Incident>
  382.      */
  383.     public function getIncidents(): Collection
  384.     {
  385.         return $this->incidents;
  386.     }
  387.     public function addIncident(Incident $incident): static
  388.     {
  389.         if (!$this->incidents->contains($incident)) {
  390.             $this->incidents->add($incident);
  391.             $incident->setMarchand($this);
  392.         }
  393.         return $this;
  394.     }
  395.     public function removeIncident(Incident $incident): static
  396.     {
  397.         if ($this->incidents->removeElement($incident)) {
  398.             // set the owning side to null (unless already changed)
  399.             if ($incident->getMarchand() === $this) {
  400.                 $incident->setMarchand(null);
  401.             }
  402.         }
  403.         return $this;
  404.     }
  405.     /**
  406.      * @return Collection<int, Template>
  407.      */
  408.     public function getTemplates(): Collection
  409.     {
  410.         return $this->templates;
  411.     }
  412.     public function addTemplate(Template $template): static
  413.     {
  414.         if (!$this->templates->contains($template)) {
  415.             $this->templates->add($template);
  416.             $template->setMarchand($this);
  417.         }
  418.         return $this;
  419.     }
  420.     public function removeTemplate(Template $template): static
  421.     {
  422.         if ($this->templates->removeElement($template)) {
  423.             // set the owning side to null (unless already changed)
  424.             if ($template->getMarchand() === $this) {
  425.                 $template->setMarchand(null);
  426.             }
  427.         }
  428.         return $this;
  429.     }
  430.     public function isSmsservice(): ?bool
  431.     {
  432.         return $this->smsservice;
  433.     }
  434.     public function setSmsservice(?bool $smsservice): static
  435.     {
  436.         $this->smsservice $smsservice;
  437.         return $this;
  438.     }
  439.     public function isInvoiceservice(): ?bool
  440.     {
  441.         return $this->invoiceservice;
  442.     }
  443.     public function setInvoiceservice(?bool $invoiceservice): static
  444.     {
  445.         $this->invoiceservice $invoiceservice;
  446.         return $this;
  447.     }
  448.     /**
  449.      * @return Collection<int, PaymentGaranty>
  450.      */
  451.     public function getPaymentGaranties(): Collection
  452.     {
  453.         return $this->paymentGaranties;
  454.     }
  455.     public function addPaymentGaranty(PaymentGaranty $paymentGaranty): static
  456.     {
  457.         if (!$this->paymentGaranties->contains($paymentGaranty)) {
  458.             $this->paymentGaranties->add($paymentGaranty);
  459.             $paymentGaranty->setMarchand($this);
  460.         }
  461.         return $this;
  462.     }
  463.     public function removePaymentGaranty(PaymentGaranty $paymentGaranty): static
  464.     {
  465.         if ($this->paymentGaranties->removeElement($paymentGaranty)) {
  466.             // set the owning side to null (unless already changed)
  467.             if ($paymentGaranty->getMarchand() === $this) {
  468.                 $paymentGaranty->setMarchand(null);
  469.             }
  470.         }
  471.         return $this;
  472.     }
  473.     /**
  474.      * @return Collection<int, IncidentUpdate>
  475.      */
  476.     public function getIncidentUpdates(): Collection
  477.     {
  478.         return $this->incidentUpdates;
  479.     }
  480.     public function addIncidentUpdate(IncidentUpdate $incidentUpdate): static
  481.     {
  482.         if (!$this->incidentUpdates->contains($incidentUpdate)) {
  483.             $this->incidentUpdates->add($incidentUpdate);
  484.             $incidentUpdate->setMarchand($this);
  485.         }
  486.         return $this;
  487.     }
  488.     public function removeIncidentUpdate(IncidentUpdate $incidentUpdate): static
  489.     {
  490.         if ($this->incidentUpdates->removeElement($incidentUpdate)) {
  491.             // set the owning side to null (unless already changed)
  492.             if ($incidentUpdate->getMarchand() === $this) {
  493.                 $incidentUpdate->setMarchand(null);
  494.             }
  495.         }
  496.         return $this;
  497.     }
  498.     /**
  499.      * @return Collection<int, Service>
  500.      */
  501.     public function getServices(): Collection
  502.     {
  503.         return $this->services;
  504.     }
  505.     public function addService(Service $service): static
  506.     {
  507.         if (!$this->services->contains($service)) {
  508.             $this->services->add($service);
  509.             $service->setMarchand($this);
  510.         }
  511.         return $this;
  512.     }
  513.     public function removeService(Service $service): static
  514.     {
  515.         if ($this->services->removeElement($service)) {
  516.             // set the owning side to null (unless already changed)
  517.             if ($service->getMarchand() === $this) {
  518.                 $service->setMarchand(null);
  519.             }
  520.         }
  521.         return $this;
  522.     }
  523.     public function getAdmin(): ?Admin
  524.     {
  525.         return $this->admin;
  526.     }
  527.     public function setAdmin(?Admin $admin): static
  528.     {
  529.         $this->admin $admin;
  530.         return $this;
  531.     }
  532.     public function getIdnat(): ?string
  533.     {
  534.         return $this->idnat;
  535.     }
  536.     public function setIdnat(?string $idnat): static
  537.     {
  538.         $this->idnat $idnat;
  539.         return $this;
  540.     }
  541.     public function getNumeroimpot(): ?string
  542.     {
  543.         return $this->numeroimpot;
  544.     }
  545.     public function setNumeroimpot(?string $numeroimpot): static
  546.     {
  547.         $this->numeroimpot $numeroimpot;
  548.         return $this;
  549.     }
  550.     public function getCountry(): ?Country
  551.     {
  552.         return $this->country;
  553.     }
  554.     public function setCountry(?Country $country): static
  555.     {
  556.         $this->country $country;
  557.         return $this;
  558.     }
  559.     public function getCity(): ?string
  560.     {
  561.         return $this->city;
  562.     }
  563.     public function setCity(?string $city): static
  564.     {
  565.         $this->city $city;
  566.         return $this;
  567.     }
  568.     public function getProvince(): ?string
  569.     {
  570.         return $this->province;
  571.     }
  572.     public function setProvince(?string $province): static
  573.     {
  574.         $this->province $province;
  575.         return $this;
  576.     }
  577.     public function getNbrebiensimmobiliers(): ?int
  578.     {
  579.         return $this->nbrebiensimmobiliers;
  580.     }
  581.     public function setNbrebiensimmobiliers(?int $nbrebiensimmobiliers): static
  582.     {
  583.         $this->nbrebiensimmobiliers $nbrebiensimmobiliers;
  584.         return $this;
  585.     }
  586.     /**
  587.      * @return Collection<int, Subscription>
  588.      */
  589.     public function getSubscriptions(): Collection
  590.     {
  591.         return $this->subscriptions;
  592.     }
  593.     public function addSubscription(Subscription $subscription): static
  594.     {
  595.         if (!$this->subscriptions->contains($subscription)) {
  596.             $this->subscriptions->add($subscription);
  597.             $subscription->setEntreprise($this);
  598.         }
  599.         return $this;
  600.     }
  601.     public function removeEntreprisePackage(Subscription $subscription): static
  602.     {
  603.         if ($this->subscriptions->removeElement($subscription)) {
  604.             // set the owning side to null (unless already changed)
  605.             if ($subscription->getEntreprise() === $this) {
  606.                 $subscription->setEntreprise(null);
  607.             }
  608.         }
  609.         return $this;
  610.     }
  611.     public function isFreeTrail(): ?bool
  612.     {
  613.         return $this->freeTrail;
  614.     }
  615.     public function setFreeTrail(?bool $freeTrail): static
  616.     {
  617.         $this->freeTrail $freeTrail;
  618.         return $this;
  619.     }
  620.     public function getPackage(): ?Package
  621.     {
  622.         return $this->package;
  623.     }
  624.     public function setPackage(?Package $package): static
  625.     {
  626.         $this->package $package;
  627.         return $this;
  628.     }
  629.     public function getPeriod(): ?string
  630.     {
  631.         return $this->period;
  632.     }
  633.     public function setPeriod(?string $period): static
  634.     {
  635.         $this->period $period;
  636.         return $this;
  637.     }
  638.     public function isRecallpaymentnotification(): ?bool
  639.     {
  640.         return $this->recallpaymentnotification;
  641.     }
  642.     public function setRecallpaymentnotification(bool $recallpaymentnotification): static
  643.     {
  644.         $this->recallpaymentnotification $recallpaymentnotification;
  645.         return $this;
  646.     }
  647.     public function getSmartPaykey(): ?string
  648.     {
  649.         return $this->smartPaykey;
  650.     }
  651.     public function setSmartPaykey(?string $smartPaykey): void
  652.     {
  653.         $this->smartPaykey $smartPaykey;
  654.     }
  655.     /**
  656.      * @return Collection<int, Announcement>
  657.      */
  658.     public function getAnnouncements(): Collection
  659.     {
  660.         return $this->announcements;
  661.     }
  662.     public function addAnnouncement(Announcement $announcement): static
  663.     {
  664.         if (!$this->announcements->contains($announcement)) {
  665.             $this->announcements->add($announcement);
  666.             $announcement->setEntreprise($this);
  667.         }
  668.         return $this;
  669.     }
  670.     public function removeAnnouncement(Announcement $announcement): static
  671.     {
  672.         if ($this->announcements->removeElement($announcement)) {
  673.             // set the owning side to null (unless already changed)
  674.             if ($announcement->getEntreprise() === $this) {
  675.                 $announcement->setEntreprise(null);
  676.             }
  677.         }
  678.         return $this;
  679.     }
  680.     /**
  681.      * @return Collection<int, CashJournal>
  682.      */
  683.     public function getCashJournals(): Collection
  684.     {
  685.         return $this->cashJournals;
  686.     }
  687.     public function addCashJournal(CashJournal $cashJournal): static
  688.     {
  689.         if (!$this->cashJournals->contains($cashJournal)) {
  690.             $this->cashJournals->add($cashJournal);
  691.             $cashJournal->setMarchand($this);
  692.         }
  693.         return $this;
  694.     }
  695.     public function removeCashJournal(CashJournal $cashJournal): static
  696.     {
  697.         if ($this->cashJournals->removeElement($cashJournal)) {
  698.             // set the owning side to null (unless already changed)
  699.             if ($cashJournal->getMarchand() === $this) {
  700.                 $cashJournal->setMarchand(null);
  701.             }
  702.         }
  703.         return $this;
  704.     }
  705.     /**
  706.      * @return Collection<int, CashJournalEntry>
  707.      */
  708.     public function getCashJournalEntries(): Collection
  709.     {
  710.         return $this->cashJournalEntries;
  711.     }
  712.     public function addCashJournalEntry(CashJournalEntry $cashJournalEntry): static
  713.     {
  714.         if (!$this->cashJournalEntries->contains($cashJournalEntry)) {
  715.             $this->cashJournalEntries->add($cashJournalEntry);
  716.             $cashJournalEntry->setMarchand($this);
  717.         }
  718.         return $this;
  719.     }
  720.     public function removeCashJournalEntry(CashJournalEntry $cashJournalEntry): static
  721.     {
  722.         if ($this->cashJournalEntries->removeElement($cashJournalEntry)) {
  723.             // set the owning side to null (unless already changed)
  724.             if ($cashJournalEntry->getMarchand() === $this) {
  725.                 $cashJournalEntry->setMarchand(null);
  726.             }
  727.         }
  728.         return $this;
  729.     }
  730.     /**
  731.      * @return Collection<int, Charge>
  732.      */
  733.     public function getCharges(): Collection
  734.     {
  735.         return $this->charges;
  736.     }
  737.     public function addCharge(Charge $charge): static
  738.     {
  739.         if (!$this->charges->contains($charge)) {
  740.             $this->charges->add($charge);
  741.             $charge->setMarchand($this);
  742.         }
  743.         return $this;
  744.     }
  745.     public function removeCharge(Charge $charge): static
  746.     {
  747.         if ($this->charges->removeElement($charge)) {
  748.             // set the owning side to null (unless already changed)
  749.             if ($charge->getMarchand() === $this) {
  750.                 $charge->setMarchand(null);
  751.             }
  752.         }
  753.         return $this;
  754.     }
  755.     /**
  756.      * @return Collection<int, ChargeAllocation>
  757.      */
  758.     public function getChargeAllocations(): Collection
  759.     {
  760.         return $this->chargeAllocations;
  761.     }
  762.     public function addChargeAllocation(ChargeAllocation $chargeAllocation): static
  763.     {
  764.         if (!$this->chargeAllocations->contains($chargeAllocation)) {
  765.             $this->chargeAllocations->add($chargeAllocation);
  766.             $chargeAllocation->setMarchand($this);
  767.         }
  768.         return $this;
  769.     }
  770.     public function removeChargeAllocation(ChargeAllocation $chargeAllocation): static
  771.     {
  772.         if ($this->chargeAllocations->removeElement($chargeAllocation)) {
  773.             // set the owning side to null (unless already changed)
  774.             if ($chargeAllocation->getMarchand() === $this) {
  775.                 $chargeAllocation->setMarchand(null);
  776.             }
  777.         }
  778.         return $this;
  779.     }
  780.     public function isMakeJournal(): ?bool
  781.     {
  782.         return $this->makeJournal;
  783.     }
  784.     public function setMakeJournal(?bool $makeJournal): static
  785.     {
  786.         $this->makeJournal $makeJournal;
  787.         return $this;
  788.     }
  789.     /**
  790.      * @return Collection<int, Log>
  791.      */
  792.     public function getLogs(): Collection
  793.     {
  794.         return $this->logs;
  795.     }
  796.     public function addLog(Log $log): static
  797.     {
  798.         if (!$this->logs->contains($log)) {
  799.             $this->logs->add($log);
  800.             $log->setMarchand($this);
  801.         }
  802.         return $this;
  803.     }
  804.     public function removeLog(Log $log): static
  805.     {
  806.         if ($this->logs->removeElement($log)) {
  807.             // set the owning side to null (unless already changed)
  808.             if ($log->getMarchand() === $this) {
  809.                 $log->setMarchand(null);
  810.             }
  811.         }
  812.         return $this;
  813.     }
  814.     /**
  815.      * @return Collection<int, Reservation>
  816.      */
  817.     public function getReservations(): Collection
  818.     {
  819.         return $this->reservations;
  820.     }
  821.     public function addReservation(Reservation $reservation): static
  822.     {
  823.         if (!$this->reservations->contains($reservation)) {
  824.             $this->reservations->add($reservation);
  825.             $reservation->setMarchand($this);
  826.         }
  827.         return $this;
  828.     }
  829.     public function removeReservation(Reservation $reservation): static
  830.     {
  831.         if ($this->reservations->removeElement($reservation)) {
  832.             // set the owning side to null (unless already changed)
  833.             if ($reservation->getMarchand() === $this) {
  834.                 $reservation->setMarchand(null);
  835.             }
  836.         }
  837.         return $this;
  838.     }
  839.     /**
  840.      * @return Collection<int, UserEntreprise>
  841.      */
  842.     public function getUserEntreprises(): Collection
  843.     {
  844.         return $this->userEntreprises;
  845.     }
  846.     public function addUserEntreprise(UserEntreprise $userEntreprise): static
  847.     {
  848.         if (!$this->userEntreprises->contains($userEntreprise)) {
  849.             $this->userEntreprises->add($userEntreprise);
  850.             $userEntreprise->setEntreprise($this);
  851.         }
  852.         return $this;
  853.     }
  854.     public function removeUserEntreprise(UserEntreprise $userEntreprise): static
  855.     {
  856.         if ($this->userEntreprises->removeElement($userEntreprise)) {
  857.             // set the owning side to null (unless already changed)
  858.             if ($userEntreprise->getEntreprise() === $this) {
  859.                 $userEntreprise->setEntreprise(null);
  860.             }
  861.         }
  862.         return $this;
  863.     }
  864.     public function getOwner(): ?User
  865.     {
  866.         return $this->owner;
  867.     }
  868.     public function setOwner(?User $owner): static
  869.     {
  870.         $this->owner $owner;
  871.         return $this;
  872.     }
  873. }