src/Entity/LogAgenda.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LogAgendaRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use DateTime;
  6. /**
  7.  * @ORM\Entity(repositoryClass=LogAgendaRepository::class)
  8.  * @ORM\HasLifecycleCallbacks
  9.  */
  10. class LogAgenda
  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="logAgendas")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $agenda;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=SeguroPrivado::class, inversedBy="logAgendas")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $seguro;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Especialidad::class, inversedBy="logAgendas")
  30.      * @ORM\JoinColumn(nullable=false)
  31.      */
  32.     private $especialidad;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="logAgendas")
  35.      * @ORM\JoinColumn(nullable=false)
  36.      */
  37.     private $doctor;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Sala::class, inversedBy="logAgendas")
  40.      * @ORM\JoinColumn(nullable=false)
  41.      */
  42.     private $sala;
  43.     /**
  44.      * @ORM\Column(type="datetime")
  45.      */
  46.     private $inicio;
  47.     /**
  48.      * @ORM\Column(type="datetime")
  49.      */
  50.     private $fin;
  51.     /**
  52.      * @ORM\Column(type="smallint")
  53.      */
  54.     private $estado_agenda;
  55.     /**
  56.      * @ORM\Column(type="string", length=50)
  57.      */
  58.     private $ip_crea;
  59.     /**
  60.      * @ORM\Column(type="string", length=50)
  61.      */
  62.     private $ip_modifica;
  63.     /**
  64.      * @ORM\Column(type="integer")
  65.      */
  66.     private $user_crea;
  67.     /**
  68.      * @ORM\Column(type="integer")
  69.      */
  70.     private $user_modifica;
  71.     /**
  72.      * @ORM\Column(type="datetime")
  73.      */
  74.     private $created_at;
  75.     /**
  76.      * @ORM\Column(type="datetime")
  77.      */
  78.     private $updated_at;
  79.     /**
  80.      * @ORM\Column(type="string", length=255, nullable=true)
  81.      */
  82.     private $observacion;
  83.     /**
  84.      * @ORM\Column(type="string", length=100)
  85.      */
  86.     private $descripcion;
  87.     public function getId(): ?int
  88.     {
  89.         return $this->id;
  90.     }
  91.     public function getAgenda(): ?Agenda
  92.     {
  93.         return $this->agenda;
  94.     }
  95.     public function setAgenda(?Agenda $agenda): self
  96.     {
  97.         $this->agenda $agenda;
  98.         return $this;
  99.     }
  100.     public function getSeguro(): ?SeguroPrivado
  101.     {
  102.         return $this->seguro;
  103.     }
  104.     public function setSeguro(?SeguroPrivado $seguro): self
  105.     {
  106.         $this->seguro $seguro;
  107.         return $this;
  108.     }
  109.     public function getEspecialidad(): ?Especialidad
  110.     {
  111.         return $this->especialidad;
  112.     }
  113.     public function setEspecialidad(?Especialidad $especialidad): self
  114.     {
  115.         $this->especialidad $especialidad;
  116.         return $this;
  117.     }
  118.     public function getDoctor(): ?User
  119.     {
  120.         return $this->doctor;
  121.     }
  122.     public function setDoctor(?User $doctor): self
  123.     {
  124.         $this->doctor $doctor;
  125.         return $this;
  126.     }
  127.     public function getSala(): ?Sala
  128.     {
  129.         return $this->sala;
  130.     }
  131.     public function setSala(?Sala $sala): self
  132.     {
  133.         $this->sala $sala;
  134.         return $this;
  135.     }
  136.     public function getInicio(): ?\DateTimeInterface
  137.     {
  138.         return $this->inicio;
  139.     }
  140.     public function setInicio(\DateTimeInterface $inicio): self
  141.     {
  142.         $this->inicio $inicio;
  143.         return $this;
  144.     }
  145.     public function getFin(): ?\DateTimeInterface
  146.     {
  147.         return $this->fin;
  148.     }
  149.     public function setFin(\DateTimeInterface $fin): self
  150.     {
  151.         $this->fin $fin;
  152.         return $this;
  153.     }
  154.     public function getEstadoAgenda(): ?int
  155.     {
  156.         return $this->estado_agenda;
  157.     }
  158.     public function setEstadoAgenda(int $estado_agenda): self
  159.     {
  160.         $this->estado_agenda $estado_agenda;
  161.         return $this;
  162.     }
  163.     public function getIpCrea(): ?string
  164.     {
  165.         return $this->ip_crea;
  166.     }
  167.     public function setIpCrea(string $ip_crea): self
  168.     {
  169.         $this->ip_crea $ip_crea;
  170.         return $this;
  171.     }
  172.     public function getIpModifica(): ?string
  173.     {
  174.         return $this->ip_modifica;
  175.     }
  176.     public function setIpModifica(string $ip_modifica): self
  177.     {
  178.         $this->ip_modifica $ip_modifica;
  179.         return $this;
  180.     }
  181.     public function getUserCrea(): ?int
  182.     {
  183.         return $this->user_crea;
  184.     }
  185.     public function setUserCrea(int $user_crea): self
  186.     {
  187.         $this->user_crea $user_crea;
  188.         return $this;
  189.     }
  190.     public function getUserModifica(): ?int
  191.     {
  192.         return $this->user_modifica;
  193.     }
  194.     public function setUserModifica(int $user_modifica): self
  195.     {
  196.         $this->user_modifica $user_modifica;
  197.         return $this;
  198.     }
  199.     public function getCreatedAt(): ?\DateTimeInterface
  200.     {
  201.         return $this->created_at;
  202.     }
  203.     public function setCreatedAt(\DateTimeInterface $created_at): self
  204.     {
  205.         $this->created_at $created_at;
  206.         return $this;
  207.     }
  208.     public function getUpdatedAt(): ?\DateTimeInterface
  209.     {
  210.         return $this->updated_at;
  211.     }
  212.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  213.     {
  214.         $this->updated_at $updated_at;
  215.         return $this;
  216.     }
  217.     public function getObservacion(): ?string
  218.     {
  219.         return $this->observacion;
  220.     }
  221.     public function setObservacion(?string $observacion): self
  222.     {
  223.         $this->observacion $observacion;
  224.         return $this;
  225.     }
  226.     /**
  227.      * @ORM\PrePersist
  228.      * @ORM\PreUpdate
  229.      */
  230.     public function updatedTimestamps(): void
  231.     {
  232.         $dateTimeNow = new DateTime('now');
  233.         $this->setUpdatedAt($dateTimeNow);
  234.         if ($this->getCreatedAt() === null) {
  235.             $this->setCreatedAt($dateTimeNow);
  236.         }
  237.     }
  238.     /*public function __construct(EntityManager $entityManager)
  239.     {
  240.         $this->entityManager = $entityManager;
  241.     }*/
  242.     public function getDescripcion(): ?string
  243.     {
  244.         return $this->descripcion;
  245.     }
  246.     public function setDescripcion(string $descripcion): self
  247.     {
  248.         $this->descripcion $descripcion;
  249.         return $this;
  250.     }
  251.     
  252. }