src/Entity/HtNote.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\HtNoteRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=HtNoteRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class HtNote
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=htItem::class, inversedBy="htNotes")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $htItem;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Escandallo::class, inversedBy="htNotes")
  24.      * @ORM\JoinColumn(nullable=false)
  25.      */
  26.     private $htEscandallo;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $note;
  31.     /**
  32.      * @ORM\Column(type="datetime_immutable")
  33.      */
  34.     private $createdAt;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity=User::class)
  37.      * @ORM\JoinColumn(nullable=false)
  38.      */
  39.     private $createdId;
  40.     /**
  41.      * @ORM\Column(type="datetime_immutable")
  42.      */
  43.     private $updatedAt;
  44.     /**
  45.      * @ORM\ManyToOne(targetEntity=User::class)
  46.      * @ORM\JoinColumn(nullable=false)
  47.      */
  48.     private $updatedId;
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getHtItem(): ?htItem
  54.     {
  55.         return $this->htItem;
  56.     }
  57.     public function setHtItem(?htItem $htItem): self
  58.     {
  59.         $this->htItem $htItem;
  60.         return $this;
  61.     }
  62.     public function getHtEscandallo(): ?Escandallo
  63.     {
  64.         return $this->htEscandallo;
  65.     }
  66.     public function setHtEscandallo(?Escandallo $htEscandallo): self
  67.     {
  68.         $this->htEscandallo $htEscandallo;
  69.         return $this;
  70.     }
  71.     public function getNote(): ?string
  72.     {
  73.         return $this->note;
  74.     }
  75.     public function setNote(?string $note): self
  76.     {
  77.         $this->note $note;
  78.         return $this;
  79.     }
  80.     public function getCreatedAt(): ?\DateTimeImmutable
  81.     {
  82.         return $this->createdAt;
  83.     }
  84.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  85.     {
  86.         $this->createdAt $createdAt;
  87.         return $this;
  88.     }
  89.     public function getCreatedId(): ?User
  90.     {
  91.         return $this->createdId;
  92.     }
  93.     public function setCreatedId(?User $createdId): self
  94.     {
  95.         $this->createdId $createdId;
  96.         return $this;
  97.     }
  98.     public function getUpdatedAt(): ?\DateTimeImmutable
  99.     {
  100.         return $this->updatedAt;
  101.     }
  102.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  103.     {
  104.         $this->updatedAt $updatedAt;
  105.         return $this;
  106.     }
  107.     /**
  108.      * @ORM\PrePersist
  109.      */
  110.     public function setCreatedAtValue()
  111.     {
  112.         $this->createdAt = new \DateTimeImmutable();
  113.     }
  114.     /**
  115.      * @ORM\PrePersist
  116.      * @ORM\PreUpdate
  117.      */
  118.     public function setUpdatedAtValue()
  119.     {
  120.         $this->updatedAt = new \DateTimeImmutable();
  121.     }
  122.     public function getUpdatedId(): ?User
  123.     {
  124.         return $this->updatedId;
  125.     }
  126.     public function setUpdatedId(?User $updatedId): self
  127.     {
  128.         $this->updatedId $updatedId;
  129.         return $this;
  130.     }
  131. }