src/Entity/ProductManufacturers.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductManufacturersRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: ProductManufacturersRepository::class)]
  6. class ProductManufacturers
  7. {
  8. #[ORM\Id]
  9. #[ORM\GeneratedValue]
  10. #[ORM\Column(type: 'integer')]
  11. private $id;
  12. #[ORM\ManyToOne(targetEntity: Products::class, inversedBy: 'productManufacturers')]
  13. private $products;
  14. #[ORM\ManyToOne(targetEntity: Manufacturers::class, inversedBy: 'productManufacturers')]
  15. private $manufacturers;
  16. public function getId(): ?int
  17. {
  18. return $this->id;
  19. }
  20. public function getProducts(): ?Products
  21. {
  22. return $this->products;
  23. }
  24. public function setProducts(?Products $products): self
  25. {
  26. $this->products = $products;
  27. return $this;
  28. }
  29. public function getManufacturers(): ?Manufacturers
  30. {
  31. return $this->manufacturers;
  32. }
  33. public function setManufacturers(?Manufacturers $manufacturers): self
  34. {
  35. $this->manufacturers = $manufacturers;
  36. return $this;
  37. }
  38. }