src/Entity/Platforma/DownloadHistory.php line 9

  1. <?php
  2. namespace App\Entity\Platforma;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Entity]
  5. #[ORM\Table(name'plat_download_history')]
  6. class DownloadHistory
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private ?int $id null;
  12.     #[ORM\Column(name'user_id'type'integer')]
  13.     private int $userId;
  14.     #[ORM\Column(type'datetime_immutable'options: ['default' => 'CURRENT_TIMESTAMP'])]
  15.     private \DateTimeImmutable $date;
  16.     #[ORM\Column(type'string'length128)]
  17.     private string $file;
  18.     #[ORM\Column(name'id_szk'type'integer'nullabletrue)]
  19.     private ?int $idSzk null;
  20.     public function __construct()
  21.     {
  22.         $this->date = new \DateTimeImmutable();
  23.     }
  24.     // --- Gettery i Settery ---
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getUserId(): int
  30.     {
  31.         return $this->userId;
  32.     }
  33.     public function setUserId(int $userId): self
  34.     {
  35.         $this->userId $userId;
  36.         return $this;
  37.     }
  38.     public function getDate(): \DateTimeImmutable
  39.     {
  40.         return $this->date;
  41.     }
  42.     public function setDate(\DateTimeImmutable $date): self
  43.     {
  44.         $this->date $date;
  45.         return $this;
  46.     }
  47.     public function getFile(): string
  48.     {
  49.         return $this->file;
  50.     }
  51.     public function setFile(string $file): self
  52.     {
  53.         $this->file $file;
  54.         return $this;
  55.     }
  56.     public function getIdSzk(): ?int
  57.     {
  58.         return $this->idSzk;
  59.     }
  60.     public function setIdSzk(?int $idSzk): self
  61.     {
  62.         $this->idSzk $idSzk;
  63.         return $this;
  64.     }
  65. }