src/Entity/ModuleFeaturedItem.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\HttpFoundation\File\File;
  5. use Symfony\Component\HttpFoundation\File\UploadedFile;
  6. use App\Entity\Product;
  7. /**
  8. * ModuleTextItem
  9. *
  10. * @ORM\Table(name="module_featured_items")
  11. * @ORM\Entity(repositoryClass="App\Repository\ModuleFeaturedItemRepository")
  12. * @ORM\HasLifecycleCallbacks
  13. */
  14. class ModuleFeaturedItem {
  15. /**
  16. * @var int
  17. *
  18. * @ORM\Column(name="id", type="integer")
  19. * @ORM\Id
  20. * @ORM\GeneratedValue(strategy="AUTO")
  21. */
  22. private $id;
  23. /**
  24. * @var int
  25. *
  26. * @ORM\ManyToOne(targetEntity="ModuleFeatured", inversedBy="items")
  27. * @ORM\JoinColumn(name="module_featured_id", referencedColumnName="id", onDelete="cascade")
  28. */
  29. private $module;
  30. /**
  31. * @var Product
  32. *
  33. * @ORM\ManyToOne(targetEntity="Product")
  34. * @ORM\JoinColumn(name="product_id", referencedColumnName="products_id", onDelete="cascade")
  35. */
  36. private $product;
  37. /**
  38. * @var int
  39. *
  40. * @ORM\Column(name="order_num", type="integer", length=255, nullable=true)
  41. */
  42. private $orderNum;
  43. public function getId(): int {
  44. return $this->id;
  45. }
  46. public function getModule(): int {
  47. return $this->module;
  48. }
  49. public function getProduct(): Product {
  50. return $this->product;
  51. }
  52. public function getOrderNum(): int {
  53. return $this->orderNum;
  54. }
  55. public function setId(int $id): void {
  56. $this->id = $id;
  57. }
  58. public function setModule($module): void {
  59. $this->module = $module;
  60. }
  61. public function setProduct(Product $product): void {
  62. $this->product = $product;
  63. }
  64. public function setOrderNum(int $orderNum): void {
  65. $this->orderNum = $orderNum;
  66. }
  67. }