src/Entity/ProductModelCountryRestriction.php line 11

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