/src/plugins/orangehrmRecruitmentPlugin/entity/VacancyAttachment.php

https://github.com/orangehrm/OrangeHRM · PHP · 222 lines · 81 code · 27 blank · 114 comment · 0 complexity · 0eb97952d82629bd72cde0122b17b20a MD5 · raw file

  1. <?php
  2. /**
  3. * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
  4. * all the essential functionalities required for any enterprise.
  5. * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com
  6. *
  7. * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of
  8. * the GNU General Public License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  12. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with this program;
  16. * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17. * Boston, MA 02110-1301, USA
  18. */
  19. namespace OrangeHRM\Entity;
  20. use Doctrine\ORM\Mapping as ORM;
  21. use OrangeHRM\Entity\Decorator\DecoratorTrait;
  22. use OrangeHRM\Entity\Decorator\VacancyAttachmentDecorator;
  23. /**
  24. * @method VacancyAttachmentDecorator getDecorator()
  25. *
  26. * @ORM\Table(name="ohrm_job_vacancy_attachment")
  27. * @ORM\Entity
  28. *
  29. */
  30. class VacancyAttachment
  31. {
  32. use DecoratorTrait;
  33. /**
  34. * @var int
  35. *
  36. * @ORM\Column(name="id", type="integer", length=13)
  37. * @ORM\Id
  38. * @ORM\GeneratedValue(strategy="AUTO")
  39. */
  40. private int $id;
  41. /**
  42. * @var Vacancy
  43. * @ORM\ManyToOne(targetEntity="OrangeHRM\Entity\Vacancy", inversedBy="vacancies", cascade={"persist", "remove"})
  44. * @ORM\JoinColumn(name="vacancy_id", referencedColumnName="id",nullable=false)
  45. */
  46. private Vacancy $vacancy;
  47. /**
  48. * @var string
  49. *
  50. * @ORM\Column(name="file_name", type="string", length=200)
  51. */
  52. private string $fileName;
  53. /**
  54. * @var string|null
  55. *
  56. * @ORM\Column(name="file_type", type="string", length=200)
  57. */
  58. private ?string $fileType;
  59. /**
  60. * @var int
  61. *
  62. * @ORM\Column(name="file_size", type="integer")
  63. */
  64. private int $fileSize;
  65. /**
  66. * @var string|resource
  67. *
  68. * @ORM\Column(name="file_content", type="blob")
  69. */
  70. private $fileContent;
  71. /**
  72. * @var int|null
  73. *
  74. * @ORM\Column(name="attachment_type", type="integer")
  75. */
  76. private ?int $attachmentType;
  77. /**
  78. * @var string|null
  79. *
  80. * @ORM\Column(name="comment",type="string", length=255)
  81. */
  82. private ?string $comment;
  83. /**
  84. * @return int
  85. */
  86. public function getId(): int
  87. {
  88. return $this->id;
  89. }
  90. /**
  91. * @param int $id
  92. */
  93. public function setId(int $id): void
  94. {
  95. $this->id = $id;
  96. }
  97. /**
  98. * @return Vacancy
  99. */
  100. public function getVacancy(): Vacancy
  101. {
  102. return $this->vacancy;
  103. }
  104. /**
  105. * @param Vacancy $vacancy
  106. */
  107. public function setVacancy(Vacancy $vacancy): void
  108. {
  109. $this->vacancy = $vacancy;
  110. }
  111. /**
  112. * @return string
  113. */
  114. public function getFileName(): string
  115. {
  116. return $this->fileName;
  117. }
  118. /**
  119. * @param string $fileName
  120. */
  121. public function setFileName(string $fileName): void
  122. {
  123. $this->fileName = $fileName;
  124. }
  125. /**
  126. * @return string|null
  127. */
  128. public function getFileType(): ?string
  129. {
  130. return $this->fileType;
  131. }
  132. /**
  133. * @param string|null $fileType
  134. */
  135. public function setFileType(?string $fileType): void
  136. {
  137. $this->fileType = $fileType;
  138. }
  139. /**
  140. * @return int
  141. */
  142. public function getFileSize(): int
  143. {
  144. return $this->fileSize;
  145. }
  146. /**
  147. * @param int $fileSize
  148. */
  149. public function setFileSize(int $fileSize): void
  150. {
  151. $this->fileSize = $fileSize;
  152. }
  153. /**
  154. * @return resource|string
  155. */
  156. public function getFileContent()
  157. {
  158. return $this->fileContent;
  159. }
  160. /**
  161. * @param string $fileContent
  162. */
  163. public function setFileContent(string $fileContent): void
  164. {
  165. $this->fileContent = $fileContent;
  166. }
  167. /**
  168. * @return int|null
  169. */
  170. public function getAttachmentType(): ?int
  171. {
  172. return $this->attachmentType;
  173. }
  174. /**
  175. * @param int|null $attachmentType
  176. */
  177. public function setAttachmentType(?int $attachmentType): void
  178. {
  179. $this->attachmentType = $attachmentType;
  180. }
  181. /**
  182. * @return string|null
  183. */
  184. public function getComment(): ?string
  185. {
  186. return $this->comment;
  187. }
  188. /**
  189. * @param string|null $comment
  190. */
  191. public function setComment(?string $comment): void
  192. {
  193. $this->comment = $comment;
  194. }
  195. }