src/Entity/OdontogramaProcedimiento.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OdontogramaProcedimientoRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use DateTime;
  6. /**
  7.  * @ORM\Entity(repositoryClass=OdontogramaProcedimientoRepository::class)
  8.  * @ORM\HasLifecycleCallbacks
  9.  */
  10. class OdontogramaProcedimiento
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Agenda::class, inversedBy="odontogramaProcedimientos")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $agenda;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Procedimientos::class, inversedBy="odontogramaProcedimientos")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $procedimiento;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Dientes::class, inversedBy="odontogramaProcedimientos")
  30.      * @ORM\JoinColumn(nullable=false)
  31.      */
  32.     private $diente;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=Odontograma::class, inversedBy="odontogramaProcedimientos")
  35.      * @ORM\JoinColumn(nullable=false)
  36.      */
  37.     private $odontograma;
  38.     /**
  39.      * @ORM\Column(type="boolean")
  40.      */
  41.     private $estado;
  42.     /**
  43.      * @ORM\Column(type="string", length=50)
  44.      */
  45.     private $ip_crea;
  46.     /**
  47.      * @ORM\Column(type="string", length=50)
  48.      */
  49.     private $ip_modifica;
  50.     /**
  51.      * @ORM\Column(type="integer")
  52.      */
  53.     private $user_crea;
  54.     /**
  55.      * @ORM\Column(type="integer")
  56.      */
  57.     private $user_modifica;
  58.     /**
  59.      * @ORM\Column(type="datetime")
  60.      */
  61.     private $created_at;
  62.     /**
  63.      * @ORM\Column(type="datetime")
  64.      */
  65.     private $updated_at;
  66.     /**
  67.      * @ORM\Column(type="string", length=50, nullable=true)
  68.      */
  69.     private $tipo;
  70.     
  71.     /**
  72.      * @ORM\Column(type="boolean", options={"default" = 1})
  73.      */
  74.     private $realizado;
  75.     
  76.     /**
  77.      * @ORM\ManyToOne(targetEntity=Paciente::class, inversedBy="ordenProcedimientos")
  78.      */
  79.     private $paciente;
  80.     public function getId(): ?int
  81.     {
  82.         return $this->id;
  83.     }
  84.     public function getAgenda(): ?Agenda
  85.     {
  86.         return $this->agenda;
  87.     }
  88.     public function setAgenda(?Agenda $agenda): self
  89.     {
  90.         $this->agenda $agenda;
  91.         return $this;
  92.     }
  93.     public function getProcedimiento(): ?Procedimientos
  94.     {
  95.         return $this->procedimiento;
  96.     }
  97.     public function setProcedimiento(?Procedimientos $procedimiento): self
  98.     {
  99.         $this->procedimiento $procedimiento;
  100.         return $this;
  101.     }
  102.     public function getDiente(): ?Dientes
  103.     {
  104.         return $this->diente;
  105.     }
  106.     public function setDiente(?Dientes $diente): self
  107.     {
  108.         $this->diente $diente;
  109.         return $this;
  110.     }
  111.     public function getOdontograma(): ?Odontograma
  112.     {
  113.         return $this->odontograma;
  114.     }
  115.     public function setOdontograma(?Odontograma $odontograma): self
  116.     {
  117.         $this->odontograma $odontograma;
  118.         return $this;
  119.     }
  120.     public function getEstado(): ?bool
  121.     {
  122.         return $this->estado;
  123.     }
  124.     public function setEstado(bool $estado): self
  125.     {
  126.         $this->estado $estado;
  127.         return $this;
  128.     }
  129.     public function getIpCrea(): ?string
  130.     {
  131.         return $this->ip_crea;
  132.     }
  133.     public function setIpCrea(string $ip_crea): self
  134.     {
  135.         $this->ip_crea $ip_crea;
  136.         return $this;
  137.     }
  138.     public function getIpModifica(): ?string
  139.     {
  140.         return $this->ip_modifica;
  141.     }
  142.     public function setIpModifica(string $ip_modifica): self
  143.     {
  144.         $this->ip_modifica $ip_modifica;
  145.         return $this;
  146.     }
  147.     public function getUserCrea(): ?int
  148.     {
  149.         return $this->user_crea;
  150.     }
  151.     public function setUserCrea(int $user_crea): self
  152.     {
  153.         $this->user_crea $user_crea;
  154.         return $this;
  155.     }
  156.     public function getUserModifica(): ?int
  157.     {
  158.         return $this->user_modifica;
  159.     }
  160.     public function setUserModifica(int $user_modifica): self
  161.     {
  162.         $this->user_modifica $user_modifica;
  163.         return $this;
  164.     }
  165.     public function getCreatedAt(): ?\DateTimeInterface
  166.     {
  167.         return $this->created_at;
  168.     }
  169.     public function setCreatedAt(\DateTimeInterface $created_at): self
  170.     {
  171.         $this->created_at $created_at;
  172.         return $this;
  173.     }
  174.     public function getUpdatedAt(): ?\DateTimeInterface
  175.     {
  176.         return $this->updated_at;
  177.     }
  178.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  179.     {
  180.         $this->updated_at $updated_at;
  181.         return $this;
  182.     }
  183.     /**
  184.      * @ORM\PrePersist
  185.      * @ORM\PreUpdate
  186.      */
  187.     public function updatedTimestamps(): void
  188.     {
  189.         $dateTimeNow = new DateTime('now');
  190.         $this->setUpdatedAt($dateTimeNow);
  191.         if ($this->getCreatedAt() === null) {
  192.             $this->setCreatedAt($dateTimeNow);
  193.         }
  194.     }
  195.     public function getTipo(): ?string
  196.     {
  197.         return $this->tipo;
  198.     }
  199.     public function setTipo(?string $tipo): self
  200.     {
  201.         $this->tipo $tipo;
  202.         return $this;
  203.     }
  204.     
  205.     public function getRealizado(): ?bool
  206.     {
  207.         return $this->realizado;
  208.     }
  209.     public function setRealizado(?bool $realizado): self
  210.     {
  211.         $this->realizado $realizado;
  212.         return $this;
  213.     }
  214.     
  215.     public function getPaciente(): ?Paciente
  216.     {
  217.         return $this->paciente;
  218.     }
  219.     public function setPaciente(?Paciente $paciente): self
  220.     {
  221.         $this->paciente $paciente;
  222.         return $this;
  223.     }
  224. }