src/Entity/Vetoadom/Referant.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vetoadom;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. /**
  9.  * Referant
  10.  *
  11.  * @ORM\Table(name="referant", uniqueConstraints={@ORM\UniqueConstraint(name="nom", columns={"nom"})}, indexes={@ORM\Index(name="FK_referant_ville", columns={"ville_id"})})
  12.  * @ORM\Entity(repositoryClass="App\Repository\Vetoadom\ReferantRepository")
  13.  * @ORM\HasLifecycleCallbacks()
  14.  * @UniqueEntity(
  15.  *     groups={"nom"},
  16.  *     fields={"nom"},
  17.  *     errorPath="nom",
  18.  *     message="page_referants_horaires_consignes_modifier.referant_nom_exist"
  19.  *  )
  20.  */
  21. class Referant
  22. {
  23.     /**
  24.      * @var int
  25.      *
  26.      * @ORM\Column(name="id", type="integer", nullable=false)
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="IDENTITY")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(name="nom", type="string", length=190, nullable=false)
  35.      * @Assert\NotBlank(
  36.      *      groups={"nom"},
  37.      *      message="common.blank"
  38.      *   )
  39.      * @Assert\Length(
  40.      *      groups={"nom"},
  41.      *      max=190,
  42.      *      maxMessage="common.too_long"
  43.      *   )
  44.      */
  45.     private $nom;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="adresse", type="string", length=38, nullable=false)
  50.      * @Assert\NotBlank(
  51.      *      groups={"adresse"},
  52.      *      message="common.blank"
  53.      *   )
  54.      * @Assert\Length(
  55.      *      groups={"adresse"},
  56.      *      max=38,
  57.      *      maxMessage="common.too_long"
  58.      *   )
  59.      */
  60.     private $adresse;
  61.     /**
  62.      * @var string|null
  63.      *
  64.      * @ORM\Column(name="consigne", type="text", length=65535, nullable=true)
  65.      * @Assert\Length(
  66.      *       groups={"consigne"},
  67.      *       max=65535,
  68.      *       maxMessage="common.too_long"
  69.      *    )
  70.      */
  71.     private $consigne;
  72.     /**
  73.      * @var string|null
  74.      *
  75.      * @ORM\Column(name="informations_horaires", type="text", length=65535, nullable=true)
  76.      * @Assert\Length(
  77.      *        groups={"informationsHoraires"},
  78.      *        max=65535,
  79.      *        maxMessage="common.too_long"
  80.      *     )
  81.      */
  82.     private $informationsHoraires;
  83.     /**
  84.      * @var string|null
  85.      *
  86.      * @ORM\Column(name="informations_conges", type="text", length=65535, nullable=true)
  87.      * @Assert\Length(
  88.      *        groups={"informationsConges"},
  89.      *        max=65535,
  90.      *        maxMessage="common.too_long"
  91.      *     )
  92.      */
  93.     private $informationsConges;
  94.     /**
  95.      * @var \DateTime|null
  96.      *
  97.      * @ORM\Column(name="horaire_special_debut", type="date", nullable=true)
  98.      */
  99.     private $horaireSpecialDebut;
  100.     /**
  101.      * @var \DateTime|null
  102.      *
  103.      * @ORM\Column(name="horaire_special_fin", type="date", nullable=true)
  104.      */
  105.     private $horaireSpecialFin;
  106.     /**
  107.      * @var string|null
  108.      *
  109.      * @ORM\Column(name="consignes_generales", type="text", length=65535, nullable=true)
  110.      * @Assert\Length(
  111.      *        groups={"consignesGenerales"},
  112.      *        max=65535,
  113.      *        maxMessage="common.too_long"
  114.      *     )
  115.      */
  116.     private $consignesGenerales;
  117.     /**
  118.      * @var string|null
  119.      *
  120.      * @ORM\Column(name="consignes_post_operatoire_suivi", type="text", length=65535, nullable=true)
  121.      * @Assert\Length(
  122.      *        groups={"consignesPostOperatoireSuivi"},
  123.      *        max=65535,
  124.      *        maxMessage="common.too_long"
  125.      *     )
  126.      */
  127.     private $consignesPostOperatoireSuivi;
  128.     /**
  129.      * @var string|null
  130.      *
  131.      * @ORM\Column(name="hospitalisation1", type="string", length=190, nullable=true)
  132.      * @Assert\Length(
  133.      *      groups={"hospitalisation1"},
  134.      *      max=190,
  135.      *      maxMessage="common.too_long"
  136.      *   )
  137.      */
  138.     private $hospitalisation1;
  139.     /**
  140.      * @var string|null
  141.      *
  142.      * @ORM\Column(name="hospitalisation2", type="string", length=190, nullable=true)
  143.      * @Assert\Length(
  144.      *      groups={"hospitalisation2"},
  145.      *      max=190,
  146.      *      maxMessage="common.too_long"
  147.      *   )
  148.      */
  149.     private $hospitalisation2;
  150.     /**
  151.      * @var string|null
  152.      *
  153.      * @ORM\Column(name="hospitalisation3", type="string", length=190, nullable=true)
  154.      * @Assert\Length(
  155.      *      groups={"hospitalisation3"},
  156.      *      max=190,
  157.      *      maxMessage="common.too_long"
  158.      *   )
  159.      */
  160.     private $hospitalisation3;
  161.     /**
  162.      * @var string|null
  163.      *
  164.      * @ORM\Column(name="cas_general", type="string", length=190, nullable=true)
  165.      * @Assert\Length(
  166.      *      groups={"casGeneral"},
  167.      *      max=190,
  168.      *      maxMessage="common.too_long"
  169.      *   )
  170.      */
  171.     private $casGeneral;
  172.     /**
  173.      * @var string|null
  174.      *
  175.      * @ORM\Column(name="chirurgie_osseuse", type="string", length=190, nullable=true)
  176.      * @Assert\Length(
  177.      *      groups={"chirurgieOsseuse"},
  178.      *      max=190,
  179.      *      maxMessage="common.too_long"
  180.      *   )
  181.      */
  182.     private $chirurgieOsseuse;
  183.     /**
  184.      * @var string|null
  185.      *
  186.      * @ORM\Column(name="chirurgie_tissu_mou", type="string", length=190, nullable=true)
  187.      * @Assert\Length(
  188.      *      groups={"chirurgieTissuMou"},
  189.      *      max=190,
  190.      *      maxMessage="common.too_long"
  191.      *   )
  192.      */
  193.     private $chirurgieTissuMou;
  194.     /**
  195.      * @var string|null
  196.      *
  197.      * @ORM\Column(name="scanner", type="string", length=190, nullable=true)
  198.      * @Assert\Length(
  199.      *      groups={"scanner"},
  200.      *      max=190,
  201.      *      maxMessage="common.too_long"
  202.      *   )
  203.      */
  204.     private $scanner;
  205.     /**
  206.      * @var string|null
  207.      *
  208.      * @ORM\Column(name="transfusion", type="string", length=190, nullable=true)
  209.      * @Assert\Length(
  210.      *      groups={"transfusion"},
  211.      *      max=190,
  212.      *      maxMessage="common.too_long"
  213.      *   )
  214.      */
  215.     private $transfusion;
  216.     /**
  217.      * @var string|null
  218.      *
  219.      * @ORM\Column(name="endoscopie", type="string", length=190, nullable=true)
  220.      * @Assert\Length(
  221.      *      groups={"endoscopie"},
  222.      *      max=190,
  223.      *      maxMessage="common.too_long"
  224.      *   )
  225.      */
  226.     private $endoscopie;
  227.     /**
  228.      * @var string|null
  229.      *
  230.      * @ORM\Column(name="externe_id", type="string", length=8, nullable=true)
  231.      * @Assert\Length(
  232.      *      groups={"externeId"},
  233.      *      max=8,
  234.      *      maxMessage="common.too_long"
  235.      *   )
  236.      */
  237.     private $externeId;
  238.     /**
  239.      * @var string|null
  240.      *
  241.      * @ORM\Column(name="sda", type="string", length=10, nullable=true, options={"fixed"=true})
  242.      * @Assert\Regex(
  243.      *          groups={"sda"},
  244.      *          pattern="/^\d{10}$/",
  245.      *          message="common.format_wrong"
  246.      *       )
  247.      */
  248.     private $sda;
  249.     /**
  250.      * @var bool
  251.      *
  252.      * @ORM\Column(name="continuite_soin", type="boolean", nullable=false)
  253.      */
  254.     private $continuiteSoin '0';
  255.     /**
  256.      * @var bool
  257.      *
  258.      * @ORM\Column(name="envoi_cr_email", type="boolean", nullable=false)
  259.      */
  260.     private $envoiCrEmail '0';
  261.     /**
  262.      * @var bool
  263.      *
  264.      * @ORM\Column(name="envoi_message", type="boolean", nullable=false)
  265.      */
  266.     private $envoiMessage '0';
  267.     /**
  268.      * @var string|null
  269.      *
  270.      * @ORM\Column(name="informations_internes", type="text", length=65535, nullable=true)
  271.      * @Assert\Length(
  272.      *        groups={"informationsInternes"},
  273.      *        max=65535,
  274.      *        maxMessage="common.too_long"
  275.      *     )
  276.      */
  277.     private $informationsInternes;
  278.     /**
  279.      * @var \DateTime|null
  280.      *
  281.      * @ORM\Column(name="alerte_regulateur_date_debut", type="date", nullable=true)
  282.      * @Assert\NotBlank(
  283.      *       groups={"alerteRegulateurDateDebut"},
  284.      *       message="common.blank"
  285.      *    )
  286.      */
  287.     private $alerteRegulateurDateDebut;
  288.     /**
  289.      * @var \DateTime|null
  290.      *
  291.      * @ORM\Column(name="alerte_regulateur_date_fin", type="date", nullable=true)
  292.      * @Assert\NotBlank(
  293.      *        groups={"alerteRegulateurDateFin"},
  294.      *        message="common.blank"
  295.      *     )
  296.      */
  297.     private $alerteRegulateurDateFin;
  298.     /**
  299.      * @var string|null
  300.      *
  301.      * @ORM\Column(name="alerte_regulateur_motif", type="text", length=65535, nullable=true)
  302.      * @Assert\NotBlank(
  303.      *        groups={"alerteRegulateurMotif"},
  304.      *        message="common.blank"
  305.      *     )
  306.      * @Assert\Length(
  307.      *        groups={"alerteRegulateurMotif"},
  308.      *        max=65535,
  309.      *        maxMessage="common.too_long"
  310.      *     )
  311.      */
  312.     private $alerteRegulateurMotif;
  313.     /**
  314.      * @var int
  315.      *
  316.      * @ORM\Column(name="associe_responsable_id", type="integer", nullable=true)
  317.      */
  318.     private $associeResponsableId;
  319.     /**
  320.      * @var \DateTime|null
  321.      *
  322.      * @ORM\Column(name="date_derniere_visite", type="date", nullable=true)
  323.      */
  324.     private $dateDerniereVisite;
  325.     /**
  326.      * @var string|null
  327.      *
  328.      * @ORM\Column(name="suivi_marketing", type="text", length=65535, nullable=true)
  329.      * @Assert\Length(
  330.      *        groups={"suiviMarketing"},
  331.      *        max=65535,
  332.      *        maxMessage="common.too_long"
  333.      *     )
  334.      */
  335.     private $suiviMarketing;
  336.     /**
  337.      * @var string|null
  338.      *
  339.      * @ORM\Column(name="test_ligne", type="string", length=190, nullable=true)
  340.      * @Assert\Length(
  341.      *      groups={"testLigne"},
  342.      *      max=190,
  343.      *      maxMessage="common.too_long"
  344.      *   )
  345.      */
  346.     private $testLigne;
  347.     /**
  348.      * @var \DateTime|null
  349.      *
  350.      * @ORM\Column(name="date_recontacte", type="date", nullable=true)
  351.      */
  352.     private $dateRecontacte;
  353.     /**
  354.      * @var \DateTime
  355.      *
  356.      * @ORM\Column(name="date_creation", type="datetime", nullable=false)
  357.      */
  358.     private $dateCreation;
  359.     /**
  360.      * @var \DateTime
  361.      *
  362.      * @ORM\Column(name="date_modification", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
  363.      */
  364.     private $dateModification;
  365.     /**
  366.      * @var \Ville
  367.      *
  368.      * @ORM\ManyToOne(targetEntity="Ville")
  369.      * @ORM\JoinColumns({
  370.      *   @ORM\JoinColumn(name="ville_id", referencedColumnName="id")
  371.      * })
  372.      * @Assert\NotBlank(
  373.      *       groups={"ville"},
  374.      *       message="common.blank"
  375.      *    )
  376.      */
  377.     private $ville;
  378.     /**
  379.      * One SecteurZone has many Document. This is the inverse side.
  380.      * @ORM\OneToMany(targetEntity="Document", mappedBy="referant")
  381.      */
  382.     private $documents;
  383.     /**
  384.      * @var Collection
  385.      *
  386.      * One Referant has many ReferantConges. This is the inverse side.
  387.      * @ORM\OneToMany(targetEntity="ReferantConges", mappedBy="referant")
  388.      * @ORM\OrderBy({"dateDebut" = "ASC"})
  389.      */
  390.     private $referantConges;
  391.     /**
  392.      * @var Collection
  393.      *
  394.      * One Referant has many ReferantEmail. This is the inverse side.
  395.      * @ORM\OneToMany(targetEntity="ReferantEmail", mappedBy="referant")
  396.      */
  397.     private $referantEmail;
  398.     /**
  399.      * @var Collection
  400.      *
  401.      * One Referant has many ReferantEquipe. This is the inverse side.
  402.      * @ORM\OneToMany(targetEntity="ReferantEquipe", mappedBy="referant")
  403.      */
  404.     private $referantEquipe;
  405.     /**
  406.      * @var Collection
  407.      *
  408.      * One Referant has many ReferantFiltrageClient. This is the inverse side.
  409.      * @ORM\OneToMany(targetEntity="ReferantFiltrageClient", mappedBy="referant")
  410.      */
  411.     private $referantFiltrageClient;
  412.     /**
  413.      * @var Collection
  414.      *
  415.      * One Referant has many ReferantHoraire. This is the inverse side.
  416.      * @ORM\OneToMany(targetEntity="ReferantHoraire", mappedBy="referant")
  417.      */
  418.     private $referantHoraire;
  419.     /**
  420.      * @var Collection
  421.      *
  422.      * One Referant has many ReferantTelephone. This is the inverse side.
  423.      * @ORM\OneToMany(targetEntity="ReferantTelephone", mappedBy="referant")
  424.      */
  425.     private $referantTelephone;
  426.     /**
  427.      * Constructor
  428.      */
  429.     public function __construct()
  430.     {
  431.         $this->documents = new ArrayCollection();
  432.         $this->referantConges = new ArrayCollection();
  433.         $this->referantEmail = new ArrayCollection();
  434.         $this->referantEquipe = new ArrayCollection();
  435.         $this->referantFiltrageClient = new ArrayCollection();
  436.         $this->referantHoraire = new ArrayCollection();
  437.         $this->referantTelephone = new ArrayCollection();
  438.     }
  439.     public function getId(): ?int
  440.     {
  441.         return $this->id;
  442.     }
  443.     public function getNom(): ?string
  444.     {
  445.         return $this->nom;
  446.     }
  447.     public function setNom(string $nom): self
  448.     {
  449.         $this->nom $nom;
  450.         return $this;
  451.     }
  452.     public function getAdresse(): ?string
  453.     {
  454.         return $this->adresse;
  455.     }
  456.     public function setAdresse(string $adresse): self
  457.     {
  458.         $this->adresse $adresse;
  459.         return $this;
  460.     }
  461.     public function getConsigne(): ?string
  462.     {
  463.         return $this->consigne;
  464.     }
  465.     public function setConsigne(?string $consigne): self
  466.     {
  467.         if ($consigne === ''$consigne null;
  468.         $this->consigne $consigne;
  469.         return $this;
  470.     }
  471.     public function getInformationsHoraires(): ?string
  472.     {
  473.         return $this->informationsHoraires;
  474.     }
  475.     public function setInformationsHoraires(?string $informationsHoraires): self
  476.     {
  477.         if ($informationsHoraires === ''$informationsHoraires null;
  478.         $this->informationsHoraires $informationsHoraires;
  479.         return $this;
  480.     }
  481.     public function getInformationsConges(): ?string
  482.     {
  483.         return $this->informationsConges;
  484.     }
  485.     public function setInformationsConges(?string $informationsConges): self
  486.     {
  487.         if ($informationsConges === ''$informationsConges null;
  488.         $this->informationsConges $informationsConges;
  489.         return $this;
  490.     }
  491.     public function getHoraireSpecialDebut(): ?\DateTimeInterface
  492.     {
  493.         return $this->horaireSpecialDebut;
  494.     }
  495.     public function setHoraireSpecialDebut(?\DateTimeInterface $horaireSpecialDebut): self
  496.     {
  497.         $this->horaireSpecialDebut $horaireSpecialDebut;
  498.         return $this;
  499.     }
  500.     public function getHoraireSpecialFin(): ?\DateTimeInterface
  501.     {
  502.         return $this->horaireSpecialFin;
  503.     }
  504.     public function setHoraireSpecialFin(?\DateTimeInterface $horaireSpecialFin): self
  505.     {
  506.         $this->horaireSpecialFin $horaireSpecialFin;
  507.         return $this;
  508.     }
  509.     public function getConsignesGenerales(): ?string
  510.     {
  511.         return $this->consignesGenerales;
  512.     }
  513.     public function setConsignesGenerales(?string $consignesGenerales): self
  514.     {
  515.         if ($consignesGenerales === ''$consignesGenerales null;
  516.         $this->consignesGenerales $consignesGenerales;
  517.         return $this;
  518.     }
  519.     public function getConsignesPostOperatoireSuivi(): ?string
  520.     {
  521.         return $this->consignesPostOperatoireSuivi;
  522.     }
  523.     public function setConsignesPostOperatoireSuivi(?string $consignesPostOperatoireSuivi): self
  524.     {
  525.         if ($consignesPostOperatoireSuivi === ''$consignesPostOperatoireSuivi null;
  526.         $this->consignesPostOperatoireSuivi $consignesPostOperatoireSuivi;
  527.         return $this;
  528.     }
  529.     public function getHospitalisation1(): ?string
  530.     {
  531.         return $this->hospitalisation1;
  532.     }
  533.     public function setHospitalisation1(?string $hospitalisation1): self
  534.     {
  535.         if ($hospitalisation1 === ''$hospitalisation1 null;
  536.         $this->hospitalisation1 $hospitalisation1;
  537.         return $this;
  538.     }
  539.     public function getHospitalisation2(): ?string
  540.     {
  541.         return $this->hospitalisation2;
  542.     }
  543.     public function setHospitalisation2(?string $hospitalisation2): self
  544.     {
  545.         if ($hospitalisation2 === ''$hospitalisation2 null;
  546.         $this->hospitalisation2 $hospitalisation2;
  547.         return $this;
  548.     }
  549.     public function getHospitalisation3(): ?string
  550.     {
  551.         return $this->hospitalisation3;
  552.     }
  553.     public function setHospitalisation3(?string $hospitalisation3): self
  554.     {
  555.         if ($hospitalisation3 === ''$hospitalisation3 null;
  556.         $this->hospitalisation3 $hospitalisation3;
  557.         return $this;
  558.     }
  559.     public function getCasGeneral(): ?string
  560.     {
  561.         return $this->casGeneral;
  562.     }
  563.     public function setCasGeneral(?string $casGeneral): self
  564.     {
  565.         if ($casGeneral === ''$casGeneral null;
  566.         $this->casGeneral $casGeneral;
  567.         return $this;
  568.     }
  569.     public function getChirurgieOsseuse(): ?string
  570.     {
  571.         return $this->chirurgieOsseuse;
  572.     }
  573.     public function setChirurgieOsseuse(?string $chirurgieOsseuse): self
  574.     {
  575.         if ($chirurgieOsseuse === ''$chirurgieOsseuse null;
  576.         $this->chirurgieOsseuse $chirurgieOsseuse;
  577.         return $this;
  578.     }
  579.     public function getChirurgieTissuMou(): ?string
  580.     {
  581.         return $this->chirurgieTissuMou;
  582.     }
  583.     public function setChirurgieTissuMou(?string $chirurgieTissuMou): self
  584.     {
  585.         if ($chirurgieTissuMou === ''$chirurgieTissuMou null;
  586.         $this->chirurgieTissuMou $chirurgieTissuMou;
  587.         return $this;
  588.     }
  589.     public function getScanner(): ?string
  590.     {
  591.         return $this->scanner;
  592.     }
  593.     public function setScanner(?string $scanner): self
  594.     {
  595.         if ($scanner === ''$scanner null;
  596.         $this->scanner $scanner;
  597.         return $this;
  598.     }
  599.     public function getTransfusion(): ?string
  600.     {
  601.         return $this->transfusion;
  602.     }
  603.     public function setTransfusion(?string $transfusion): self
  604.     {
  605.         if ($transfusion === ''$transfusion null;
  606.         $this->transfusion $transfusion;
  607.         return $this;
  608.     }
  609.     public function getEndoscopie(): ?string
  610.     {
  611.         return $this->endoscopie;
  612.     }
  613.     public function setEndoscopie(?string $endoscopie): self
  614.     {
  615.         if ($endoscopie === ''$endoscopie null;
  616.         $this->endoscopie $endoscopie;
  617.         return $this;
  618.     }
  619.     public function getExterneId(): ?string
  620.     {
  621.         return $this->externeId;
  622.     }
  623.     public function setExterneId(?string $externeId): self
  624.     {
  625.         if ($externeId === ''$externeId null;
  626.         $this->externeId $externeId;
  627.         return $this;
  628.     }
  629.     public function getSda(): ?string
  630.     {
  631.         return $this->sda;
  632.     }
  633.     public function setSda(?string $sda): self
  634.     {
  635.         if ($sda === ''$sda null;
  636.         $this->sda $sda;
  637.         return $this;
  638.     }
  639.     public function getContinuiteSoin(): ?bool
  640.     {
  641.         return $this->continuiteSoin;
  642.     }
  643.     public function setContinuiteSoin(bool $continuiteSoin): self
  644.     {
  645.         $this->continuiteSoin $continuiteSoin;
  646.         return $this;
  647.     }
  648.     public function getEnvoiCrEmail(): ?bool
  649.     {
  650.         return $this->envoiCrEmail;
  651.     }
  652.     public function setEnvoiCrEmail(bool $envoiCrEmail): self
  653.     {
  654.         $this->envoiCrEmail $envoiCrEmail;
  655.         return $this;
  656.     }
  657.     public function getEnvoiMessage(): ?bool
  658.     {
  659.         return $this->envoiMessage;
  660.     }
  661.     public function setEnvoiMessage(bool $envoiMessage): self
  662.     {
  663.         $this->envoiMessage $envoiMessage;
  664.         return $this;
  665.     }
  666.     public function getInformationsInternes(): ?string
  667.     {
  668.         return $this->informationsInternes;
  669.     }
  670.     public function setInformationsInternes(?string $informationsInternes): self
  671.     {
  672.         if ($informationsInternes === ''$informationsInternes null;
  673.         $this->informationsInternes $informationsInternes;
  674.         return $this;
  675.     }
  676.     public function getAlerteRegulateurDateDebut(): ?\DateTimeInterface
  677.     {
  678.         return $this->alerteRegulateurDateDebut;
  679.     }
  680.     public function setAlerteRegulateurDateDebut(?\DateTimeInterface $alerteRegulateurDateDebut): self
  681.     {
  682.         $this->alerteRegulateurDateDebut $alerteRegulateurDateDebut;
  683.         return $this;
  684.     }
  685.     public function getAlerteRegulateurDateFin(): ?\DateTimeInterface
  686.     {
  687.         return $this->alerteRegulateurDateFin;
  688.     }
  689.     public function setAlerteRegulateurDateFin(?\DateTimeInterface $alerteRegulateurDateFin): self
  690.     {
  691.         $this->alerteRegulateurDateFin $alerteRegulateurDateFin;
  692.         return $this;
  693.     }
  694.     public function getAlerteRegulateurMotif(): ?string
  695.     {
  696.         return $this->alerteRegulateurMotif;
  697.     }
  698.     public function setAlerteRegulateurMotif(?string $alerteRegulateurMotif): self
  699.     {
  700.         if ($alerteRegulateurMotif === ''$alerteRegulateurMotif null;
  701.         $this->alerteRegulateurMotif $alerteRegulateurMotif;
  702.         return $this;
  703.     }
  704.     public function getAssocieResponsableId(): ?int
  705.     {
  706.         return $this->associeResponsableId;
  707.     }
  708.     public function setAssocieResponsableId(?int $associeResponsableId): self
  709.     {
  710.         $this->associeResponsableId $associeResponsableId;
  711.         return $this;
  712.     }
  713.     public function getDateDerniereVisite(): ?\DateTimeInterface
  714.     {
  715.         return $this->dateDerniereVisite;
  716.     }
  717.     public function setDateDerniereVisite(?\DateTimeInterface $dateDerniereVisite): self
  718.     {
  719.         $this->dateDerniereVisite $dateDerniereVisite;
  720.         return $this;
  721.     }
  722.     public function getSuiviMarketing(): ?string
  723.     {
  724.         return $this->suiviMarketing;
  725.     }
  726.     public function setSuiviMarketing(?string $suiviMarketing): self
  727.     {
  728.         if ($suiviMarketing === ''$suiviMarketing null;
  729.         $this->suiviMarketing $suiviMarketing;
  730.         return $this;
  731.     }
  732.     public function getTestLigne(): ?string
  733.     {
  734.         return $this->testLigne;
  735.     }
  736.     public function setTestLigne(?string $testLigne): self
  737.     {
  738.         if ($testLigne === ''$testLigne null;
  739.         $this->testLigne $testLigne;
  740.         return $this;
  741.     }
  742.     public function getDateRecontacte(): ?\DateTimeInterface
  743.     {
  744.         return $this->dateRecontacte;
  745.     }
  746.     public function setDateRecontacte(?\DateTimeInterface $dateRecontacte): self
  747.     {
  748.         $this->dateRecontacte $dateRecontacte;
  749.         return $this;
  750.     }
  751.     public function getDateCreation(): ?\DateTimeInterface
  752.     {
  753.         return $this->dateCreation;
  754.     }
  755.     public function setDateCreation(\DateTimeInterface $dateCreation): self
  756.     {
  757.         $this->dateCreation $dateCreation;
  758.         return $this;
  759.     }
  760.     public function getDateModification(): ?\DateTimeInterface
  761.     {
  762.         return $this->dateModification;
  763.     }
  764.     public function setDateModification(\DateTimeInterface $dateModification): self
  765.     {
  766.         $this->dateModification $dateModification;
  767.         return $this;
  768.     }
  769.     public function getVille(): ?Ville
  770.     {
  771.         return $this->ville;
  772.     }
  773.     public function setVille(?Ville $ville): self
  774.     {
  775.         $this->ville $ville;
  776.         return $this;
  777.     }
  778.     /**
  779.      * Helpers
  780.      */
  781.     /**
  782.      * @return Collection|Document[]
  783.      */
  784.     public function getDocumentsCollection(): Collection
  785.     {
  786.         return $this->documents;
  787.     }
  788.     /**
  789.      * @param string $type
  790.      * @return Collection|Document[]
  791.      */
  792.     public function getDocumentsActiveByType(string $type): Collection
  793.     {
  794.         return $this->getDocumentsCollection()->filter(function (Document $document) use ($type){
  795.             return $document->getActive() && $document->getDocumentType()->getType() == $type;
  796.         });
  797.     }
  798.     /**
  799.      * @return Collection|ReferantConges[]
  800.      */
  801.     public function getReferantCongesCollection(): Collection
  802.     {
  803.         return $this->referantConges;
  804.     }
  805.     /**
  806.      * @param int $id
  807.      * @return bool
  808.      */
  809.     public function hasReferantCongesById(int $id): bool
  810.     {
  811.         return $this->getReferantCongesCollection()->filter(function (ReferantConges $referantConges) use ($id){
  812.             return $referantConges->getId() == $id;
  813.         })->count() == 1;
  814.     }
  815.     /**
  816.      * @param int $id
  817.      * @return ReferantConges
  818.      * @throws \Exception
  819.      */
  820.     public function getReferantCongesById(int $id): ReferantConges
  821.     {
  822.         return $this->getReferantCongesCollection()->filter(function (ReferantConges $referantConges) use ($id){
  823.             return $referantConges->getId() == $id;
  824.         })->first();
  825.     }
  826.     /**
  827.      * @return Collection|ReferantEmail[]
  828.      */
  829.     public function getReferantEmailCollection(): Collection
  830.     {
  831.         return $this->referantEmail;
  832.     }
  833.     /**
  834.      * @param int $id
  835.      * @return bool
  836.      */
  837.     public function hasReferantEmailById(int $id): bool
  838.     {
  839.         return $this->getReferantEmailCollection()->filter(function (ReferantEmail $referantEmail) use ($id){
  840.             return $referantEmail->getId() == $id;
  841.         })->count() == 1;
  842.     }
  843.     /**
  844.      * @param int $id
  845.      * @return ReferantEmail
  846.      * @throws \Exception
  847.      */
  848.     public function getReferantEmailById(int $id): ReferantEmail
  849.     {
  850.         return $this->getReferantEmailCollection()->filter(function (ReferantEmail $referantEmail) use ($id){
  851.             return $referantEmail->getId() == $id;
  852.         })->first();
  853.     }
  854.     /**
  855.      * @return Collection|ReferantEquipe[]
  856.      */
  857.     public function getReferantEquipeCollection(): Collection
  858.     {
  859.         return $this->referantEquipe;
  860.     }
  861.     /**
  862.      * @param int $id
  863.      * @return bool
  864.      */
  865.     public function hasReferantEquipeById(int $id): bool
  866.     {
  867.         return $this->getReferantEquipeCollection()->filter(function (ReferantEquipe $referantEquipe) use ($id){
  868.             return $referantEquipe->getId() == $id;
  869.         })->count() == 1;
  870.     }
  871.     /**
  872.      * @param int $id
  873.      * @return ReferantEquipe
  874.      * @throws \Exception
  875.      */
  876.     public function getReferantEquipeById(int $id): ReferantEquipe
  877.     {
  878.         return $this->getReferantEquipeCollection()->filter(function (ReferantEquipe $referantEquipe) use ($id){
  879.             return $referantEquipe->getId() == $id;
  880.         })->first();
  881.     }
  882.     /**
  883.      * @return Collection|ReferantFiltrageClient[]
  884.      */
  885.     public function getReferantFiltrageClientCollection(): Collection
  886.     {
  887.         return $this->referantFiltrageClient->filter(function (ReferantFiltrageClient $referantFiltrageClient){
  888.             return $referantFiltrageClient->getActive();
  889.         });
  890.     }
  891.     /**
  892.      * @param int $id
  893.      * @return bool
  894.      */
  895.     public function hasReferantFiltrageClientById(int $id): bool
  896.     {
  897.         return $this->getReferantFiltrageClientCollection()->filter(function (ReferantFiltrageClient $referantFiltrageClient) use ($id){
  898.             return $referantFiltrageClient->getId() == $id;
  899.         })->count() == 1;
  900.     }
  901.     /**
  902.      * @param int $id
  903.      * @return ReferantFiltrageClient
  904.      * @throws \Exception
  905.      */
  906.     public function getReferantFiltrageClientById(int $id): ReferantFiltrageClient
  907.     {
  908.         return $this->getReferantFiltrageClientCollection()->filter(function (ReferantFiltrageClient $referantFiltrageClient) use ($id){
  909.             return $referantFiltrageClient->getId() == $id;
  910.         })->first();
  911.     }
  912.     /**
  913.      * @return Collection|ReferantHoraire[]
  914.      */
  915.     public function getReferantHoraireCollection(): Collection
  916.     {
  917.         return $this->referantHoraire;
  918.     }
  919.     /**
  920.      * @param int $id
  921.      * @param int $jourTypeId
  922.      * @param bool $special
  923.      * @return bool
  924.      */
  925.     public function hasReferantHoraireByIdJourTypeSpecial(int $id,int $jourTypeId,bool $special): bool
  926.     {
  927.         return $this->getReferantHoraireCollection()->filter(function (ReferantHoraire $referantHoraire) use ($id,$jourTypeId,$special){
  928.             return $referantHoraire->getId() == $id && $referantHoraire->getJourType()->getId() == $jourTypeId && $referantHoraire->getSpecial() == $special;
  929.         })->count() == 1;
  930.     }
  931.     /**
  932.      * @param int $id
  933.      * @param int $jourTypeId
  934.      * @param bool $special
  935.      * @return ReferantHoraire
  936.      */
  937.     public function getReferantHoraireByIdJourTypeSpecial(int $id,int $jourTypeId,bool $special): ReferantHoraire
  938.     {
  939.         return $this->getReferantHoraireCollection()->filter(function (ReferantHoraire $referantHoraire) use ($id,$jourTypeId,$special){
  940.             return $referantHoraire->getId() == $id && $referantHoraire->getJourType()->getId() == $jourTypeId && $referantHoraire->getSpecial() == $special;
  941.         })->first();
  942.     }
  943.     /**
  944.      * @return Collection|ReferantTelephone[]
  945.      */
  946.     public function getReferantTelephoneCollection(): Collection
  947.     {
  948.         return $this->referantTelephone;
  949.     }
  950.     /**
  951.      * @param int $id
  952.      * @return bool
  953.      */
  954.     public function hasReferantTelephoneById(int $id): bool
  955.     {
  956.         return $this->getReferantTelephoneCollection()->filter(function (ReferantTelephone $referantTelephone) use ($id){
  957.             return $referantTelephone->getId() == $id;
  958.         })->count() == 1;
  959.     }
  960.     /**
  961.      * @param int $id
  962.      * @return ReferantTelephone
  963.      * @throws \Exception
  964.      */
  965.     public function getReferantTelephoneById(int $id): ReferantTelephone
  966.     {
  967.         return $this->getReferantTelephoneCollection()->filter(function (ReferantTelephone $referantTelephone) use ($id){
  968.             return $referantTelephone->getId() == $id;
  969.         })->first();
  970.     }
  971.     /**
  972.      * @ORM\PrePersist
  973.      */
  974.     public function setCreatedAtValue()
  975.     {
  976.         $this->dateCreation = new \DateTimeImmutable();
  977.     }
  978. }