src/Entity/Vetoadom/Consultation.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vetoadom;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * Consultation
  7.  *
  8.  * @ORM\Table(name="consultation", indexes={@ORM\Index(name="FK_consultation_referant", columns={"FK_consultation_referant"}), @ORM\Index(name="FK_consultation_consultation_etat", columns={"consultation_etat_id"}), @ORM\Index(name="FK_consultation_consultation_delai_urgence", columns={"consultation_delai_urgence_id"}), @ORM\Index(name="FK_consultation_tarif", columns={"tarif_id"}), @ORM\Index(name="FK_consultation_appel_animal", columns={"appel_animal_id"}), @ORM\Index(name="FK_consultation_consultation_niveau_urgence", columns={"consultation_niveau_urgence_id"})})
  9.  * @ORM\Entity(repositoryClass="App\Repository\Vetoadom\ConsultationRepository")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class Consultation
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string|null
  24.      *
  25.      * @ORM\Column(name="hors_zone_distance", type="decimal", precision=10, scale=2, nullable=true)
  26.      */
  27.     private $horsZoneDistance;
  28.     /**
  29.      * @var string|null
  30.      *
  31.      * @ORM\Column(name="tarif_deplacement", type="decimal", precision=10, scale=2, nullable=true)
  32.      */
  33.     private $tarifDeplacement;
  34.     /**
  35.      * @var string|null
  36.      *
  37.      * @ORM\Column(name="tarif_consultation", type="decimal", precision=10, scale=2, nullable=true)
  38.      */
  39.     private $tarifConsultation;
  40.     /**
  41.      * @var string|null
  42.      *
  43.      * @ORM\Column(name="tarif_total", type="decimal", precision=10, scale=2, nullable=true)
  44.      */
  45.     private $tarifTotal;
  46.     /**
  47.      * @var int|null
  48.      *
  49.      * @ORM\Column(name="veterinaire_intervenant_id", type="integer", nullable=true)
  50.      */
  51.     private $veterinaireIntervenantId;
  52.     /**
  53.      * @var int|null
  54.      *
  55.      * @ORM\Column(name="planning_jour_id", type="integer", nullable=true)
  56.      */
  57.     private $planningJourId;
  58.     /**
  59.      * @var string|null
  60.      *
  61.      * @ORM\Column(name="info_arv", type="text", length=65535, nullable=true)
  62.      * @Assert\Length(
  63.      *         groups={"infoArv"},
  64.      *         max=65535,
  65.      *         maxMessage="common.too_long"
  66.      *      )
  67.      */
  68.     private $infoArv;
  69.     /**
  70.      * @var \DateTime|null
  71.      *
  72.      * @ORM\Column(name="debut_consultation", type="datetime", nullable=true)
  73.      */
  74.     private $debutConsultation;
  75.     /**
  76.      * @var \DateTime|null
  77.      *
  78.      * @ORM\Column(name="fin_consultation", type="datetime", nullable=true)
  79.      */
  80.     private $finConsultation;
  81.     /**
  82.      * @var \DateTime
  83.      *
  84.      * @ORM\Column(name="date_creation", type="datetime", nullable=false)
  85.      */
  86.     private $dateCreation;
  87.     /**
  88.      * @var \DateTime
  89.      *
  90.      * @ORM\Column(name="date_modification", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
  91.      */
  92.     private $dateModification;
  93.     /**
  94.      * @var \DateTime|null
  95.      *
  96.      * @ORM\Column(name="date_suppression", type="datetime", nullable=true)
  97.      */
  98.     private $dateSuppression;
  99.     /**
  100.      * @var int|null
  101.      *
  102.      * @ORM\Column(name="user_suppression_id", type="integer", nullable=true)
  103.      */
  104.     private $userSuppressionId;
  105.     /**
  106.      * @var string|null
  107.      *
  108.      * @ORM\Column(name="motif_suppression", type="text", length=65535, nullable=true)
  109.      * @Assert\NotBlank(
  110.      *         groups={"motifSuppression"},
  111.      *         message="common.blank"
  112.      *      )
  113.      * @Assert\Length(
  114.      *         groups={"motifSuppression"},
  115.      *         max=65535,
  116.      *         maxMessage="common.too_long"
  117.      *      )
  118.      */
  119.     private $motifSuppression;
  120.     /**
  121.      * @var \DateTime|null
  122.      *
  123.      * @ORM\Column(name="date_eta", type="datetime", nullable=true)
  124.      */
  125.     private $dateEta;
  126.     /**
  127.      * @var bool
  128.      *
  129.      * @ORM\Column(name="active", type="boolean", nullable=false, options={"default"="1"})
  130.      */
  131.     private $active true;
  132.     /**
  133.      * @var \AppelAnimal
  134.      *
  135.      * @ORM\ManyToOne(targetEntity="AppelAnimal")
  136.      * @ORM\JoinColumns({
  137.      *   @ORM\JoinColumn(name="appel_animal_id", referencedColumnName="id")
  138.      * })
  139.      */
  140.     private $appelAnimal;
  141.     /**
  142.      * @var \Referant
  143.      *
  144.      * @ORM\ManyToOne(targetEntity="Referant")
  145.      * @ORM\JoinColumns({
  146.      *   @ORM\JoinColumn(name="consultation_referee_clinique_id", referencedColumnName="id")
  147.      * })
  148.      */
  149.     private $consultationRefereeClinique;
  150.     /**
  151.      * @var \ConsultationDelaiUrgence
  152.      *
  153.      * @ORM\ManyToOne(targetEntity="ConsultationDelaiUrgence")
  154.      * @ORM\JoinColumns({
  155.      *   @ORM\JoinColumn(name="consultation_delai_urgence_id", referencedColumnName="id")
  156.      * })
  157.      */
  158.     private $consultationDelaiUrgence;
  159.     /**
  160.      * @var \Tarif
  161.      *
  162.      * @ORM\ManyToOne(targetEntity="Tarif")
  163.      * @ORM\JoinColumns({
  164.      *   @ORM\JoinColumn(name="tarif_id", referencedColumnName="id")
  165.      * })
  166.      * @Assert\NotBlank(
  167.      *         groups={"tarif"},
  168.      *         message="common.blank"
  169.      *      )
  170.      */
  171.     private $tarif;
  172.     /**
  173.      * @var string|null
  174.      *
  175.      * @ORM\Column(name="externe_id", type="string", length=8, nullable=true)
  176.      */
  177.     private $externeId;
  178.     /**
  179.      * @var string|null
  180.      *
  181.      * @ORM\Column(name="commentaire_visite", type="text", length=65535, nullable=true)
  182.      * @Assert\Length(
  183.      *         groups={"commentaireVisite"},
  184.      *         max=65535,
  185.      *         maxMessage="common.too_long"
  186.      *      )
  187.      */
  188.     private $commentaireVisite;
  189.     /**
  190.      * @var \ConsultationEtat
  191.      *
  192.      * @ORM\ManyToOne(targetEntity="ConsultationEtat")
  193.      * @ORM\JoinColumns({
  194.      *   @ORM\JoinColumn(name="consultation_etat_id", referencedColumnName="id")
  195.      * })
  196.      */
  197.     private $consultationEtat;
  198.     /**
  199.      * @var \ConsultationNiveauUrgence
  200.      *
  201.      * @ORM\ManyToOne(targetEntity="ConsultationNiveauUrgence")
  202.      * @ORM\JoinColumns({
  203.      *   @ORM\JoinColumn(name="consultation_niveau_urgence_id", referencedColumnName="id")
  204.      * })
  205.      * @Assert\NotBlank(
  206.      *          groups={"consultationNiveauUrgence"},
  207.      *          message="common.blank"
  208.      *       )
  209.      */
  210.     private $consultationNiveauUrgence;
  211.     public function getId(): ?int
  212.     {
  213.         return $this->id;
  214.     }
  215.     public function getHorsZoneDistance(): ?string
  216.     {
  217.         return $this->horsZoneDistance;
  218.     }
  219.     public function setHorsZoneDistance(?string $horsZoneDistance): self
  220.     {
  221.         $this->horsZoneDistance $horsZoneDistance;
  222.         return $this;
  223.     }
  224.     public function getTarifDeplacement(): ?string
  225.     {
  226.         return $this->tarifDeplacement;
  227.     }
  228.     public function setTarifDeplacement(?string $tarifDeplacement): self
  229.     {
  230.         $this->tarifDeplacement $tarifDeplacement;
  231.         return $this;
  232.     }
  233.     public function getTarifConsultation(): ?string
  234.     {
  235.         return $this->tarifConsultation;
  236.     }
  237.     public function setTarifConsultation(?string $tarifConsultation): self
  238.     {
  239.         $this->tarifConsultation $tarifConsultation;
  240.         return $this;
  241.     }
  242.     public function getTarifTotal(): ?string
  243.     {
  244.         return $this->tarifTotal;
  245.     }
  246.     public function setTarifTotal(?string $tarifTotal): self
  247.     {
  248.         $this->tarifTotal $tarifTotal;
  249.         return $this;
  250.     }
  251.     public function getVeterinaireIntervenantId(): ?int
  252.     {
  253.         return $this->veterinaireIntervenantId;
  254.     }
  255.     public function setVeterinaireIntervenantId(?int $veterinaireIntervenantId): self
  256.     {
  257.         if (!$veterinaireIntervenantId$veterinaireIntervenantId null;
  258.         $this->veterinaireIntervenantId $veterinaireIntervenantId;
  259.         return $this;
  260.     }
  261.     public function getPlanningJourId(): ?int
  262.     {
  263.         return $this->planningJourId;
  264.     }
  265.     public function setPlanningJourId(?int $planningJourId): self
  266.     {
  267.         if (!$planningJourId$planningJourId null;
  268.         $this->planningJourId $planningJourId;
  269.         return $this;
  270.     }
  271.     public function getInfoArv(): ?string
  272.     {
  273.         return $this->infoArv;
  274.     }
  275.     public function setInfoArv(?string $infoArv): self
  276.     {
  277.         if ($infoArv === ''$infoArv null;
  278.         $this->infoArv $infoArv;
  279.         return $this;
  280.     }
  281.     public function getDebutConsultation(): ?\DateTimeInterface
  282.     {
  283.         return $this->debutConsultation;
  284.     }
  285.     public function setDebutConsultation(?\DateTimeInterface $debutConsultation): self
  286.     {
  287.         $this->debutConsultation $debutConsultation;
  288.         return $this;
  289.     }
  290.     public function getFinConsultation(): ?\DateTimeInterface
  291.     {
  292.         return $this->finConsultation;
  293.     }
  294.     public function setFinConsultation(?\DateTimeInterface $finConsultation): self
  295.     {
  296.         $this->finConsultation $finConsultation;
  297.         return $this;
  298.     }
  299.     public function getDateCreation(): ?\DateTimeInterface
  300.     {
  301.         return $this->dateCreation;
  302.     }
  303.     public function setDateCreation(\DateTimeInterface $dateCreation): self
  304.     {
  305.         $this->dateCreation $dateCreation;
  306.         return $this;
  307.     }
  308.     public function getDateModification(): ?\DateTimeInterface
  309.     {
  310.         return $this->dateModification;
  311.     }
  312.     public function setDateModification(\DateTimeInterface $dateModification): self
  313.     {
  314.         $this->dateModification $dateModification;
  315.         return $this;
  316.     }
  317.     public function getDateSuppression(): ?\DateTimeInterface
  318.     {
  319.         return $this->dateSuppression;
  320.     }
  321.     public function setDateSuppression(?\DateTimeInterface $dateSuppression): self
  322.     {
  323.         $this->dateSuppression $dateSuppression;
  324.         return $this;
  325.     }
  326.     public function getUserSuppressionId(): ?int
  327.     {
  328.         return $this->userSuppressionId;
  329.     }
  330.     public function setUserSuppressionId(?int $userSuppressionId): self
  331.     {
  332.         $this->userSuppressionId $userSuppressionId;
  333.         return $this;
  334.     }
  335.     public function getMotifSuppression(): ?string
  336.     {
  337.         return $this->motifSuppression;
  338.     }
  339.     public function setMotifSuppression(?string $motifSuppression): self
  340.     {
  341.         if ($motifSuppression === ''$motifSuppression null;
  342.         $this->motifSuppression $motifSuppression;
  343.         return $this;
  344.     }
  345.     public function getDateEta(): ?\DateTimeInterface
  346.     {
  347.         return $this->dateEta;
  348.     }
  349.     public function setDateEta(?\DateTimeInterface $dateEta): self
  350.     {
  351.         $this->dateEta $dateEta;
  352.         return $this;
  353.     }
  354.     public function getActive(): ?bool
  355.     {
  356.         return $this->active;
  357.     }
  358.     public function setActive(bool $active): self
  359.     {
  360.         $this->active $active;
  361.         return $this;
  362.     }
  363.     public function getAppelAnimal(): ?AppelAnimal
  364.     {
  365.         return $this->appelAnimal;
  366.     }
  367.     public function setAppelAnimal(?AppelAnimal $appelAnimal): self
  368.     {
  369.         $this->appelAnimal $appelAnimal;
  370.         return $this;
  371.     }
  372.     public function getConsultationRefereeClinique(): ?Referant
  373.     {
  374.         return $this->consultationRefereeClinique;
  375.     }
  376.     public function setConsultationRefereeClinique(?Referant $consultationRefereeClinique): self
  377.     {
  378.         $this->consultationRefereeClinique $consultationRefereeClinique;
  379.         return $this;
  380.     }
  381.     public function getConsultationDelaiUrgence(): ?ConsultationDelaiUrgence
  382.     {
  383.         return $this->consultationDelaiUrgence;
  384.     }
  385.     public function setConsultationDelaiUrgence(?ConsultationDelaiUrgence $consultationDelaiUrgence): self
  386.     {
  387.         $this->consultationDelaiUrgence $consultationDelaiUrgence;
  388.         return $this;
  389.     }
  390.     public function getTarif(): ?Tarif
  391.     {
  392.         return $this->tarif;
  393.     }
  394.     public function setTarif(?Tarif $tarif): self
  395.     {
  396.         $this->tarif $tarif;
  397.         return $this;
  398.     }
  399.     public function getExterneId(): ?string
  400.     {
  401.         return $this->externeId;
  402.     }
  403.     public function setExterneId(?string $externeId): self
  404.     {
  405.         $this->externeId $externeId;
  406.         return $this;
  407.     }
  408.     public function getConsultationEtat(): ?ConsultationEtat
  409.     {
  410.         return $this->consultationEtat;
  411.     }
  412.     public function setConsultationEtat(?ConsultationEtat $consultationEtat): self
  413.     {
  414.         $this->consultationEtat $consultationEtat;
  415.         return $this;
  416.     }
  417.     public function getConsultationNiveauUrgence(): ?ConsultationNiveauUrgence
  418.     {
  419.         return $this->consultationNiveauUrgence;
  420.     }
  421.     public function setConsultationNiveauUrgence(?ConsultationNiveauUrgence $consultationNiveauUrgence): self
  422.     {
  423.         $this->consultationNiveauUrgence $consultationNiveauUrgence;
  424.         return $this;
  425.     }
  426.     public function getCommentaireVisite(): ?string
  427.     {
  428.         return $this->commentaireVisite;
  429.     }
  430.     public function setCommentaireVisite(?string $commentaireVisite): self
  431.     {
  432.         if ($commentaireVisite === ''$commentaireVisite null;
  433.         $this->commentaireVisite $commentaireVisite;
  434.         return $this;
  435.     }
  436.     /**
  437.      * @ORM\PrePersist
  438.      */
  439.     public function setCreatedAtValue()
  440.     {
  441.         $this->dateCreation = new \DateTimeImmutable();
  442.     }
  443. }