src/Entity/PantallasAs400.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PantallasAs400Repository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use DateTime;
  6. /**
  7.  * @ORM\Entity(repositoryClass=PantallasAs400Repository::class)
  8.  * @ORM\HasLifecycleCallbacks
  9.  */
  10. class PantallasAs400
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=HistoriaClinica::class, inversedBy="pantallasAs400s")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $historia;
  23.     /**
  24.      * @ORM\Column(type="text")
  25.      */
  26.     private $pantalla;
  27.     /**
  28.      * @ORM\Column(type="boolean")
  29.      */
  30.     private $estado;
  31.     /**
  32.      * @ORM\Column(type="string", length=50)
  33.      */
  34.     private $ip_crea;
  35.     /**
  36.      * @ORM\Column(type="string", length=50)
  37.      */
  38.     private $ip_modifica;
  39.     /**
  40.      * @ORM\Column(type="integer")
  41.      */
  42.     private $user_crea;
  43.     /**
  44.      * @ORM\Column(type="integer")
  45.      */
  46.     private $user_modifica;
  47.     /**
  48.      * @ORM\Column(type="datetime")
  49.      */
  50.     private $created_at;
  51.     /**
  52.      * @ORM\Column(type="datetime")
  53.      */
  54.     private $updated_at;
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getHistoria(): ?HistoriaClinica
  60.     {
  61.         return $this->historia;
  62.     }
  63.     public function setHistoria(?HistoriaClinica $historia): self
  64.     {
  65.         $this->historia $historia;
  66.         return $this;
  67.     }
  68.     public function getPantalla(): ?string
  69.     {
  70.         return $this->pantalla;
  71.     }
  72.     public function setPantalla(string $pantalla): self
  73.     {
  74.         $this->pantalla $pantalla;
  75.         return $this;
  76.     }
  77.     public function getEstado(): ?bool
  78.     {
  79.         return $this->estado;
  80.     }
  81.     public function setEstado(bool $estado): self
  82.     {
  83.         $this->estado $estado;
  84.         return $this;
  85.     }
  86.     public function getIpCrea(): ?string
  87.     {
  88.         return $this->ip_crea;
  89.     }
  90.     public function setIpCrea(string $ip_crea): self
  91.     {
  92.         $this->ip_crea $ip_crea;
  93.         return $this;
  94.     }
  95.     public function getIpModifica(): ?string
  96.     {
  97.         return $this->ip_modifica;
  98.     }
  99.     public function setIpModifica(string $ip_modifica): self
  100.     {
  101.         $this->ip_modifica $ip_modifica;
  102.         return $this;
  103.     }
  104.     public function getUserCrea(): ?int
  105.     {
  106.         return $this->user_crea;
  107.     }
  108.     public function setUserCrea(int $user_crea): self
  109.     {
  110.         $this->user_crea $user_crea;
  111.         return $this;
  112.     }
  113.     public function getUserModifica(): ?int
  114.     {
  115.         return $this->user_modifica;
  116.     }
  117.     public function setUserModifica(int $user_modifica): self
  118.     {
  119.         $this->user_modifica $user_modifica;
  120.         return $this;
  121.     }
  122.     public function getCreatedAt(): ?\DateTimeInterface
  123.     {
  124.         return $this->created_at;
  125.     }
  126.     public function setCreatedAt(\DateTimeInterface $created_at): self
  127.     {
  128.         $this->created_at $created_at;
  129.         return $this;
  130.     }
  131.     public function getUpdatedAt(): ?\DateTimeInterface
  132.     {
  133.         return $this->updated_at;
  134.     }
  135.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  136.     {
  137.         $this->updated_at $updated_at;
  138.         return $this;
  139.     }
  140.     /**
  141.      * @ORM\PrePersist
  142.      * @ORM\PreUpdate
  143.      */
  144.     public function updatedTimestamps(): void
  145.     {
  146.         $dateTimeNow = new DateTime('now');
  147.         $this->setUpdatedAt($dateTimeNow);
  148.         if ($this->getCreatedAt() === null) {
  149.             $this->setCreatedAt($dateTimeNow);
  150.         }
  151.     }
  152. }