src/Entity/Company.php line 26

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