src/Entity/ProductClick.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductClickRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\ORM\Mapping\Column;
  6. use Doctrine\ORM\Mapping\Entity;
  7. use Doctrine\ORM\Mapping\GeneratedValue;
  8. use Doctrine\ORM\Mapping\Id;
  9. use Doctrine\ORM\Mapping\JoinColumn;
  10. use Doctrine\ORM\Mapping\ManyToOne;
  11. #[ORM\Entity(repositoryClassProductClickRepository::class)]
  12. class ProductClick
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue(strategy'AUTO')]
  16.     #[ORM\Column(type'integer'uniquetrue)]
  17.     private $id;
  18.     #[ORM\Column(type'date')]
  19.     private $date;
  20.     #[ORM\ManyToOne(targetEntityProduct::class, inversedBy'productclicks')]
  21.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  22.     private $product;
  23.     #[ORM\Column(type'integer')]
  24.     private $number;
  25.     #[ORM\ManyToOne(targetEntityCompany::class,inversedBy'productclicks')]
  26.     #[ORM\JoinColumn(nullablefalse,onDelete'CASCADE')]
  27.     private $company;
  28.     public function getCompany(): ?int
  29.     {
  30.         return $this->company->getId();
  31.     }
  32.     public function setCompany(?Company $company): self
  33.     {
  34.         $this->company $company;
  35.         return $this;
  36.     }
  37.     public function getProduct(): ?int
  38.     {
  39.         return $this->product->getId();
  40.     }
  41.     public function setProduct(?Product $product): self
  42.     {
  43.         $this->product $product;
  44.         return $this;
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getDate(): ?\DateTimeInterface
  51.     {
  52.         return $this->date;
  53.     }
  54.     public function setDate(\DateTimeInterface $date): self
  55.     {
  56.         $this->date $date;
  57.         return $this;
  58.     }
  59.     public function getNumber(): ?int
  60.     {
  61.         return $this->number;
  62.     }
  63.     public function setNumber(int $number): self
  64.     {
  65.         $this->number $number;
  66.         return $this;
  67.     }
  68. }