src/Entity/ProductToProductExtraField.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * ProductsToProductsExtraFields
  6. *
  7. * @ORM\Table(name="products_to_products_extra_fields", indexes={@ORM\Index(name="products_extra_fields_value", columns={"products_extra_fields_value"})})
  8. * @ORM\Entity
  9. */
  10. class ProductToProductExtraField
  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. * @ORM\ManyToOne(targetEntity="App\Entity\Product", inversedBy="extraFields")
  23. * @ORM\JoinColumn(name="products_id", referencedColumnName="products_id")
  24. */
  25. private $product;
  26. /** *
  27. * @var \App\Entity\ProductExtraField|null
  28. * @ORM\ManyToOne(targetEntity="App\Entity\ProductExtraField")
  29. * @ORM\JoinColumn(name="products_extra_fields_id", referencedColumnName="products_extra_fields_id", onDelete="CASCADE")
  30. */
  31. private $extraField;
  32. /**
  33. * @var string|null
  34. *
  35. * @ORM\Column(name="products_extra_fields_value", type="string", length=100, nullable=true)
  36. */
  37. private $value;
  38. public function getId(): int {
  39. return $this->id;
  40. }
  41. public function getProduct(): \App\Entity\Product {
  42. return $this->product;
  43. }
  44. public function getExtraField(): ?\App\Entity\ProductExtraField {
  45. return $this->extraField;
  46. }
  47. public function getValue(): ?string {
  48. return $this->value;
  49. }
  50. public function setId(int $id): void {
  51. $this->id = $id;
  52. }
  53. public function setProduct(\App\Entity\Product $product): void {
  54. $this->product = $product;
  55. }
  56. public function setExtraField(\App\Entity\ProductExtraField $extraField): void {
  57. $this->extraField = $extraField;
  58. }
  59. public function setValue(?string $value): void {
  60. $this->value = $value;
  61. }
  62. }