src/Entity/Platforma/Code.php line 10

  1. <?php
  2. namespace App\Entity\Platforma;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Entity]
  5. #[ORM\Table(name'plat_code')]
  6. #[ORM\UniqueConstraint(name'uniq_kod'columns: ['kod'])]
  7. class Code
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private ?int $id null;
  13.     #[ORM\Column(name'nr_zam'type'integer')]
  14.     private int $nrZam;
  15.     #[ORM\Column(type'string'length128)]
  16.     private string $kod;
  17.     #[ORM\Column(name'nr_produktu'type'integer')]
  18.     private int $nrProduktu;
  19.     #[ORM\Column(name'data_dodania'type'datetime')]
  20.     private \DateTime $dataDodania;
  21.     #[ORM\Column(type'boolean'options: ['default' => true])]
  22.     private bool $active true;
  23.     #[ORM\Column(type'boolean'options: ['default' => false])]
  24.     private bool $used false;
  25.     #[ORM\Column(name'user_id'type'integer'nullabletrue)]
  26.     private ?int $userId null;
  27.     #[ORM\Column(name'data_wykorzystania'type'datetime_immutable'nullabletrue)]
  28.     private ?\DateTimeImmutable $dataWykorzystania null;
  29.     #[ORM\Column(name'oddzial_id'type'integer'nullabletrue)]
  30.     private ?int $oddzialId null;
  31.     #[ORM\Column(name'procent_prowizji'type'integer'nullabletrue)]
  32.     private ?int $procentProwizji null;
  33.     public function __construct()
  34.     {
  35.         $this->dataDodania = new \DateTime();
  36.     }
  37.     public function getId(): ?int { return $this->id; }
  38.     public function getNrZam(): int { return $this->nrZam; }
  39.     public function setNrZam(int $nrZam): self $this->nrZam $nrZam; return $this; }
  40.     public function getKod(): string { return $this->kod; }
  41.     public function setKod(string $kod): self $this->kod $kod; return $this; }
  42.     public function getNrProduktu(): int { return $this->nrProduktu; }
  43.     public function setNrProduktu(int $nrProduktu): self $this->nrProduktu $nrProduktu; return $this; }
  44.     public function getDataDodania(): \DateTime { return $this->dataDodania; }
  45.     public function setDataDodania(\DateTime $dataDodania): self $this->dataDodania $dataDodania; return $this; }
  46.     public function isActive(): bool { return $this->active; }
  47.     public function setActive(bool $active): self $this->active $active; return $this; }
  48.     public function isUsed(): bool { return $this->used; }
  49.     public function setUsed(bool $used): self $this->used $used; return $this; }
  50.     public function getUserId(): ?int { return $this->userId; }
  51.     public function setUserId(?int $userId): self $this->userId $userId; return $this; }
  52.     public function getDataWykorzystania(): ?\DateTimeImmutable { return $this->dataWykorzystania; }
  53.     public function setDataWykorzystania(?\DateTimeImmutable $dataWykorzystania): self $this->dataWykorzystania $dataWykorzystania; return $this; }
  54.     public function getOddzialId(): ?int { return $this->oddzialId; }
  55.     public function setOddzialId(?int $oddzialId): self $this->oddzialId $oddzialId; return $this; }
  56.     public function getProcentProwizji(): ?int { return $this->procentProwizji; }
  57.     public function setProcentProwizji(?int $procentProwizji): self $this->procentProwizji $procentProwizji; return $this; }
  58. }