src/Entity/ProductCountryRestriction.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * ManufacturerCountry
  6. *
  7. * @ORM\Table(name="products_countries_restrictions")
  8. * @ORM\Entity
  9. */
  10. class ProductCountryRestriction
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer", nullable=false)
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="IDENTITY")
  18. */
  19. private $id;
  20. /** *
  21. * @var \App\Entity\Product
  22. *
  23. * @ORM\ManyToOne(targetEntity="App\Entity\Product", inversedBy="countryRestrictions")
  24. * @ORM\JoinColumn(name="products_id", referencedColumnName="products_id", onDelete="CASCADE")
  25. */
  26. private $product;
  27. /**
  28. * @var \App\Entity\Country
  29. *
  30. * @ORM\ManyToOne(targetEntity="App\Entity\Country")
  31. * @ORM\JoinColumn(name="countries_id", referencedColumnName="countries_id", onDelete="CASCADE")
  32. */
  33. private $country;
  34. public function getId(): int {
  35. return $this->id;
  36. }
  37. public function getCountry(): \App\Entity\Country {
  38. return $this->country;
  39. }
  40. public function setCountry(\App\Entity\Country $country): void {
  41. $this->country = $country;
  42. }
  43. public function getProduct(): \App\Entity\Product {
  44. return $this->product;
  45. }
  46. public function setProduct(\App\Entity\Product $product): void {
  47. $this->product = $product;
  48. }
  49. }