vendor/roothirsch/delivery-time-estimator-bundle/Entity/Product.php line 16

Open in your IDE?
  1. <?php
  2. namespace Roothirsch\DeliveryTimeEstimatorBundle\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use Roothirsch\DeliveryTimeEstimatorBundle\Repository\ProductRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9. * @ApiResource(shortName="DeliveryTimeEstimator/Product")
  10. * @ORM\Entity
  11. * @ORM\Table(name="delivery_time_estimator_product")
  12. */
  13. class Product
  14. {
  15. /**
  16. * @ORM\Id
  17. * @ORM\GeneratedValue
  18. * @ORM\Column(type="integer")
  19. * @Groups({"read"})
  20. */
  21. private $id;
  22. /**
  23. * @ORM\Column(type="string", length=255)
  24. * @Groups({"read"})
  25. * @Gedmo\Translatable
  26. */
  27. private $title;
  28. /**
  29. * @ORM\Column(type="integer")
  30. * @Groups({"read"})
  31. */
  32. private $manufacturingDays;
  33. /**
  34. * @ORM\Column(type="boolean")
  35. * @Groups({"read"})
  36. */
  37. private $onRequestOnly;
  38. /**
  39. * @Gedmo\SortablePosition
  40. * @ORM\Column(name="position", type="integer")
  41. * @Groups({"read"})
  42. */
  43. private $position = 9999;
  44. /**
  45. * @Gedmo\SortableGroup
  46. * @ORM\ManyToOne(targetEntity=ProductGroup::class, inversedBy="products")
  47. */
  48. private $productGroup;
  49. public function getId(): ?int
  50. {
  51. return $this->id;
  52. }
  53. public function getTitle(): ?string
  54. {
  55. return $this->title;
  56. }
  57. public function setTitle(string $title): self
  58. {
  59. $this->title = $title;
  60. return $this;
  61. }
  62. public function getManufacturingDays(): ?int
  63. {
  64. return $this->manufacturingDays;
  65. }
  66. public function setManufacturingDays(int $manufacturingDays): self
  67. {
  68. $this->manufacturingDays = $manufacturingDays;
  69. return $this;
  70. }
  71. public function getOnRequestOnly(): ?bool
  72. {
  73. return $this->onRequestOnly;
  74. }
  75. public function setOnRequestOnly(bool $onRequestOnly): self
  76. {
  77. $this->onRequestOnly = $onRequestOnly;
  78. return $this;
  79. }
  80. public function getProductGroup(): ?ProductGroup
  81. {
  82. return $this->productGroup;
  83. }
  84. public function setProductGroup(?ProductGroup $productGroup): self
  85. {
  86. $this->productGroup = $productGroup;
  87. return $this;
  88. }
  89. public function getPosition() {
  90. return $this->position;
  91. }
  92. public function setPosition($position) {
  93. $this->position = $position;
  94. }
  95. }