src/Entity/System/ProductDocument.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Table(name="product_document")
  6. *
  7. * @ORM\Entity(repositoryClass="App\Repository\System\ProductDocumentRepository")
  8. */
  9. class ProductDocument
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Id
  15. *
  16. * @ORM\GeneratedValue()
  17. *
  18. * @ORM\Column(type="integer")
  19. */
  20. private $id;
  21. /**
  22. * @var ProductDocumentType
  23. *
  24. * @ORM\ManyToOne(targetEntity="ProductDocumentType")
  25. */
  26. private $type;
  27. /**
  28. * @var Product
  29. *
  30. * @ORM\ManyToOne(targetEntity="App\Entity\System\Product")
  31. *
  32. * @ORM\JoinColumn(name="product_id", referencedColumnName="id_product")
  33. */
  34. private $product;
  35. /**
  36. * @var string
  37. *
  38. * @ORM\Column(type="string", nullable=false)
  39. */
  40. private $fileName;
  41. /**
  42. * @var string
  43. *
  44. * @ORM\Column(type="string", nullable=false)
  45. */
  46. private $filePath;
  47. /**
  48. * @var string
  49. *
  50. * @ORM\Column(type="string", length=10)
  51. */
  52. private $fileType;
  53. /**
  54. * @var Language[]
  55. *
  56. * @ORM\ManyToMany(targetEntity="App\Entity\System\Language")
  57. *
  58. * @ORM\JoinTable(
  59. * name="product_document_lang",
  60. * joinColumns={@ORM\JoinColumn(name="document_id", referencedColumnName="id", fieldName="id")},
  61. * inverseJoinColumns={@ORM\JoinColumn(name="language_id", referencedColumnName="id_lang", fieldName="id")}
  62. * )
  63. */
  64. private $languages;
  65. public function getId(): int
  66. {
  67. return $this->id;
  68. }
  69. public function getType(): ProductDocumentType
  70. {
  71. return $this->type;
  72. }
  73. public function setType(ProductDocumentType $type): void
  74. {
  75. $this->type = $type;
  76. }
  77. public function getProduct(): Product
  78. {
  79. return $this->product;
  80. }
  81. public function setProduct(Product $product): void
  82. {
  83. $this->product = $product;
  84. }
  85. public function getLanguages(): array
  86. {
  87. return $this->languages;
  88. }
  89. public function setLanguages(array $languages): void
  90. {
  91. $this->languages = $languages;
  92. }
  93. public function getFileName(): string
  94. {
  95. return $this->fileName;
  96. }
  97. public function setFileName(string $fileName): ProductDocument
  98. {
  99. $this->fileName = $fileName;
  100. return $this;
  101. }
  102. public function getFilePath(): string
  103. {
  104. return $this->filePath;
  105. }
  106. public function setFilePath(string $filePath): ProductDocument
  107. {
  108. $this->filePath = $filePath;
  109. return $this;
  110. }
  111. public function getFileType(): string
  112. {
  113. return $this->fileType;
  114. }
  115. public function setFileType(string $fileType): ProductDocument
  116. {
  117. $this->fileType = $fileType;
  118. return $this;
  119. }
  120. }