src/Entity/OfferProduct.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OfferProductRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassOfferProductRepository::class)]
  6. class OfferProduct
  7. {
  8.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  9.     private int $id;
  10.     #[ORM\Column(type'string'length255)]
  11.     private string $name '';
  12.     #[ORM\Column(type'string'length255)]
  13.     private string $slug;
  14.     #[ORM\ManyToOne(targetEntityOffer::class, inversedBy'offerProducts')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?Offer $offer;
  17.     #[ORM\Column(type'integer')]
  18.     private int $psProductId;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getName(): ?string
  24.     {
  25.         return $this->name;
  26.     }
  27.     public function setName(string $name): self
  28.     {
  29.         $this->name $name;
  30.         return $this;
  31.     }
  32.     public function getSlug(): ?string
  33.     {
  34.         return $this->slug;
  35.     }
  36.     public function setSlug(string $slug): self
  37.     {
  38.         $this->slug $slug;
  39.         return $this;
  40.     }
  41.     public function getOffer(): ?Offer
  42.     {
  43.         return $this->offer;
  44.     }
  45.     public function setOffer(?Offer $offer): self
  46.     {
  47.         $this->offer $offer;
  48.         return $this;
  49.     }
  50.     public function getPsProductId(): ?int
  51.     {
  52.         return $this->psProductId;
  53.     }
  54.     public function setPsProductId(int $psProductId): self
  55.     {
  56.         $this->psProductId $psProductId;
  57.         return $this;
  58.     }
  59. }