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=Conversation::class, mappedBy="utilisateurComp2")
  199.      */
  200.     private $conversations2;
  201.     /**
  202.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="senderComp")
  203.      */
  204.     private $messages;
  205.     /**
  206.      * @ORM\OneToMany(targetEntity=Publication::class, mappedBy="company_publier")
  207.      */
  208.     private $pub_company;
  209.     /**
  210.      * @ORM\OneToMany(targetEntity=Espace::class, mappedBy="proprietairecomp")
  211.      * @Groups("post:read")
  212.      */
  213.     private $espaces;
  214.     /**
  215.      * @ORM\ManyToMany(targetEntity=Espace::class, inversedBy="companies")
  216.      * @Groups("post:read")
  217.      */
  218.     private $follow;
  219.     
  220.     /**
  221.     * @ORM\OneToMany(targetEntity=Notifications::class, mappedBy="company")
  222.     */
  223.     private $notificationsreseau;
  224.     
  225.     /**
  226.      * @ORM\OneToMany(targetEntity=PostLike::class, mappedBy="company")
  227.      */
  228.     private $likes;
  229.     
  230.     /**
  231.      * @ORM\OneToMany(targetEntity=PendingLocation::class, mappedBy="company")
  232.      */
  233.     private $pendingLocations;
  234.     /**
  235.      * @ORM\OneToMany(targetEntity=PendingReservation::class, mappedBy="company")
  236.      */
  237.     private $pendingReservations;
  238.     /**
  239.      * @ORM\Column(type="datetime", nullable=true)
  240.      */
  241.     private $createdAt;
  242.     /**
  243.      * @ORM\Column(type="boolean")
  244.      */
  245.     private $isDirectReservationMode;
  246.     /**
  247.      * @ORM\Column(type="string", length=255, nullable=true)
  248.      */
  249.     private $stripeId;
  250.     /**
  251.      * @ORM\Column(type="string", length=255, nullable=true)
  252.      */
  253.     private $stripeAccountId;
  254.     /**
  255.      * @ORM\Column(type="json")
  256.      * @Groups({"show:read"})
  257.      */
  258.     protected $roles = [];
  259.     /**
  260.      * @Groups({"show:read"})
  261.      */
  262.     public function getRoles(): array
  263.     {
  264.         $roles $this->roles;
  265.         // guarantee every user at least has ROLE_USER
  266.         $roles[] = 'ROLE_USER';
  267.         return array_unique($roles);
  268.     }
  269.     public function setRoles(array $roles): self
  270.     {
  271.         $this->roles $roles;
  272.         return $this;
  273.     }
  274.     public function __construct()
  275.     {
  276.         $this->products = new ArrayCollection();
  277.         $this->messagings = new ArrayCollection();
  278.         $this->isConfirmed false;
  279.         $this->planningCompanies = new ArrayCollection();
  280.         $this->category = new ArrayCollection();
  281.         $this->payouts = new ArrayCollection();
  282.         $this->isEditorGuide false;
  283.         $this->annonceCompanies = new ArrayCollection();
  284.         $this->notifications = new ArrayCollection();
  285.         $this->publications = new ArrayCollection();
  286.         $this->conversations = new ArrayCollection();
  287.         $this->messages = new ArrayCollection();
  288.         $this->pub_company = new ArrayCollection();
  289.         $this->espaces = new ArrayCollection();
  290.         $this->follow = new ArrayCollection();
  291.         $this->notificationsreseau = new ArrayCollection();
  292.         $this->likes = new ArrayCollection();
  293.         $this->pendingLocations = new ArrayCollection();
  294.         $this->abonnements = new ArrayCollection();
  295.         $this->conversations2 = new ArrayCollection();
  296.     }
  297.     /**
  298.      * @Groups("show:read", "publication:read")
  299.      */
  300.     public function getId(): ?int
  301.     {
  302.         return $this->id;
  303.     }
  304.     public function getSiren(): ?string
  305.     {
  306.         return $this->siren;
  307.     }
  308.     public function setSiren(string $siren): self
  309.     {
  310.         $this->siren $siren;
  311.         return $this;
  312.     }
  313.     /**
  314.      * @Groups("show:read", "publication:read")
  315.      */
  316.     public function getContactName(): ?string
  317.     {
  318.         return $this->contactName;
  319.     }
  320.     public function setContactName(string $contactName): self
  321.     {
  322.         $this->contactName $contactName;
  323.         return $this;
  324.     }
  325.     public function getContactPhone(): ?string
  326.     {
  327.         return $this->contactPhone;
  328.     }
  329.     public function setContactPhone(?string $contactPhone): self
  330.     {
  331.         $this->contactPhone $contactPhone;
  332.         return $this;
  333.     }
  334.     /**
  335.      * @Groups("show:read", "publication:read")
  336.      */
  337.     public function getCompanyName(): ?string
  338.     {
  339.         return $this->companyName;
  340.     }
  341.     public function setCompanyName(string $companyName): self
  342.     {
  343.         $this->companyName $companyName;
  344.         return $this;
  345.     }
  346.     public function getFax(): ?string
  347.     {
  348.         return $this->fax;
  349.     }
  350.     public function setFax(?string $fax): self
  351.     {
  352.         $this->fax $fax;
  353.         return $this;
  354.     }
  355.     public function getWebsite(): ?string
  356.     {
  357.         return $this->website;
  358.     }
  359.     public function setWebsite(?string $website): self
  360.     {
  361.         $this->website $website;
  362.         return $this;
  363.     }
  364.     public function getContactCivility(): ?string
  365.     {
  366.         return $this->contactCivility;
  367.     }
  368.     public function setContactCivility(string $contactCivility): self
  369.     {
  370.         $this->contactCivility $contactCivility;
  371.         return $this;
  372.     }
  373.     public function getIsAcceptCondition(): ?bool
  374.     {
  375.         return $this->isAcceptCondition;
  376.     }
  377.     public function setIsAcceptCondition(?bool $isAcceptCondition): self
  378.     {
  379.         $this->isAcceptCondition $isAcceptCondition;
  380.         return $this;
  381.     }
  382.     /**
  383.      * @return Collection|Product[]
  384.      */
  385.     public function getProducts(): Collection
  386.     {
  387.         return $this->products;
  388.     }
  389.     public function addProduct(Product $product): self
  390.     {
  391.         if (!$this->products->contains($product)) {
  392.             $this->products[] = $product;
  393.             $product->setCompany($this);
  394.         }
  395.         return $this;
  396.     }
  397.     public function removeProduct(Product $product): self
  398.     {
  399.         if ($this->products->contains($product)) {
  400.             $this->products->removeElement($product);
  401.             // set the owning side to null (unless already changed)
  402.             if ($product->getCompany() === $this) {
  403.                 $product->setCompany(null);
  404.             }
  405.         }
  406.         return $this;
  407.     }
  408.     public function getCompanySlug(): ?string
  409.     {
  410.         return $this->companySlug;
  411.     }
  412.     public function setCompanySlug(string $companySlug): self
  413.     {
  414.         $this->companySlug $companySlug;
  415.         return $this;
  416.     }
  417.     public function getDescription(): ?string
  418.     {
  419.         return $this->description;
  420.     }
  421.     public function setDescription(?string $description): self
  422.     {
  423.         $this->description $description;
  424.         return $this;
  425.     }
  426.     /**
  427.      * @Groups("show:read", "publication:read")
  428.      */
  429.     public function getImage(): ?string
  430.     {
  431.         return $this->image;
  432.     }
  433.     public function setImage(?string $image): self
  434.     {
  435.         $this->image $image;
  436.         return $this;
  437.     }
  438.     /**
  439.      * @return Collection|Messaging[]
  440.      */
  441.     public function getMessagings(): Collection
  442.     {
  443.         return $this->messagings;
  444.     }
  445.     public function addMessaging(Messaging $messaging): self
  446.     {
  447.         if (!$this->messagings->contains($messaging)) {
  448.             $this->messagings[] = $messaging;
  449.             $messaging->setMessageCompany($this);
  450.         }
  451.         return $this;
  452.     }
  453.     public function removeMessaging(Messaging $messaging): self
  454.     {
  455.         if ($this->messagings->contains($messaging)) {
  456.             $this->messagings->removeElement($messaging);
  457.             // set the owning side to null (unless already changed)
  458.             if ($messaging->getMessageCompany() === $this) {
  459.                 $messaging->setMessageCompany(null);
  460.             }
  461.         }
  462.         return $this;
  463.     }
  464.     public function getIsConfirmed(): ?bool
  465.     {
  466.         return $this->isConfirmed;
  467.     }
  468.     public function setIsConfirmed(bool $isConfirmed): self
  469.     {
  470.         $this->isConfirmed $isConfirmed;
  471.         return $this;
  472.     }
  473.     /**
  474.      * @return Collection|PlanningCompany[]
  475.      */
  476.     public function getPlanningCompanies(): Collection
  477.     {
  478.         return $this->planningCompanies;
  479.     }
  480.     public function addPlanningCompany(PlanningCompany $planningCompany): self
  481.     {
  482.         if (!$this->planningCompanies->contains($planningCompany)) {
  483.             $this->planningCompanies[] = $planningCompany;
  484.             $planningCompany->setCompany($this);
  485.         }
  486.         return $this;
  487.     }
  488.     public function removePlanningCompany(PlanningCompany $planningCompany): self
  489.     {
  490.         if ($this->planningCompanies->contains($planningCompany)) {
  491.             $this->planningCompanies->removeElement($planningCompany);
  492.             // set the owning side to null (unless already changed)
  493.             if ($planningCompany->getCompany() === $this) {
  494.                 $planningCompany->setCompany(null);
  495.             }
  496.         }
  497.         return $this;
  498.     }
  499.     public function getKbis()
  500.     {
  501.         return $this->kbis;
  502.     }
  503.     public function setKbis($kbis): self
  504.     {
  505.         $this->kbis $kbis;
  506.         return $this;
  507.     }
  508.     public function getConditionsVente(): ?string
  509.     {
  510.         return $this->conditionsVente;
  511.     }
  512.     public function setConditionsVente(?string $conditionsVente): self
  513.     {
  514.         $this->conditionsVente $conditionsVente;
  515.         return $this;
  516.     }
  517.     /**
  518.      * @return Collection|Category[]
  519.      */
  520.     public function getCategory(): Collection
  521.     {
  522.         return $this->category;
  523.     }
  524.     public function addCategory(Category $category): self
  525.     {
  526.         if (!$this->category->contains($category)) {
  527.             $this->category[] = $category;
  528.         }
  529.         return $this;
  530.     }
  531.     public function removeCategory(Category $category): self
  532.     {
  533.         if ($this->category->contains($category)) {
  534.             $this->category->removeElement($category);
  535.         }
  536.         return $this;
  537.     }
  538.     public function getStripId(): ?string
  539.     {
  540.         return $this->stripId;
  541.     }
  542.     public function setStripId(?string $stripId): self
  543.     {
  544.         $this->stripId $stripId;
  545.         return $this;
  546.     }
  547.     public function getStripeAccount(): ?string
  548.     {
  549.         return $this->stripeAccount;
  550.     }
  551.     public function setStripeAccount(?string $stripeAccount): self
  552.     {
  553.         $this->stripeAccount $stripeAccount;
  554.         return $this;
  555.     }
  556.     /**
  557.      * @Groups("show:read", "publication:read")
  558.      */
  559.     public function getFirstName(): ?string
  560.     {
  561.         return $this->firstName;
  562.     }
  563.     public function setFirstName(string $firstName): self
  564.     {
  565.         $this->firstName $firstName;
  566.         return $this;
  567.     }
  568.     public function getContactBirthday(): ?\DateTimeInterface
  569.     {
  570.         return $this->contactBirthday;
  571.     }
  572.     public function setContactBirthday(?\DateTimeInterface $contactBirthday): self
  573.     {
  574.         $this->contactBirthday $contactBirthday;
  575.         return $this;
  576.     }
  577.     public function getCountry(): ?string
  578.     {
  579.         return $this->country;
  580.     }
  581.     public function setCountry(?string $country): self
  582.     {
  583.         $this->country $country;
  584.         return $this;
  585.     }
  586.     public function getMangoId(): ?string
  587.     {
  588.         return $this->mangoId;
  589.     }
  590.     public function setMangoId(?string $mangoId): self
  591.     {
  592.         $this->mangoId $mangoId;
  593.         return $this;
  594.     }
  595.     public function getIsValidDocument(): ?bool
  596.     {
  597.         return $this->isValidDocument;
  598.     }
  599.     public function setIsValidDocument(?bool $isValidDocument): self
  600.     {
  601.         $this->isValidDocument $isValidDocument;
  602.         return $this;
  603.     }
  604.     /**
  605.      * @return Collection|Payout[]
  606.      */
  607.     public function getPayouts(): Collection
  608.     {
  609.         return $this->payouts;
  610.     }
  611.     public function addPayout(Payout $payout): self
  612.     {
  613.         if (!$this->payouts->contains($payout)) {
  614.             $this->payouts[] = $payout;
  615.             $payout->setCompany($this);
  616.         }
  617.         return $this;
  618.     }
  619.     public function removePayout(Payout $payout): self
  620.     {
  621.         if ($this->payouts->removeElement($payout)) {
  622.             // set the owning side to null (unless already changed)
  623.             if ($payout->getCompany() === $this) {
  624.                 $payout->setCompany(null);
  625.             }
  626.         }
  627.         return $this;
  628.     }
  629.     public function getType(): ?string
  630.     {
  631.         return $this->type;
  632.     }
  633.     public function setType(?string $type): self
  634.     {
  635.         $this->type $type;
  636.         return $this;
  637.     }
  638.     public function getIsEditorGuide(): ?bool
  639.     {
  640.         return $this->isEditorGuide;
  641.     }
  642.     public function setIsEditorGuide(?bool $isEditorGuide): self
  643.     {
  644.         $this->isEditorGuide $isEditorGuide;
  645.         return $this;
  646.     }
  647.     public function getAbonnements(): ?Collection
  648.     {
  649.         return $this->abonnements;
  650.     }
  651.     public function addAbbonnement(Abonnement $abonnement): self
  652.     {
  653.         if (!$this->abonnements->contains($abonnement)) {
  654.             $this->abonnements[] = $abonnement;
  655.             $abonnement->setCompany($this);
  656.         }
  657.         return $this;
  658.     }
  659.     // public function removeAbbonnement(Abonnement $abonnement): self
  660.     // {
  661.     //     if ($this->abonnements->removeElement($abonnement)) {
  662.     //         // set the owning side to null (unless already changed)
  663.     //         if ($abonnement->getCompany() === $this) {
  664.     //             $abonnement->setCompany(null);
  665.     //         }
  666.     //     }
  667.     //     return $this;
  668.     // }
  669.     /**
  670.      * @return Collection|AnnonceCompany[]
  671.      */
  672.     public function getAnnonceCompanies(): Collection
  673.     {
  674.         return $this->annonceCompanies;
  675.     }
  676.     public function addAnnonceCompany(AnnonceCompany $annonceCompany): self
  677.     {
  678.         if (!$this->annonceCompanies->contains($annonceCompany)) {
  679.             $this->annonceCompanies[] = $annonceCompany;
  680.             $annonceCompany->setCompanys($this);
  681.         }
  682.         return $this;
  683.     }
  684.     public function removeAnnonceCompany(AnnonceCompany $annonceCompany): self
  685.     {
  686.         if ($this->annonceCompanies->removeElement($annonceCompany)) {
  687.             // set the owning side to null (unless already changed)
  688.             if ($annonceCompany->getCompanys() === $this) {
  689.                 $annonceCompany->setCompanys(null);
  690.             }
  691.         }
  692.         return $this;
  693.     }
  694.     public function getPaiementActiv(): ?bool
  695.     {
  696.         return $this->paiementActiv;
  697.     }
  698.     public function setPaiementActiv(?bool $paiementActiv): self
  699.     {
  700.         $this->paiementActiv $paiementActiv;
  701.         return $this;
  702.     }
  703.     /**
  704.      * @return Collection|Notification[]
  705.      */
  706.     public function getNotifications(): Collection
  707.     {
  708.         return $this->notifications;
  709.     }
  710.     public function addNotification(Notification $notification): self
  711.     {
  712.         if (!$this->notifications->contains($notification)) {
  713.             $this->notifications[] = $notification;
  714.             $notification->setCompany($this);
  715.         }
  716.         return $this;
  717.     }
  718.     public function removeNotification(Notification $notification): self
  719.     {
  720.         if ($this->notifications->removeElement($notification)) {
  721.             // set the owning side to null (unless already changed)
  722.             if ($notification->getCompany() === $this) {
  723.                 $notification->setCompany(null);
  724.             }
  725.         }
  726.         return $this;
  727.     }
  728.     public function getCommissionActive(): ?bool
  729.     {
  730.         return $this->commissionActive;
  731.     }
  732.     public function setCommissionActive(?bool $commissionActive): self
  733.     {
  734.         $this->commissionActive $commissionActive;
  735.         return $this;
  736.     }
  737.     public function getStatuCon(): ?bool
  738.     {
  739.         return $this->statuCon;
  740.     }
  741.     public function setStatuCon(?bool $statuCon): self
  742.     {
  743.         $this->statuCon $statuCon;
  744.         return $this;
  745.     }
  746.     public function getEtatNetwork(): ?\DateTimeInterface
  747.     {
  748.         return $this->etatNetwork;
  749.     }
  750.     public function setEtatNetwork(\DateTimeInterface $etatNetwork): self
  751.     {
  752.         $this->etatNetwork $etatNetwork;
  753.         return $this;
  754.     }
  755.     public function __toString()
  756.     {
  757.         return $this->getFirstName();
  758.     }
  759.     /**
  760.      * @return Collection<int, Publication>
  761.      */
  762.     public function getPublications(): Collection
  763.     {
  764.         return $this->publications;
  765.     }
  766.     public function addPublication(Publication $publication): self
  767.     {
  768.         if (!$this->publications->contains($publication)) {
  769.             $this->publications[] = $publication;
  770.             $publication->setCompany($this);
  771.         }
  772.         return $this;
  773.     }
  774.     public function removePublication(Publication $publication): self
  775.     {
  776.         if ($this->publications->removeElement($publication)) {
  777.             // set the owning side to null (unless already changed)
  778.             if ($publication->getCompany() === $this) {
  779.                 $publication->setCompany(null);
  780.             }
  781.         }
  782.         return $this;
  783.     }
  784.     /**
  785.      * @return Collection<int, Conversation>
  786.      */
  787.     public function getConversations(): Collection
  788.     {
  789.         return $this->conversations;
  790.     }
  791.     public function addConversation(Conversation $conversation): self
  792.     {
  793.         if (!$this->conversations->contains($conversation)) {
  794.             $this->conversations[] = $conversation;
  795.             $conversation->setUtilisateurComp1($this);
  796.         }
  797.         return $this;
  798.     }
  799.     public function removeConversation(Conversation $conversation): self
  800.     {
  801.         if ($this->conversations->removeElement($conversation)) {
  802.             // set the owning side to null (unless already changed)
  803.             if ($conversation->getUtilisateurComp1() === $this) {
  804.                 $conversation->setUtilisateurComp1(null);
  805.             }
  806.         }
  807.         return $this;
  808.     }
  809.     public function getConversations2(): Collection
  810.     {
  811.         return $this->conversations2;
  812.     }
  813.     /**
  814.      * @return Collection<int, Message>
  815.      */
  816.     public function getMessages(): Collection
  817.     {
  818.         return $this->messages;
  819.     }
  820.     public function addMessage(Message $message): self
  821.     {
  822.         if (!$this->messages->contains($message)) {
  823.             $this->messages[] = $message;
  824.             $message->setSenderComp($this);
  825.         }
  826.         return $this;
  827.     }
  828.     public function removeMessage(Message $message): self
  829.     {
  830.         if ($this->messages->removeElement($message)) {
  831.             // set the owning side to null (unless already changed)
  832.             if ($message->getSenderComp() === $this) {
  833.                 $message->setSenderComp(null);
  834.             }
  835.         }
  836.         return $this;
  837.     }
  838.     /**
  839.      * @return Collection<int, Publication>
  840.      */
  841.     public function getPubCompany(): Collection
  842.     {
  843.         return $this->pub_company;
  844.     }
  845.     public function addPubCompany(Publication $pubCompany): self
  846.     {
  847.         if (!$this->pub_company->contains($pubCompany)) {
  848.             $this->pub_company[] = $pubCompany;
  849.             $pubCompany->setCompanyPublier($this);
  850.         }
  851.         return $this;
  852.     }
  853.     public function removePubCompany(Publication $pubCompany): self
  854.     {
  855.         if ($this->pub_company->removeElement($pubCompany)) {
  856.             // set the owning side to null (unless already changed)
  857.             if ($pubCompany->getCompanyPublier() === $this) {
  858.                 $pubCompany->setCompanyPublier(null);
  859.             }
  860.         }
  861.         return $this;
  862.     }
  863.     /**
  864.      * @return Collection<int, Espace>
  865.      */
  866.     public function getEspaces(): Collection
  867.     {
  868.         return $this->espaces;
  869.     }
  870.     public function addEspace(Espace $espace): self
  871.     {
  872.         if (!$this->espaces->contains($espace)) {
  873.             $this->espaces[] = $espace;
  874.             $espace->setProprietairecomp($this);
  875.         }
  876.         return $this;
  877.     }
  878.     public function removeEspace(Espace $espace): self
  879.     {
  880.         if ($this->espaces->removeElement($espace)) {
  881.             // set the owning side to null (unless already changed)
  882.             if ($espace->getProprietairecomp() === $this) {
  883.                 $espace->setProprietairecomp(null);
  884.             }
  885.         }
  886.         return $this;
  887.     }
  888.     /**
  889.      * @return Collection<int, Espace>
  890.      */
  891.     public function getFollow(): Collection
  892.     {
  893.         return $this->follow;
  894.     }
  895.     public function addFollow(Espace $follow): self
  896.     {
  897.         if (!$this->follow->contains($follow)) {
  898.             $this->follow[] = $follow;
  899.         }
  900.         return $this;
  901.     }
  902.     public function removeFollow(Espace $follow): self
  903.     {
  904.         $this->follow->removeElement($follow);
  905.         return $this;
  906.     }
  907.     /**
  908.      * @return Collection<int, Notifications>
  909.      */
  910.     public function getNotificationsreseau(): Collection
  911.     {
  912.         return $this->notificationsreseau;
  913.     }
  914.     public function addNotificationsreseau(Notifications $notificationsreseau): self
  915.     {
  916.         if (!$this->notificationsreseau->contains($notificationsreseau)) {
  917.             $this->notificationsreseau[] = $notificationsreseau;
  918.             $notificationsreseau->setCompany($this);
  919.         }
  920.         return $this;
  921.     }
  922.     public function removeNotificationsreseau(Notifications $notificationsreseau): self
  923.     {
  924.         if ($this->notificationsreseau->removeElement($notificationsreseau)) {
  925.             // set the owning side to null (unless already changed)
  926.             if ($notificationsreseau->getCompany() === $this) {
  927.                 $notificationsreseau->setCompany(null);
  928.             }
  929.         }
  930.         return $this;
  931.     }
  932.     
  933.     /**
  934.      * @return Collection<int, PendingLocation>
  935.      */
  936.     public function getPendingLocations(): Collection
  937.     {
  938.         return $this->pendingLocations;
  939.     }
  940.     public function addPendingLocation(PendingLocation $pendingLocation): self
  941.     {
  942.         if (!$this->pendingLocations->contains($pendingLocation)) {
  943.             $this->pendingLocations[] = $pendingLocation;
  944.             $pendingLocation->setCompany($this);
  945.         }
  946.         return $this;
  947.     }
  948.     public function removePendingLocation(PendingLocation $pendingLocation): void
  949.     {
  950.         if ($this->pendingLocations->removeElement($pendingLocation)) {
  951.             // set the owning side to null (unless already changed)
  952.             if ($pendingLocation->getCompany() === $this) {
  953.                 $pendingLocation->setCompany(null);
  954.             }
  955.         }
  956.     }
  957.     /**
  958.      * @return Collection<int, PostLike>
  959.      */
  960.     public function getLikes(): Collection
  961.     {
  962.         return $this->likes;
  963.     }
  964.     public function addLike(PostLike $like): self
  965.     {
  966.         if (!$this->likes->contains($like)) {
  967.             $this->likes[] = $like;
  968.             $like->setCompany($this);
  969.         }
  970.         return $this;
  971.     }
  972.     public function removeLike(PostLike $like): self
  973.     {
  974.         if ($this->likes->removeElement($like)) {
  975.             // set the owning side to null (unless already changed)
  976.             if ($like->getCompany() === $this) {
  977.                 $like->setCompany(null);
  978.             }
  979.         }
  980.         return $this;
  981.     }
  982.     /**
  983.      * @return Collection<int, PendingReservation>
  984.      */
  985.     public function getPendingReservations(): Collection
  986.     {
  987.         return $this->pendingReservations;
  988.     }
  989.     public function addPendingReservation(PendingReservation $pendingReservation): self
  990.     {
  991.         if (!$this->pendingReservations->contains($pendingReservation)) {
  992.             $this->pendingReservations[] = $pendingReservation;
  993.             $pendingReservation->setCompany($this);
  994.         }
  995.         return $this;
  996.     }
  997.     public function removePendingReservation(PendingReservation $pendingReservation): self
  998.     {
  999.         if ($this->pendingReservations->removeElement($pendingReservation)) {
  1000.             // set the owning side to null (unless already changed)
  1001.             if ($pendingReservation->getCompany() === $this) {
  1002.                 $pendingReservation->setCompany(null);
  1003.             }
  1004.         }
  1005.         return $this;
  1006.     }
  1007.     public function getCreatedAt(): ?\DateTimeInterface
  1008.     {
  1009.         return $this->createdAt;
  1010.     }
  1011.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  1012.     {
  1013.         $this->createdAt $createdAt;
  1014.         return $this;
  1015.     }
  1016.     public function getIsDirectReservationMode(): ?bool
  1017.     {
  1018.         return $this->isDirectReservationMode;
  1019.     }
  1020.     public function setIsDirectReservationMode(bool $isDirectReservationMode): self
  1021.     {
  1022.         $this->isDirectReservationMode $isDirectReservationMode;
  1023.         return $this;
  1024.     }
  1025.     public function getStripeId(): ?string
  1026.     {
  1027.         return $this->stripeId;
  1028.     }
  1029.     public function setStripeId(?string $stripeId): self
  1030.     {
  1031.         $this->stripeId $stripeId;
  1032.         return $this;
  1033.     }
  1034.     public function getStripeAccountId(): ?string
  1035.     {
  1036.         return $this->stripeAccountId;
  1037.     }
  1038.     public function setStripeAccountId(?string $stripeAccountId): self
  1039.     {
  1040.         $this->stripeAccountId $stripeAccountId;
  1041.         return $this;
  1042.     }
  1043. }