src/Entity/Offer.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Enum\ContratType;
  4. use App\Repository\OfferRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. use Symfony\Component\Serializer\Normalizer\NormalizableInterface;
  11. use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
  12. use Symfony\Component\String\Slugger\AsciiSlugger;
  13. /**
  14.  * @ORM\Entity(repositoryClass=OfferRepository::class)
  15.  * @ORM\HasLifecycleCallbacks()
  16.  */
  17. class Offer implements NormalizableInterface
  18. {
  19.     /**
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue
  22.      * @ORM\Column(type="integer")
  23.      */
  24.     public $id;
  25.     /**
  26.      * @ORM\Column(type="string", length=255)
  27.      */
  28.     public $title;
  29.     /**
  30.      * @ORM\Column(type="integer", nullable=true)
  31.      */
  32.     private $min_tjm;
  33.     /**
  34.      * @ORM\Column(type="integer", nullable=true)
  35.      */
  36.     private $max_tjm;
  37.     /**
  38.      * @ORM\Column(type="boolean")
  39.      */
  40.     public $open_society true;
  41.     /**
  42.      * @ORM\Column(type="string", length=255)
  43.      */
  44.     private $location;
  45.     /**
  46.      * @ORM\Column(type="text")
  47.      */
  48.     public $description;
  49.     /**
  50.      * @ORM\Column(type="integer")
  51.      */
  52.     private $duration_value;
  53.     /**
  54.      * @ORM\Column(type="string", length=255)
  55.      */
  56.     private $duration_type;
  57.     /**
  58.      * @ORM\Column(type="string", length=255)
  59.      */
  60.     private $mode_remote "Non";
  61.     /**
  62.      * @ORM\Column(type="string", length=255)
  63.      */
  64.     private $year_required;
  65.     /**
  66.      * @ORM\Column(type="boolean", nullable=true)
  67.      */
  68.     private $show_coordinate;
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity=Society::class, inversedBy="offers", cascade={"persist"})
  71.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  72.      */
  73.     private $society;
  74.     /**
  75.      * @ORM\Column(type="boolean", nullable=true)
  76.      */
  77.     private $editedByAdmin;
  78.     // getter et setter pour le champ editedByAdmin
  79.     public function getEditedByAdmin(): ?bool
  80.     {
  81.         return $this->editedByAdmin;
  82.     }
  83.     public function setEditedByAdmin(?bool $editedByAdmin): self
  84.     {
  85.         $this->editedByAdmin $editedByAdmin;
  86.         return $this;
  87.     }
  88.     /**
  89.      * @return mixed
  90.      */
  91.     public function getUser()
  92.     {
  93.         return $this->user;
  94.     }
  95.     /**
  96.      * @param mixed $user
  97.      */
  98.     public function setUser($user): void
  99.     {
  100.         $this->user $user;
  101.     }
  102.     /**
  103.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="offers")
  104.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  105.      */
  106.     private $user;
  107.     /**
  108.      * @ORM\Column(type="boolean")
  109.      */
  110.     private $renew;
  111.     /**
  112.      * @ORM\Column(type="integer",nullable=true)
  113.      */
  114.     private $invalid;
  115.     /**
  116.      * @return mixed
  117.      */
  118.     public function getInvalid()
  119.     {
  120.         return $this->invalid;
  121.     }
  122.     /**
  123.      * @param mixed $invalid
  124.      */
  125.     public function setInvalid($invalid): void
  126.     {
  127.         $this->invalid $invalid;
  128.     }
  129.     /**
  130.      * @ORM\Column(type="datetime", nullable=true)
  131.      */
  132.     private $created_at;
  133.     /**
  134.      * @ORM\Column(type="datetime", nullable=true)
  135.      */
  136.     private $expire_at;
  137.     /**
  138.      * @ORM\Column(type="string", length=5, nullable=true)
  139.      */
  140.     private $contact_civility;
  141.     /**
  142.      * @ORM\Column(type="string", length=255, nullable=true)
  143.      */
  144.     private $contact_mail;
  145.     /**
  146.      * @ORM\Column(type="string", length=20, nullable=true)
  147.      */
  148.     private $contact_phone;
  149.     /**
  150.      * @ORM\Column(type="string", length=10)
  151.      */
  152.     private $starting_type;
  153.     /**
  154.      * @ORM\Column(type="date", nullable=true)
  155.      */
  156.     private $startin_date;
  157.     /**
  158.      * @ORM\Column(type="string", length=255, nullable=true)
  159.      */
  160.     private $contact_name;
  161.     /**
  162.      * @ORM\Column(type="json", nullable=true)
  163.      */
  164.     private $questions = [];
  165.     /**
  166.      * @ORM\OneToMany(targetEntity=Candidature::class, mappedBy="offer")
  167.      */
  168.     private $candidatures;
  169.     /**
  170.      * @ORM\Column(type="integer", nullable=true)
  171.      */
  172.     private $view 0;
  173.     /**
  174.      * @ORM\Column(type="integer", nullable=true)
  175.      */
  176.     private $unseenCandidature 0;
  177.     /**
  178.      * @ORM\OneToMany(targetEntity=OfferFavorite::class, mappedBy="offer", orphanRemoval=true)
  179.      */
  180.     private $offerFavorites;
  181.     /**
  182.      * @ORM\Column(type="string", length=155, nullable=true)
  183.      */
  184.     private $ville;
  185.     /**
  186.      * @ORM\Column(type="boolean", nullable=true)
  187.      */
  188.     public $priorize;
  189.     /**
  190.      * @ORM\Column(type="boolean", nullable=true)
  191.      */
  192.     public $weekly;
  193.     /**
  194.      * @ORM\Column(type="boolean", nullable=true)
  195.      */
  196.     public $daily;
  197.     /**
  198.      * @ORM\ManyToOne(targetEntity=User::class)
  199.      */
  200.     private $userRecruteur;
  201.     /**
  202.      * @ORM\Column(type="datetime", nullable=true)
  203.      */
  204.     private $dateRemonter;
  205.     /**
  206.      * @ORM\Column(type="boolean", nullable=true)
  207.      */
  208.     private $checkLinkExtern;
  209.     /**
  210.      * @ORM\Column(type="text", nullable=true)
  211.      */
  212.     private $linkExtern;
  213.     /**
  214.      * @ORM\Column(type="string", length=9, nullable=true)
  215.      */
  216.     private $siren;
  217.     /**
  218.      * @ORM\Column(type="boolean", nullable=true)
  219.      */
  220.     private $shareOnSocialNetwork false;
  221.     /**
  222.      * @ORM\Column(type="boolean", nullable=true)
  223.      */
  224.     private $bySuperAdmin false;
  225.     /**
  226.      * @ORM\ManyToOne(targetEntity=User::class)
  227.      * @ORM\JoinColumn(nullable=true)
  228.      */
  229.     private ?User $userByAdmin null;
  230.     /**
  231.      * @ORM\Column(type="string", length=150, nullable=true)
  232.      */
  233.     private $slug null;
  234.     /**
  235.      * @ORM\Column(type="boolean", nullable=true)
  236.      */
  237.     public $siteMapIndex true;
  238.     /**
  239.      * @ORM\OneToMany(targetEntity=OfferVisit::class, mappedBy="offer", orphanRemoval=true)
  240.      */
  241.     private $offerVisits;
  242.     /**
  243.      * @ORM\Column(type="string", length=50, nullable=true)
  244.      */
  245.     private $cdi;
  246.     /**
  247.      * @ORM\Column(type="integer",  nullable=true)
  248.      */
  249.     private $montantMin;
  250.     /**
  251.      * @ORM\Column(type="text",  nullable=true)
  252.      */
  253.     private $reasonRejection;
  254.     /**
  255.      * @ORM\Column(type="json", nullable=true)
  256.      */
  257.     private ?array $contrats = []; // Stocke plusieurs contrats en tant que tableau
  258.     public function getContrats(): ?array
  259.     {
  260.         return $this->contrats;
  261.     }
  262.     public function setContrats(?array $contrats): self
  263.     {
  264.         $this->contrats $contrats// Le tableau de valeurs
  265.         return $this;
  266.     }
  267.     /**
  268.      * @return mixed
  269.      */
  270.     public function getReasonRejection()
  271.     {
  272.         return $this->reasonRejection;
  273.     }
  274.     /**
  275.      * @param mixed $reasonRejection
  276.      */
  277.     public function setReasonRejection($reasonRejection): void
  278.     {
  279.         $this->reasonRejection $reasonRejection;
  280.     }
  281.     /**
  282.      * @ORM\Column(type="integer",  nullable=true)
  283.      */
  284.     private $montantMax;
  285.     /**
  286.      * @return mixed
  287.      */
  288.     public function getCdi()
  289.     {
  290.         return $this->cdi;
  291.     }
  292.     /**
  293.      * @param mixed $cdi
  294.      */
  295.     public function setCdi($cdi): void
  296.     {
  297.         $this->cdi $cdi;
  298.     }
  299.     /**
  300.      * @return mixed
  301.      */
  302.     public function getMontantMin()
  303.     {
  304.         return $this->montantMin;
  305.     }
  306.     /**
  307.      * @param mixed $montantMin
  308.      */
  309.     public function setMontantMin($montantMin): void
  310.     {
  311.         $this->montantMin $montantMin;
  312.     }
  313.     /**
  314.      * @return mixed
  315.      */
  316.     public function getMontantMax()
  317.     {
  318.         return $this->montantMax;
  319.     }
  320.     /**
  321.      * @param mixed $montantMax
  322.      */
  323.     public function setMontantMax($montantMax): void
  324.     {
  325.         $this->montantMax $montantMax;
  326.     }
  327.     public function __construct()
  328.     {
  329.         $this->candidatures = new ArrayCollection();
  330.         $this->offerFavorites = new ArrayCollection();
  331.         $this->offerVisits = new ArrayCollection();
  332.     }
  333.     //---------------------------------------------------------------
  334.     public function updateSlug()
  335.     {
  336.         $slugger = new AsciiSlugger();
  337.         $defaultNum 10000;
  338.         $numero $defaultNum $this->getId();
  339.         $slug strtolower($slugger->slug($this->getTitle() . '-' $numero));
  340.         $this->setSlug($slug);
  341.     }
  342.     public function getCodePostal(): ?string
  343.     {
  344.         if ($this->ville) {
  345.             $villeCP explode(' '$this->getVille());
  346.             $cp $villeCP[0];
  347.             if (strlen($cp) === && ctype_digit($cp)) {
  348.                 return $cp;
  349.             }
  350.         }
  351.         return null;
  352.     }
  353.     //---------------------------------------------------------------
  354.     public function getId(): ?int
  355.     {
  356.         return $this->id;
  357.     }
  358.     public function getTitle(): ?string
  359.     {
  360.         return $this->title;
  361.     }
  362.     public function setTitle(string $title): self
  363.     {
  364.         $this->title $title;
  365.         return $this;
  366.     }
  367.     public function getMinTjm(): ?int
  368.     {
  369.         return $this->min_tjm;
  370.     }
  371.     public function setMinTjm(?int $min_tjm): self
  372.     {
  373.         $this->min_tjm $min_tjm;
  374.         return $this;
  375.     }
  376.     public function getMaxTjm(): ?int
  377.     {
  378.         return $this->max_tjm;
  379.     }
  380.     public function setMaxTjm(?int $max_tjm): self
  381.     {
  382.         $this->max_tjm $max_tjm;
  383.         return $this;
  384.     }
  385.     public function getOpenSociety(): ?bool
  386.     {
  387.         return $this->open_society;
  388.     }
  389.     public function setOpenSociety(bool $open_society): self
  390.     {
  391.         $this->open_society $open_society;
  392.         return $this;
  393.     }
  394.     public function getLocation(): ?string
  395.     {
  396.         return $this->location;
  397.     }
  398.     public function setLocation(?string $location): self
  399.     {
  400.         $this->location $location;
  401.         return $this;
  402.     }
  403.     public function getDescription(): ?string
  404.     {
  405.         return $this->description;
  406.     }
  407.     public function setDescription(string $description): self
  408.     {
  409.         $this->description $description;
  410.         return $this;
  411.     }
  412.     public function getDurationValue(): ?int
  413.     {
  414.         return $this->duration_value;
  415.     }
  416.     public function setDurationValue(?int $duration_value): self
  417.     {
  418.         $this->duration_value $duration_value;
  419.         return $this;
  420.     }
  421.     public function getDurationType(): ?string
  422.     {
  423.         return $this->duration_type;
  424.     }
  425.     public function setDurationType(string $duration_type): self
  426.     {
  427.         $this->duration_type $duration_type;
  428.         return $this;
  429.     }
  430.     public function getModeRemote(): ?string
  431.     {
  432.         return $this->mode_remote;
  433.     }
  434.     public function setModeRemote(string $mode_remote): self
  435.     {
  436.         $this->mode_remote $mode_remote;
  437.         return $this;
  438.     }
  439.     public function getYearRequired(): ?string
  440.     {
  441.         return $this->year_required;
  442.     }
  443.     public function setYearRequired(string $year_required): self
  444.     {
  445.         $this->year_required $year_required;
  446.         return $this;
  447.     }
  448.     public function getShowCoordinate(): ?bool
  449.     {
  450.         return $this->show_coordinate;
  451.     }
  452.     public function setShowCoordinate(?bool $show_coordinate): self
  453.     {
  454.         $this->show_coordinate $show_coordinate;
  455.         return $this;
  456.     }
  457.     public function getSociety(): ?Society
  458.     {
  459.         return $this->society;
  460.     }
  461.     public function setSociety(?Society $society): self
  462.     {
  463.         $this->society $society;
  464.         return $this;
  465.     }
  466.     public function getRenew(): ?bool
  467.     {
  468.         return $this->renew;
  469.     }
  470.     public function setRenew(bool $renew): self
  471.     {
  472.         $this->renew $renew;
  473.         return $this;
  474.     }
  475.     public function getCreatedAt(): ?\DateTimeInterface
  476.     {
  477.         return $this->created_at;
  478.     }
  479.     public function setCreatedAt(?\DateTimeInterface $created_at): self
  480.     {
  481.         $this->created_at $created_at;
  482.         return $this;
  483.     }
  484.     /**
  485.      * @ORM\PrePersist
  486.      */
  487.     public function setCreatedAtAutomatically()
  488.     {
  489.         if ($this->getCreatedAt() === null) {
  490.             $this->setCreatedAt(new \DateTime());
  491.         }
  492.         if ($this->getLinkExtern() !== null or $this->user !== null) {
  493.             $expire = (new \DateTime())->add(new \DateInterval('P2M'));
  494.         } else {
  495.             $expire = (new \DateTime())->add(new \DateInterval('P6M'));
  496.         }
  497.         $this->setExpireAt($expire);
  498.     }
  499.     public function getExpireAt(): ?\DateTimeInterface
  500.     {
  501.         return $this->expire_at;
  502.     }
  503.     public function setExpireAt(?\DateTimeInterface $expire_at): self
  504.     {
  505.         $this->expire_at $expire_at;
  506.         return $this;
  507.     }
  508.     public function getCostText(): string
  509.     {
  510.         if (empty($this->max_tjm) && empty($this->min_tjm)) {
  511.             return 'Selon profil';
  512.         }
  513.         if (empty($this->min_tjm)) {
  514.             return 'Max ' $this->max_tjm '€ HT';
  515.         }
  516.         if (empty($this->max_tjm)) {
  517.             return 'Min ' $this->min_tjm '€ HT';
  518.         }
  519.         // Affiche une seule valeur si min = max
  520.         if ($this->min_tjm == $this->max_tjm) {
  521.             return $this->min_tjm '€ HT';
  522.         }
  523.         return $this->min_tjm ' - ' $this->max_tjm '€ HT';
  524.     }
  525.     public function getCostTextCdi(): string
  526.     {
  527.         if (empty($this->montantMax) && empty($this->montantMin)) {
  528.             return 'Selon profil';
  529.         }
  530.         if (empty($this->montantMin)) {
  531.             return 'Max ' $this->formatK($this->montantMax) . '€ annuel';
  532.         }
  533.         if (empty($this->montantMax)) {
  534.             return 'Min ' $this->formatMin($this->montantMin) . '€ annuel';
  535.         }
  536.         // Affiche une seule valeur si min = max
  537.         if ($this->montantMin == $this->montantMax) {
  538.             return $this->formatK($this->montantMin) . '€ annuel';
  539.         }
  540.         return $this->formatMin($this->montantMin) . ' - ' $this->formatK($this->montantMax) . '€ annuel';
  541.     }
  542.     /**
  543.      * Formate un nombre en ajoutant 'K' si >= 1000 (uniquement pour le max)
  544.      */
  545.     private function formatK(int $amount): string
  546.     {
  547.         return ($amount >= 1000) ? ($amount 1000) . 'K' : (string)$amount;
  548.     }
  549.     /**
  550.      * Formate le min en supprimant les milliers inutiles
  551.      */
  552.     private function formatMin(int $amount): string
  553.     {
  554.         return ($amount >= 1000) ? (string)($amount 1000) : (string)$amount;
  555.     }
  556.     public function getDurationText(): string
  557.     {
  558.         $ending = ($this->duration_type === 'an' && $this->duration_value 1) ? 's' '';
  559.         return $this->duration_value ' ' $this->duration_type $ending;
  560.     }
  561.     public function getContactCivility(): ?string
  562.     {
  563.         return $this->contact_civility;
  564.     }
  565.     public function setContactCivility(?string $contact_civility): self
  566.     {
  567.         $this->contact_civility $contact_civility;
  568.         return $this;
  569.     }
  570.     public function getContactMail(): ?string
  571.     {
  572.         return $this->contact_mail;
  573.     }
  574.     public function setContactMail(?string $contact_mail): self
  575.     {
  576.         $this->contact_mail $contact_mail;
  577.         return $this;
  578.     }
  579.     public function getContactPhone(): ?string
  580.     {
  581.         return $this->contact_phone;
  582.     }
  583.     public function setContactPhone(?string $contact_phone): self
  584.     {
  585.         $this->contact_phone $contact_phone;
  586.         return $this;
  587.     }
  588.     public function getStartingType(): ?string
  589.     {
  590.         return $this->starting_type;
  591.     }
  592.     public function setStartingType(string $starting_type): self
  593.     {
  594.         $this->starting_type $starting_type;
  595.         return $this;
  596.     }
  597.     public function getStartinDate(): ?\DateTimeInterface
  598.     {
  599.         return $this->startin_date;
  600.     }
  601.     public function setStartinDate(?\DateTimeInterface $startin_date): self
  602.     {
  603.         $this->startin_date $startin_date;
  604.         return $this;
  605.     }
  606.     public function getContactName(): ?string
  607.     {
  608.         return $this->contact_name;
  609.     }
  610.     public function setContactName(?string $contact_name): self
  611.     {
  612.         $this->contact_name $contact_name;
  613.         return $this;
  614.     }
  615.     public function getQuestions(): ?array
  616.     {
  617.         return $this->questions;
  618.     }
  619.     public function setQuestions(?array $questions): self
  620.     {
  621.         if (is_array($questions)) {
  622.             foreach ($questions as $key => $question) {
  623.                 if (empty($question)) {
  624.                     unset($questions[$key]);
  625.                 }
  626.             }
  627.         }
  628.         $this->questions $questions;
  629.         return $this;
  630.     }
  631.     /**
  632.      * @return Collection|Candidature[]
  633.      */
  634.     public function getCandidatures(): Collection
  635.     {
  636.         return $this->candidatures;
  637.     }
  638.     public function addCandidature(Candidature $candidature): self
  639.     {
  640.         if (!$this->candidatures->contains($candidature)) {
  641.             $this->candidatures[] = $candidature;
  642.             $candidature->setOffer($this);
  643.         }
  644.         return $this;
  645.     }
  646.     public function removeCandidature(Candidature $candidature): self
  647.     {
  648.         if ($this->candidatures->removeElement($candidature)) {
  649.             // set the owning side to null (unless already changed)
  650.             if ($candidature->getOffer() === $this) {
  651.                 $candidature->setOffer(null);
  652.             }
  653.         }
  654.         return $this;
  655.     }
  656.     public function getView(): ?int
  657.     {
  658.         return $this->view ?? 0;
  659.     }
  660.     public function setView(?int $view): self
  661.     {
  662.         $this->view $view;
  663.         return $this;
  664.     }
  665.     public function incrementView(): self
  666.     {
  667.         $this->view++;
  668.         return $this;
  669.     }
  670.     public function getUnseenCandidature(): ?int
  671.     {
  672.         return $this->unseenCandidature ?? 0;
  673.     }
  674.     public function setUnseenCandidature(?int $unseenCandidature): self
  675.     {
  676.         $this->unseenCandidature $unseenCandidature;
  677.         return $this;
  678.     }
  679.     public function incrementUnseenCandidature(): self
  680.     {
  681.         $this->unseenCandidature++;
  682.         return $this;
  683.     }
  684.     public function normalize(NormalizerInterface $normalizerstring $format null, array $context = []): array
  685.     {
  686.         return [
  687.             'title' => $this->getTitle(),
  688.             'cost_min' => $this->getMinTjm(),
  689.             'cost_max' => $this->getMaxTjm(),
  690.             'location' => $this->getLocation(),
  691.             'created_at' => $this->getCreatedAt(),
  692.             'expire_at' => $this->getExpireAt(),
  693.             'description' => $this->getDescription(),
  694.             'mode_remote' => $this->getModeRemote(),
  695.             'timestamp_create' => $this->getCreatedAt()->getTimestamp(),
  696.             'priorize' => $this->getPriorize(),
  697.             'daily' => $this->getDaily(),
  698.             'weekly' => $this->getWeekly(),
  699.             'identification' => $this->getId(),
  700.         ];
  701.     }
  702.     /**
  703.      * @return Collection|OfferFavorite[]
  704.      */
  705.     public function getOfferFavorites(): Collection
  706.     {
  707.         return $this->offerFavorites;
  708.     }
  709.     public function addOfferFavorite(OfferFavorite $offerFavorite): self
  710.     {
  711.         if (!$this->offerFavorites->contains($offerFavorite)) {
  712.             $this->offerFavorites[] = $offerFavorite;
  713.             $offerFavorite->setOffer($this);
  714.         }
  715.         return $this;
  716.     }
  717.     public function removeOfferFavorite(OfferFavorite $offerFavorite): self
  718.     {
  719.         if ($this->offerFavorites->removeElement($offerFavorite)) {
  720.             // set the owning side to null (unless already changed)
  721.             if ($offerFavorite->getOffer() === $this) {
  722.                 $offerFavorite->setOffer(null);
  723.             }
  724.         }
  725.         return $this;
  726.     }
  727.     public function getVille(): ?string
  728.     {
  729.         return $this->ville;
  730.     }
  731.     public function setVille(?string $ville): self
  732.     {
  733.         $this->ville $ville;
  734.         return $this;
  735.     }
  736.     public function getAddress(): ?string
  737.     {
  738.         return empty($this->ville) ? $this->location $this->ville;
  739.     }
  740.     public function getPriorize(): ?bool
  741.     {
  742.         return $this->priorize;
  743.     }
  744.     public function setPriorize(?bool $priorize): self
  745.     {
  746.         $this->priorize $priorize;
  747.         return $this;
  748.     }
  749.     public function getWeekly(): ?bool
  750.     {
  751.         return $this->weekly;
  752.     }
  753.     public function setWeekly(?bool $weekly): self
  754.     {
  755.         $this->weekly $weekly;
  756.         return $this;
  757.     }
  758.     public function getDaily(): ?bool
  759.     {
  760.         return $this->daily;
  761.     }
  762.     public function setDaily(?bool $daily): self
  763.     {
  764.         $this->daily $daily;
  765.         return $this;
  766.     }
  767.     public function isToday(): bool
  768.     {
  769.         $date = new \DateTime();
  770.         $matchDate $this->getCreatedAt();
  771.         $interval $date->diff($matchDate);
  772.         return $interval->days == 0;
  773.     }
  774.     public function isOpenSociety(): ?bool
  775.     {
  776.         return $this->open_society;
  777.     }
  778.     public function isShowCoordinate(): ?bool
  779.     {
  780.         return $this->show_coordinate;
  781.     }
  782.     public function isRenew(): ?bool
  783.     {
  784.         return $this->renew;
  785.     }
  786.     public function isPriorize(): ?bool
  787.     {
  788.         return $this->priorize;
  789.     }
  790.     public function isWeekly(): ?bool
  791.     {
  792.         return $this->weekly;
  793.     }
  794.     public function isDaily(): ?bool
  795.     {
  796.         return $this->daily;
  797.     }
  798.     public function getUserRecruteur(): ?User
  799.     {
  800.         return $this->userRecruteur;
  801.     }
  802.     public function setUserRecruteur(?User $userRecruteur): self
  803.     {
  804.         $this->userRecruteur $userRecruteur;
  805.         return $this;
  806.     }
  807.     public function getDateRemonter(): ?\DateTimeInterface
  808.     {
  809.         return $this->dateRemonter;
  810.     }
  811.     public function setDateRemonter(?\DateTimeInterface $dateRemonter): Offer
  812.     {
  813.         $this->dateRemonter $dateRemonter;
  814.         return $this;
  815.     }
  816.     public function isCheckLinkExtern(): ?bool
  817.     {
  818.         return $this->checkLinkExtern;
  819.     }
  820.     public function setCheckLinkExtern(?bool $checkLinkExtern): self
  821.     {
  822.         $this->checkLinkExtern $checkLinkExtern;
  823.         return $this;
  824.     }
  825.     public function getLinkExtern(): ?string
  826.     {
  827.         return $this->linkExtern;
  828.     }
  829.     public function setLinkExtern(?string $linkExtern): self
  830.     {
  831.         $this->linkExtern $linkExtern;
  832.         return $this;
  833.     }
  834.     public function getSiren(): ?string
  835.     {
  836.         return $this->siren;
  837.     }
  838.     public function setSiren(?string $siren): self
  839.     {
  840.         $this->siren $siren;
  841.         return $this;
  842.     }
  843.     public function isShareOnSocialNetwork(): ?bool
  844.     {
  845.         return $this->shareOnSocialNetwork;
  846.     }
  847.     public function setShareOnSocialNetwork(?bool $shareOnSocialNetwork): self
  848.     {
  849.         $this->shareOnSocialNetwork $shareOnSocialNetwork;
  850.         return $this;
  851.     }
  852.     public function isBySuperAdmin(): ?bool
  853.     {
  854.         return $this->bySuperAdmin;
  855.     }
  856.     public function setBySuperAdmin(?bool $bySuperAdmin): self
  857.     {
  858.         $this->bySuperAdmin $bySuperAdmin;
  859.         return $this;
  860.     }
  861.     public function getUserByAdmin(): ?User
  862.     {
  863.         return $this->userByAdmin;
  864.     }
  865.     public function setUserByAdmin(?User $userByAdmin): self
  866.     {
  867.         $this->userByAdmin $userByAdmin;
  868.         return $this;
  869.     }
  870.     public function getSlug(): ?string
  871.     {
  872.         return $this->slug;
  873.     }
  874.     public function setSlug(?string $slug): self
  875.     {
  876.         $this->slug $slug;
  877.         return $this;
  878.     }
  879.     /**
  880.      * @return Collection<int, OfferVisit>
  881.      */
  882.     public function getOfferVisits(): Collection
  883.     {
  884.         return $this->offerVisits;
  885.     }
  886.     public function addOfferVisit(OfferVisit $offerVisit): self
  887.     {
  888.         if (!$this->offerVisits->contains($offerVisit)) {
  889.             $this->offerVisits->add($offerVisit);
  890.             $offerVisit->setOffer($this);
  891.         }
  892.         return $this;
  893.     }
  894.     public function removeOfferVisit(OfferVisit $offerVisit): self
  895.     {
  896.         if ($this->offerVisits->removeElement($offerVisit)) {
  897.             // set the owning side to null (unless already changed)
  898.             if ($offerVisit->getOffer() === $this) {
  899.                 $offerVisit->setOffer(null);
  900.             }
  901.         }
  902.         return $this;
  903.     }
  904.     public function isSiteMapIndex(): ?bool
  905.     {
  906.         return $this->siteMapIndex;
  907.     }
  908.     public function setSiteMapIndex(?bool $siteMapIndex): self
  909.     {
  910.         $this->siteMapIndex $siteMapIndex;
  911.         return $this;
  912.     }
  913. }