src/Entity/Company.php line 27

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Model\UserModel;
  4. use App\Entity\ReseauSociaux\Conversation;
  5. use App\Entity\ReseauSociaux\Espace;
  6. use App\Entity\ReseauSociaux\Message;
  7. use App\Entity\ReseauSociaux\Notifications;
  8. use App\Entity\ReseauSociaux\PostLike;
  9. use App\Entity\ReseauSociaux\Publication;
  10. use App\Entity\ReseauSociaux\InvitationEspace;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use App\Repository\CompanyRepository;
  13. use Doctrine\Common\Collections\Collection;
  14. use Doctrine\Common\Collections\ArrayCollection;
  15. use Symfony\Component\Serializer\Annotation\Groups;
  16. use Symfony\Component\Validator\Constraints as Assert;
  17. use Symfony\Component\Security\Core\User\UserInterface;
  18. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  19. /**
  20.  * @ORM\Entity(repositoryClass=CompanyRepository::class)
  21.  * @UniqueEntity(fields={"email"}, message="Cette adresse mail est déjà utilisée")
  22.  * @UniqueEntity(fields={"companyName"}, message="Ce nom d'entreprise est déjà utilisé")
  23.  */
  24. class Company extends UserModel implements UserInterface
  25. {
  26.     const COMPANY_TYPE_SERVICE 'service';
  27.     const COMPANY_TYPE_PRODUCT 'product';
  28.     const COMPANY_TYPE_ENTREPRISE "entreprise";
  29.     const COMPANY_TYPE_INDIVIDUEL "particulier";
  30.     /**
  31.      * @ORM\Id()
  32.      * @ORM\GeneratedValue()
  33.      * @ORM\Column(type="integer")
  34.      * @Groups({"post:read","show:read", "connect:read", "publication:read", "message:read", "notif:read", "group:read", "member:read", "invitation:read"})
  35.      */
  36.     private $id;
  37.     /**
  38.      * @ORM\Column(type="string", length=191)
  39.      */
  40.     private $siren;
  41.     /**
  42.      * @ORM\Column(type="string", length=191, nullable=true)
  43.      * @Groups({"show:read", "notif:read", "invitation:read", "member:read"})
  44.      */
  45.     private $contactName;
  46.     /**
  47.      * @ORM\Column(type="string", length=191, nullable=true)
  48.      * @Groups("show:read")
  49.      */
  50.     private $contactPhone;
  51.     /**
  52.      * @ORM\Column(type="string", length=191, unique=true, nullable=true)
  53.      * @Groups({"show:read","post:read", "publication:read", "notif:read", "group:read", "member:read", "invitation:read"})
  54.      */
  55.     private $companyName;
  56.     /**
  57.      * @ORM\Column(type="string", length=191, nullable=true)
  58.      */
  59.     private $fax;
  60.     /**
  61.      * @ORM\Column(type="string", length=191, nullable=true)
  62.      *
  63.      * @Assert\Url(message="L'URL renseignée n'est pas valide")
  64.      */
  65.     private $website;
  66.     /**
  67.      * @ORM\Column(type="string", length=191, nullable=true)
  68.      */
  69.     private $contactCivility;
  70.     /**
  71.      * @ORM\Column(type="boolean", nullable=true)
  72.      *
  73.      * @Assert\IsTrue(message="Pour poursuivre votre inscription, vous devez accepter les conditions générales de Hobbiinn")
  74.      */
  75.     private $isAcceptCondition;
  76.     /**
  77.      * @ORM\OneToMany(targetEntity=Product::class, mappedBy="company")
  78.      */
  79.     private $products;
  80.     /**
  81.      * @ORM\Column(type="string", length=191)
  82.      * @Groups("post:read", "publication:read")
  83.      */
  84.     private $companySlug;
  85.     /**
  86.      * @ORM\Column(type="text", nullable=true)
  87.      */
  88.     private $description;
  89.     /**
  90.      * @ORM\Column(type="string", length=191, nullable=true)
  91.      * @Groups("post:read","connect:read","show:read","publication:read", "notif:read")
  92.      */
  93.     private $image;
  94.     /**
  95.      * @ORM\OneToMany(targetEntity=Messaging::class, mappedBy="messageCompany")
  96.      */
  97.     private $messagings;
  98.     /**
  99.      * @ORM\Column(type="boolean")
  100.      */
  101.     private $isConfirmed;
  102.     /**
  103.      * @ORM\OneToMany(targetEntity=PlanningCompany::class, mappedBy="company", orphanRemoval=true)
  104.      */
  105.     private $planningCompanies;
  106.     /**
  107.      * @ORM\Column(type="string", length=255, nullable=true)
  108.      */
  109.     private $kbis;
  110.     /**
  111.      * @ORM\Column(type="text", nullable=true)
  112.      */
  113.     private $conditionsVente;
  114.     /**
  115.      * @ORM\ManyToMany(targetEntity=Category::class, inversedBy="companies")
  116.      * @Assert\NotBlank(message="Veuillez sélectionner votre secteur d’activité")
  117.      */
  118.     private $category;
  119.     /**
  120.      * @ORM\Column(type="string", length=255, nullable=true)
  121.      */
  122.     private $stripId;
  123.     /**
  124.      * @ORM\Column(type="string", length=255, nullable=true)
  125.      */
  126.     private $stripeAccount;
  127.     /**
  128.      * @ORM\Column(type="string", length=255, nullable=true)
  129.      * @Groups("post:read","connect:read","show:read", "publication:read", "message:read", "notif:read")
  130.      */
  131.     private $firstName;
  132.     /**
  133.      * @ORM\Column(type="date", nullable=true)
  134.      */
  135.     private $contactBirthday;
  136.     /**
  137.      * @ORM\Column(type="string", length=4, nullable=true)
  138.      */
  139.     private $country;
  140.     /**
  141.      * @ORM\Column(type="string", length=255, nullable=true)
  142.      */
  143.     private $mangoId;
  144.     /**
  145.      * @ORM\Column(type="boolean", nullable=true)
  146.      */
  147.     private $isValidDocument;
  148.     /**
  149.      * @ORM\OneToMany(targetEntity=Payout::class, mappedBy="company")
  150.      */
  151.     private $payouts;
  152.     /**
  153.      * @ORM\Column(type="string", length=10, nullable=true)
  154.      */
  155.     private $type;
  156.     /**
  157.      * @ORM\Column(type="boolean", nullable=true)
  158.      */
  159.     private $isEditorGuide;
  160.     /**
  161.      * @ORM\OneToMany(targetEntity=Abonnement::class, mappedBy="company", cascade={"persist", "remove"})
  162.      */
  163.     private $abonnements;
  164.     /**
  165.      * @ORM\OneToMany(targetEntity=AnnonceCompany::class, mappedBy="companys")
  166.      */
  167.     private $annonceCompanies;
  168.     /**
  169.      * @ORM\Column(type="boolean", nullable=true)
  170.      */
  171.     private $paiementActiv;
  172.     /**
  173.      * @ORM\OneToMany(targetEntity=Notification::class, mappedBy="company")
  174.      */
  175.     private $notifications;
  176.     /**
  177.      * @ORM\Column(type="boolean", nullable=true)
  178.      */
  179.     private $commissionActive;
  180.     /**
  181.      * @ORM\Column(type="boolean", nullable=true)
  182.      * @Groups("post:read","connect:read","show:read")
  183.      */
  184.     private $statuCon;
  185.     /**
  186.      * @ORM\Column(type="datetime", nullable=true)
  187.      * @Groups("post:read","connect:read")
  188.      */
  189.     private $etatNetwork;
  190.     /**
  191.      * @ORM\OneToMany(targetEntity=Publication::class, mappedBy="company")
  192.      */
  193.     private $publications;
  194.     /**
  195.      * @ORM\OneToMany(targetEntity=Conversation::class, mappedBy="utilisateurComp1")
  196.      */
  197.     private $conversations;
  198.     /**
  199.      * @ORM\OneToMany(targetEntity=Conversation::class, mappedBy="utilisateurComp2")
  200.      */
  201.     private $conversations2;
  202.     /**
  203.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="senderComp")
  204.      */
  205.     private $messages;
  206.     /**
  207.      * @ORM\OneToMany(targetEntity=Publication::class, mappedBy="company_publier")
  208.      */
  209.     private $pub_company;
  210.     /**
  211.      * @ORM\OneToMany(targetEntity=Espace::class, mappedBy="proprietairecomp")
  212.      * @Groups("post:read")
  213.      */
  214.     private $espaces;
  215.     /**
  216.      * @ORM\ManyToMany(targetEntity=Espace::class, inversedBy="companies")
  217.      * @Groups("post:read")
  218.      */
  219.     private $follow;
  220.     
  221.     /**
  222.     * @ORM\OneToMany(targetEntity=Notifications::class, mappedBy="company")
  223.     */
  224.     private $notificationsreseau;
  225.     
  226.     /**
  227.      * @ORM\OneToMany(targetEntity=PostLike::class, mappedBy="company")
  228.      */
  229.     private $likes;
  230.     
  231.     /**
  232.      * @ORM\OneToMany(targetEntity=PendingLocation::class, mappedBy="company")
  233.      */
  234.     private $pendingLocations;
  235.     /**
  236.      * @ORM\OneToMany(targetEntity=PendingReservation::class, mappedBy="company")
  237.      */
  238.     private $pendingReservations;
  239.     /**
  240.      * @ORM\Column(type="datetime", nullable=true)
  241.      */
  242.     private $createdAt;
  243.     /**
  244.      * @ORM\Column(type="boolean")
  245.      */
  246.     private $isDirectReservationMode;
  247.     /**
  248.      * @ORM\Column(type="string", length=255, nullable=true)
  249.      */
  250.     private $stripeId;
  251.     /**
  252.      * @ORM\Column(type="string", length=255, nullable=true)
  253.      */
  254.     private $stripeAccountId;
  255.     /**
  256.      * @ORM\Column(type="json")
  257.      * @Groups({"show:read"})
  258.      */
  259.     protected $roles = [];
  260.     /**
  261.      * @ORM\OneToMany(targetEntity=InvitationEspace::class, mappedBy="company")
  262.      */
  263.     private $invitationEspaces;
  264.     /**
  265.      * @Groups({"show:read"})
  266.      */
  267.     public function getRoles(): array
  268.     {
  269.         $roles $this->roles;
  270.         // guarantee every user at least has ROLE_USER
  271.         $roles[] = 'ROLE_USER';
  272.         return array_unique($roles);
  273.     }
  274.     public function setRoles(array $roles): self
  275.     {
  276.         $this->roles $roles;
  277.         return $this;
  278.     }
  279.     public function __construct()
  280.     {
  281.         $this->products = new ArrayCollection();
  282.         $this->messagings = new ArrayCollection();
  283.         $this->isConfirmed false;
  284.         $this->planningCompanies = new ArrayCollection();
  285.         $this->category = new ArrayCollection();
  286.         $this->payouts = new ArrayCollection();
  287.         $this->isEditorGuide false;
  288.         $this->annonceCompanies = new ArrayCollection();
  289.         $this->notifications = new ArrayCollection();
  290.         $this->publications = new ArrayCollection();
  291.         $this->conversations = new ArrayCollection();
  292.         $this->messages = new ArrayCollection();
  293.         $this->pub_company = new ArrayCollection();
  294.         $this->espaces = new ArrayCollection();
  295.         $this->follow = new ArrayCollection();
  296.         $this->notificationsreseau = new ArrayCollection();
  297.         $this->likes = new ArrayCollection();
  298.         $this->pendingLocations = new ArrayCollection();
  299.         $this->abonnements = new ArrayCollection();
  300.         $this->conversations2 = new ArrayCollection();
  301.         $this->invitationEspaces = new ArrayCollection();
  302.     }
  303.     /**
  304.      * @Groups("show:read", "publication:read")
  305.      */
  306.     public function getId(): ?int
  307.     {
  308.         return $this->id;
  309.     }
  310.     public function getSiren(): ?string
  311.     {
  312.         return $this->siren;
  313.     }
  314.     public function setSiren(string $siren): self
  315.     {
  316.         $this->siren $siren;
  317.         return $this;
  318.     }
  319.     /**
  320.      * @Groups("show:read", "publication:read")
  321.      */
  322.     public function getContactName(): ?string
  323.     {
  324.         return $this->contactName;
  325.     }
  326.     public function setContactName(string $contactName): self
  327.     {
  328.         $this->contactName $contactName;
  329.         return $this;
  330.     }
  331.     public function getContactPhone(): ?string
  332.     {
  333.         return $this->contactPhone;
  334.     }
  335.     public function setContactPhone(?string $contactPhone): self
  336.     {
  337.         $this->contactPhone $contactPhone;
  338.         return $this;
  339.     }
  340.     /**
  341.      * @Groups("show:read", "publication:read")
  342.      */
  343.     public function getCompanyName(): ?string
  344.     {
  345.         return $this->companyName;
  346.     }
  347.     public function setCompanyName(string $companyName): self
  348.     {
  349.         $this->companyName $companyName;
  350.         return $this;
  351.     }
  352.     public function getFax(): ?string
  353.     {
  354.         return $this->fax;
  355.     }
  356.     public function setFax(?string $fax): self
  357.     {
  358.         $this->fax $fax;
  359.         return $this;
  360.     }
  361.     public function getWebsite(): ?string
  362.     {
  363.         return $this->website;
  364.     }
  365.     public function setWebsite(?string $website): self
  366.     {
  367.         $this->website $website;
  368.         return $this;
  369.     }
  370.     public function getContactCivility(): ?string
  371.     {
  372.         return $this->contactCivility;
  373.     }
  374.     public function setContactCivility(string $contactCivility): self
  375.     {
  376.         $this->contactCivility $contactCivility;
  377.         return $this;
  378.     }
  379.     public function getIsAcceptCondition(): ?bool
  380.     {
  381.         return $this->isAcceptCondition;
  382.     }
  383.     public function setIsAcceptCondition(?bool $isAcceptCondition): self
  384.     {
  385.         $this->isAcceptCondition $isAcceptCondition;
  386.         return $this;
  387.     }
  388.     /**
  389.      * @return Collection|Product[]
  390.      */
  391.     public function getProducts(): Collection
  392.     {
  393.         return $this->products;
  394.     }
  395.     public function addProduct(Product $product): self
  396.     {
  397.         if (!$this->products->contains($product)) {
  398.             $this->products[] = $product;
  399.             $product->setCompany($this);
  400.         }
  401.         return $this;
  402.     }
  403.     public function removeProduct(Product $product): self
  404.     {
  405.         if ($this->products->contains($product)) {
  406.             $this->products->removeElement($product);
  407.             // set the owning side to null (unless already changed)
  408.             if ($product->getCompany() === $this) {
  409.                 $product->setCompany(null);
  410.             }
  411.         }
  412.         return $this;
  413.     }
  414.     public function getCompanySlug(): ?string
  415.     {
  416.         return $this->companySlug;
  417.     }
  418.     public function setCompanySlug(string $companySlug): self
  419.     {
  420.         $this->companySlug $companySlug;
  421.         return $this;
  422.     }
  423.     public function getDescription(): ?string
  424.     {
  425.         return $this->description;
  426.     }
  427.     public function setDescription(?string $description): self
  428.     {
  429.         $this->description $description;
  430.         return $this;
  431.     }
  432.     /**
  433.      * @Groups("show:read", "publication:read")
  434.      */
  435.     public function getImage(): ?string
  436.     {
  437.         return $this->image;
  438.     }
  439.     public function setImage(?string $image): self
  440.     {
  441.         $this->image $image;
  442.         return $this;
  443.     }
  444.     /**
  445.      * @return Collection|Messaging[]
  446.      */
  447.     public function getMessagings(): Collection
  448.     {
  449.         return $this->messagings;
  450.     }
  451.     public function addMessaging(Messaging $messaging): self
  452.     {
  453.         if (!$this->messagings->contains($messaging)) {
  454.             $this->messagings[] = $messaging;
  455.             $messaging->setMessageCompany($this);
  456.         }
  457.         return $this;
  458.     }
  459.     public function removeMessaging(Messaging $messaging): self
  460.     {
  461.         if ($this->messagings->contains($messaging)) {
  462.             $this->messagings->removeElement($messaging);
  463.             // set the owning side to null (unless already changed)
  464.             if ($messaging->getMessageCompany() === $this) {
  465.                 $messaging->setMessageCompany(null);
  466.             }
  467.         }
  468.         return $this;
  469.     }
  470.     public function getIsConfirmed(): ?bool
  471.     {
  472.         return $this->isConfirmed;
  473.     }
  474.     public function setIsConfirmed(bool $isConfirmed): self
  475.     {
  476.         $this->isConfirmed $isConfirmed;
  477.         return $this;
  478.     }
  479.     /**
  480.      * @return Collection|PlanningCompany[]
  481.      */
  482.     public function getPlanningCompanies(): Collection
  483.     {
  484.         return $this->planningCompanies;
  485.     }
  486.     public function addPlanningCompany(PlanningCompany $planningCompany): self
  487.     {
  488.         if (!$this->planningCompanies->contains($planningCompany)) {
  489.             $this->planningCompanies[] = $planningCompany;
  490.             $planningCompany->setCompany($this);
  491.         }
  492.         return $this;
  493.     }
  494.     public function removePlanningCompany(PlanningCompany $planningCompany): self
  495.     {
  496.         if ($this->planningCompanies->contains($planningCompany)) {
  497.             $this->planningCompanies->removeElement($planningCompany);
  498.             // set the owning side to null (unless already changed)
  499.             if ($planningCompany->getCompany() === $this) {
  500.                 $planningCompany->setCompany(null);
  501.             }
  502.         }
  503.         return $this;
  504.     }
  505.     public function getKbis()
  506.     {
  507.         return $this->kbis;
  508.     }
  509.     public function setKbis($kbis): self
  510.     {
  511.         $this->kbis $kbis;
  512.         return $this;
  513.     }
  514.     public function getConditionsVente(): ?string
  515.     {
  516.         return $this->conditionsVente;
  517.     }
  518.     public function setConditionsVente(?string $conditionsVente): self
  519.     {
  520.         $this->conditionsVente $conditionsVente;
  521.         return $this;
  522.     }
  523.     /**
  524.      * @return Collection|Category[]
  525.      */
  526.     public function getCategory(): Collection
  527.     {
  528.         return $this->category;
  529.     }
  530.     public function addCategory(Category $category): self
  531.     {
  532.         if (!$this->category->contains($category)) {
  533.             $this->category[] = $category;
  534.         }
  535.         return $this;
  536.     }
  537.     public function removeCategory(Category $category): self
  538.     {
  539.         if ($this->category->contains($category)) {
  540.             $this->category->removeElement($category);
  541.         }
  542.         return $this;
  543.     }
  544.     public function getStripId(): ?string
  545.     {
  546.         return $this->stripId;
  547.     }
  548.     public function setStripId(?string $stripId): self
  549.     {
  550.         $this->stripId $stripId;
  551.         return $this;
  552.     }
  553.     public function getStripeAccount(): ?string
  554.     {
  555.         return $this->stripeAccount;
  556.     }
  557.     public function setStripeAccount(?string $stripeAccount): self
  558.     {
  559.         $this->stripeAccount $stripeAccount;
  560.         return $this;
  561.     }
  562.     /**
  563.      * @Groups("show:read", "publication:read")
  564.      */
  565.     public function getFirstName(): ?string
  566.     {
  567.         return $this->firstName;
  568.     }
  569.     public function setFirstName(string $firstName): self
  570.     {
  571.         $this->firstName $firstName;
  572.         return $this;
  573.     }
  574.     public function getContactBirthday(): ?\DateTimeInterface
  575.     {
  576.         return $this->contactBirthday;
  577.     }
  578.     public function setContactBirthday(?\DateTimeInterface $contactBirthday): self
  579.     {
  580.         $this->contactBirthday $contactBirthday;
  581.         return $this;
  582.     }
  583.     public function getCountry(): ?string
  584.     {
  585.         return $this->country;
  586.     }
  587.     public function setCountry(?string $country): self
  588.     {
  589.         $this->country $country;
  590.         return $this;
  591.     }
  592.     public function getMangoId(): ?string
  593.     {
  594.         return $this->mangoId;
  595.     }
  596.     public function setMangoId(?string $mangoId): self
  597.     {
  598.         $this->mangoId $mangoId;
  599.         return $this;
  600.     }
  601.     public function getIsValidDocument(): ?bool
  602.     {
  603.         return $this->isValidDocument;
  604.     }
  605.     public function setIsValidDocument(?bool $isValidDocument): self
  606.     {
  607.         $this->isValidDocument $isValidDocument;
  608.         return $this;
  609.     }
  610.     /**
  611.      * @return Collection|Payout[]
  612.      */
  613.     public function getPayouts(): Collection
  614.     {
  615.         return $this->payouts;
  616.     }
  617.     public function addPayout(Payout $payout): self
  618.     {
  619.         if (!$this->payouts->contains($payout)) {
  620.             $this->payouts[] = $payout;
  621.             $payout->setCompany($this);
  622.         }
  623.         return $this;
  624.     }
  625.     public function removePayout(Payout $payout): self
  626.     {
  627.         if ($this->payouts->removeElement($payout)) {
  628.             // set the owning side to null (unless already changed)
  629.             if ($payout->getCompany() === $this) {
  630.                 $payout->setCompany(null);
  631.             }
  632.         }
  633.         return $this;
  634.     }
  635.     public function getType(): ?string
  636.     {
  637.         return $this->type;
  638.     }
  639.     public function setType(?string $type): self
  640.     {
  641.         $this->type $type;
  642.         return $this;
  643.     }
  644.     public function getIsEditorGuide(): ?bool
  645.     {
  646.         return $this->isEditorGuide;
  647.     }
  648.     public function setIsEditorGuide(?bool $isEditorGuide): self
  649.     {
  650.         $this->isEditorGuide $isEditorGuide;
  651.         return $this;
  652.     }
  653.     public function getAbonnements(): ?Collection
  654.     {
  655.         return $this->abonnements;
  656.     }
  657.     public function addAbbonnement(Abonnement $abonnement): self
  658.     {
  659.         if (!$this->abonnements->contains($abonnement)) {
  660.             $this->abonnements[] = $abonnement;
  661.             $abonnement->setCompany($this);
  662.         }
  663.         return $this;
  664.     }
  665.     // public function removeAbbonnement(Abonnement $abonnement): self
  666.     // {
  667.     //     if ($this->abonnements->removeElement($abonnement)) {
  668.     //         // set the owning side to null (unless already changed)
  669.     //         if ($abonnement->getCompany() === $this) {
  670.     //             $abonnement->setCompany(null);
  671.     //         }
  672.     //     }
  673.     //     return $this;
  674.     // }
  675.     /**
  676.      * @return Collection|AnnonceCompany[]
  677.      */
  678.     public function getAnnonceCompanies(): Collection
  679.     {
  680.         return $this->annonceCompanies;
  681.     }
  682.     public function addAnnonceCompany(AnnonceCompany $annonceCompany): self
  683.     {
  684.         if (!$this->annonceCompanies->contains($annonceCompany)) {
  685.             $this->annonceCompanies[] = $annonceCompany;
  686.             $annonceCompany->setCompanys($this);
  687.         }
  688.         return $this;
  689.     }
  690.     public function removeAnnonceCompany(AnnonceCompany $annonceCompany): self
  691.     {
  692.         if ($this->annonceCompanies->removeElement($annonceCompany)) {
  693.             // set the owning side to null (unless already changed)
  694.             if ($annonceCompany->getCompanys() === $this) {
  695.                 $annonceCompany->setCompanys(null);
  696.             }
  697.         }
  698.         return $this;
  699.     }
  700.     public function getPaiementActiv(): ?bool
  701.     {
  702.         return $this->paiementActiv;
  703.     }
  704.     public function setPaiementActiv(?bool $paiementActiv): self
  705.     {
  706.         $this->paiementActiv $paiementActiv;
  707.         return $this;
  708.     }
  709.     /**
  710.      * @return Collection|Notification[]
  711.      */
  712.     public function getNotifications(): Collection
  713.     {
  714.         return $this->notifications;
  715.     }
  716.     public function addNotification(Notification $notification): self
  717.     {
  718.         if (!$this->notifications->contains($notification)) {
  719.             $this->notifications[] = $notification;
  720.             $notification->setCompany($this);
  721.         }
  722.         return $this;
  723.     }
  724.     public function removeNotification(Notification $notification): self
  725.     {
  726.         if ($this->notifications->removeElement($notification)) {
  727.             // set the owning side to null (unless already changed)
  728.             if ($notification->getCompany() === $this) {
  729.                 $notification->setCompany(null);
  730.             }
  731.         }
  732.         return $this;
  733.     }
  734.     public function getCommissionActive(): ?bool
  735.     {
  736.         return $this->commissionActive;
  737.     }
  738.     public function setCommissionActive(?bool $commissionActive): self
  739.     {
  740.         $this->commissionActive $commissionActive;
  741.         return $this;
  742.     }
  743.     public function getStatuCon(): ?bool
  744.     {
  745.         return $this->statuCon;
  746.     }
  747.     public function setStatuCon(?bool $statuCon): self
  748.     {
  749.         $this->statuCon $statuCon;
  750.         return $this;
  751.     }
  752.     public function getEtatNetwork(): ?\DateTimeInterface
  753.     {
  754.         return $this->etatNetwork;
  755.     }
  756.     public function setEtatNetwork(\DateTimeInterface $etatNetwork): self
  757.     {
  758.         $this->etatNetwork $etatNetwork;
  759.         return $this;
  760.     }
  761.     public function __toString()
  762.     {
  763.         return $this->getFirstName();
  764.     }
  765.     /**
  766.      * @return Collection<int, Publication>
  767.      */
  768.     public function getPublications(): Collection
  769.     {
  770.         return $this->publications;
  771.     }
  772.     public function addPublication(Publication $publication): self
  773.     {
  774.         if (!$this->publications->contains($publication)) {
  775.             $this->publications[] = $publication;
  776.             $publication->setCompany($this);
  777.         }
  778.         return $this;
  779.     }
  780.     public function removePublication(Publication $publication): self
  781.     {
  782.         if ($this->publications->removeElement($publication)) {
  783.             // set the owning side to null (unless already changed)
  784.             if ($publication->getCompany() === $this) {
  785.                 $publication->setCompany(null);
  786.             }
  787.         }
  788.         return $this;
  789.     }
  790.     /**
  791.      * @return Collection<int, Conversation>
  792.      */
  793.     public function getConversations(): Collection
  794.     {
  795.         return $this->conversations;
  796.     }
  797.     public function addConversation(Conversation $conversation): self
  798.     {
  799.         if (!$this->conversations->contains($conversation)) {
  800.             $this->conversations[] = $conversation;
  801.             $conversation->setUtilisateurComp1($this);
  802.         }
  803.         return $this;
  804.     }
  805.     public function removeConversation(Conversation $conversation): self
  806.     {
  807.         if ($this->conversations->removeElement($conversation)) {
  808.             // set the owning side to null (unless already changed)
  809.             if ($conversation->getUtilisateurComp1() === $this) {
  810.                 $conversation->setUtilisateurComp1(null);
  811.             }
  812.         }
  813.         return $this;
  814.     }
  815.     public function getConversations2(): Collection
  816.     {
  817.         return $this->conversations2;
  818.     }
  819.     /**
  820.      * @return Collection<int, Message>
  821.      */
  822.     public function getMessages(): Collection
  823.     {
  824.         return $this->messages;
  825.     }
  826.     public function addMessage(Message $message): self
  827.     {
  828.         if (!$this->messages->contains($message)) {
  829.             $this->messages[] = $message;
  830.             $message->setSenderComp($this);
  831.         }
  832.         return $this;
  833.     }
  834.     public function removeMessage(Message $message): self
  835.     {
  836.         if ($this->messages->removeElement($message)) {
  837.             // set the owning side to null (unless already changed)
  838.             if ($message->getSenderComp() === $this) {
  839.                 $message->setSenderComp(null);
  840.             }
  841.         }
  842.         return $this;
  843.     }
  844.     /**
  845.      * @return Collection<int, Publication>
  846.      */
  847.     public function getPubCompany(): Collection
  848.     {
  849.         return $this->pub_company;
  850.     }
  851.     public function addPubCompany(Publication $pubCompany): self
  852.     {
  853.         if (!$this->pub_company->contains($pubCompany)) {
  854.             $this->pub_company[] = $pubCompany;
  855.             $pubCompany->setCompanyPublier($this);
  856.         }
  857.         return $this;
  858.     }
  859.     public function removePubCompany(Publication $pubCompany): self
  860.     {
  861.         if ($this->pub_company->removeElement($pubCompany)) {
  862.             // set the owning side to null (unless already changed)
  863.             if ($pubCompany->getCompanyPublier() === $this) {
  864.                 $pubCompany->setCompanyPublier(null);
  865.             }
  866.         }
  867.         return $this;
  868.     }
  869.     /**
  870.      * @return Collection<int, Espace>
  871.      */
  872.     public function getEspaces(): Collection
  873.     {
  874.         return $this->espaces;
  875.     }
  876.     public function addEspace(Espace $espace): self
  877.     {
  878.         if (!$this->espaces->contains($espace)) {
  879.             $this->espaces[] = $espace;
  880.             $espace->setProprietairecomp($this);
  881.         }
  882.         return $this;
  883.     }
  884.     public function removeEspace(Espace $espace): self
  885.     {
  886.         if ($this->espaces->removeElement($espace)) {
  887.             // set the owning side to null (unless already changed)
  888.             if ($espace->getProprietairecomp() === $this) {
  889.                 $espace->setProprietairecomp(null);
  890.             }
  891.         }
  892.         return $this;
  893.     }
  894.     /**
  895.      * @return Collection<int, Espace>
  896.      */
  897.     public function getFollow(): Collection
  898.     {
  899.         return $this->follow;
  900.     }
  901.     public function addFollow(Espace $follow): self
  902.     {
  903.         if (!$this->follow->contains($follow)) {
  904.             $this->follow[] = $follow;
  905.         }
  906.         return $this;
  907.     }
  908.     public function removeFollow(Espace $follow): self
  909.     {
  910.         $this->follow->removeElement($follow);
  911.         return $this;
  912.     }
  913.     /**
  914.      * @return Collection<int, Notifications>
  915.      */
  916.     public function getNotificationsreseau(): Collection
  917.     {
  918.         return $this->notificationsreseau;
  919.     }
  920.     public function addNotificationsreseau(Notifications $notificationsreseau): self
  921.     {
  922.         if (!$this->notificationsreseau->contains($notificationsreseau)) {
  923.             $this->notificationsreseau[] = $notificationsreseau;
  924.             $notificationsreseau->setCompany($this);
  925.         }
  926.         return $this;
  927.     }
  928.     public function removeNotificationsreseau(Notifications $notificationsreseau): self
  929.     {
  930.         if ($this->notificationsreseau->removeElement($notificationsreseau)) {
  931.             // set the owning side to null (unless already changed)
  932.             if ($notificationsreseau->getCompany() === $this) {
  933.                 $notificationsreseau->setCompany(null);
  934.             }
  935.         }
  936.         return $this;
  937.     }
  938.     
  939.     /**
  940.      * @return Collection<int, PendingLocation>
  941.      */
  942.     public function getPendingLocations(): Collection
  943.     {
  944.         return $this->pendingLocations;
  945.     }
  946.     public function addPendingLocation(PendingLocation $pendingLocation): self
  947.     {
  948.         if (!$this->pendingLocations->contains($pendingLocation)) {
  949.             $this->pendingLocations[] = $pendingLocation;
  950.             $pendingLocation->setCompany($this);
  951.         }
  952.         return $this;
  953.     }
  954.     public function removePendingLocation(PendingLocation $pendingLocation): void
  955.     {
  956.         if ($this->pendingLocations->removeElement($pendingLocation)) {
  957.             // set the owning side to null (unless already changed)
  958.             if ($pendingLocation->getCompany() === $this) {
  959.                 $pendingLocation->setCompany(null);
  960.             }
  961.         }
  962.     }
  963.     /**
  964.      * @return Collection<int, PostLike>
  965.      */
  966.     public function getLikes(): Collection
  967.     {
  968.         return $this->likes;
  969.     }
  970.     public function addLike(PostLike $like): self
  971.     {
  972.         if (!$this->likes->contains($like)) {
  973.             $this->likes[] = $like;
  974.             $like->setCompany($this);
  975.         }
  976.         return $this;
  977.     }
  978.     public function removeLike(PostLike $like): self
  979.     {
  980.         if ($this->likes->removeElement($like)) {
  981.             // set the owning side to null (unless already changed)
  982.             if ($like->getCompany() === $this) {
  983.                 $like->setCompany(null);
  984.             }
  985.         }
  986.         return $this;
  987.     }
  988.     /**
  989.      * @return Collection<int, PendingReservation>
  990.      */
  991.     public function getPendingReservations(): Collection
  992.     {
  993.         return $this->pendingReservations;
  994.     }
  995.     public function addPendingReservation(PendingReservation $pendingReservation): self
  996.     {
  997.         if (!$this->pendingReservations->contains($pendingReservation)) {
  998.             $this->pendingReservations[] = $pendingReservation;
  999.             $pendingReservation->setCompany($this);
  1000.         }
  1001.         return $this;
  1002.     }
  1003.     public function removePendingReservation(PendingReservation $pendingReservation): self
  1004.     {
  1005.         if ($this->pendingReservations->removeElement($pendingReservation)) {
  1006.             // set the owning side to null (unless already changed)
  1007.             if ($pendingReservation->getCompany() === $this) {
  1008.                 $pendingReservation->setCompany(null);
  1009.             }
  1010.         }
  1011.         return $this;
  1012.     }
  1013.     public function getCreatedAt(): ?\DateTimeInterface
  1014.     {
  1015.         return $this->createdAt;
  1016.     }
  1017.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  1018.     {
  1019.         $this->createdAt $createdAt;
  1020.         return $this;
  1021.     }
  1022.     public function getIsDirectReservationMode(): ?bool
  1023.     {
  1024.         return $this->isDirectReservationMode;
  1025.     }
  1026.     public function setIsDirectReservationMode(bool $isDirectReservationMode): self
  1027.     {
  1028.         $this->isDirectReservationMode $isDirectReservationMode;
  1029.         return $this;
  1030.     }
  1031.     public function getStripeId(): ?string
  1032.     {
  1033.         return $this->stripeId;
  1034.     }
  1035.     public function setStripeId(?string $stripeId): self
  1036.     {
  1037.         $this->stripeId $stripeId;
  1038.         return $this;
  1039.     }
  1040.     public function getStripeAccountId(): ?string
  1041.     {
  1042.         return $this->stripeAccountId;
  1043.     }
  1044.     public function setStripeAccountId(?string $stripeAccountId): self
  1045.     {
  1046.         $this->stripeAccountId $stripeAccountId;
  1047.         return $this;
  1048.     }
  1049.     /**
  1050.      * @return Collection<int, InvitationEspace>
  1051.      */
  1052.     public function getInvitationEspaces(): Collection
  1053.     {
  1054.         return $this->invitationEspaces;
  1055.     }
  1056.     public function addInvitationEspace(InvitationEspace $invitationEspace): self
  1057.     {
  1058.         if (!$this->invitationEspaces->contains($invitationEspace)) {
  1059.             $this->invitationEspaces[] = $invitationEspace;
  1060.             $invitationEspace->setCompany($this);
  1061.         }
  1062.         return $this;
  1063.     }
  1064.     public function removeInvitationEspace(InvitationEspace $invitationEspace): self
  1065.     {
  1066.         if ($this->invitationEspaces->removeElement($invitationEspace)) {
  1067.             // set the owning side to null (unless already changed)
  1068.             if ($invitationEspace->getCompany() === $this) {
  1069.                 $invitationEspace->setCompany(null);
  1070.             }
  1071.         }
  1072.         return $this;
  1073.     }
  1074. }