Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.91 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use AppBundle\Entity\Skill;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use AppBundle\Model\SkillInterface;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use AppBundle\Model\RecruiterInterface;
  11.  
  12.  
  13. /**
  14. * Offer
  15. *
  16. * @ORM\Table(name="offer")
  17. * @ORM\Entity(repositoryClass="AppBundle\Repository\OfferRepository")
  18. */
  19. class Offer
  20. {
  21. /**
  22. * @var int
  23. *
  24. * @ORM\Column(name="id", type="integer")
  25. * @ORM\Id
  26. * @ORM\GeneratedValue(strategy="AUTO")
  27. */
  28. private $id;
  29.  
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(name="name", type="string", length=255)
  34. */
  35. private $name;
  36.  
  37. /**
  38. * @var string
  39. *
  40. * @ORM\Column(name="description", type="text")
  41. */
  42. private $description;
  43.  
  44. /**
  45. * @var \DateTime
  46. *
  47. * @ORM\Column(name="startDate", type="datetime")
  48. */
  49. private $startDate;
  50.  
  51. /**
  52. * @var \DateTime
  53. *
  54. * @ORM\Column(name="endDate", type="datetime")
  55. */
  56. private $endDate;
  57.  
  58. /**
  59. * @var string
  60. *
  61. * @ORM\Column(name="status", type="string", length=255)
  62. */
  63. private $status;
  64.  
  65.  
  66. /**
  67. * @var \Doctrine\Common\Collections\Collection|Skill[]
  68. *
  69. * @ORM\ManyToMany(targetEntity="Skill", inversedBy="offers", cascade={"all"})
  70. * @ORM\JoinTable(
  71. * name="offer_has_skills"
  72. * )
  73. */
  74. private $skills;
  75.  
  76. /**
  77. * @var RecruiterInterface
  78. *
  79. * @ORM\ManyToOne(targetEntity="Recruiter", inversedBy="offers")
  80. * @ORM\JoinColumns({
  81. * @ORM\JoinColumn(name="recruiter_id", referencedColumnName="id")
  82. * })
  83. */
  84. private $recruiter;
  85.  
  86.  
  87. /**
  88. * Get id
  89. *
  90. * @return int
  91. */
  92. public function getId()
  93. {
  94. return $this->id;
  95. }
  96.  
  97.  
  98. /**
  99. * Offer __construct
  100. */
  101. public function __construct(){
  102. //$this->skills = new ArrayCollection();
  103. }
  104.  
  105. /**
  106. * Set name
  107. *
  108. * @param string $name
  109. *
  110. * @return Offer
  111. */
  112. public function setName($name)
  113. {
  114. $this->name = $name;
  115.  
  116. return $this;
  117. }
  118.  
  119. /**
  120. * Get name
  121. *
  122. * @return string
  123. */
  124. public function getName()
  125. {
  126. return $this->name;
  127. }
  128.  
  129. /**
  130. * Set description
  131. *
  132. * @param string $description
  133. *
  134. * @return Offer
  135. */
  136. public function setDescription($description)
  137. {
  138. $this->description = $description;
  139.  
  140. return $this;
  141. }
  142.  
  143. /**
  144. * Get description
  145. *
  146. * @return string
  147. */
  148. public function getDescription()
  149. {
  150. return $this->description;
  151. }
  152.  
  153. /**
  154. * Set startDate
  155. *
  156. * @param \DateTime $startDate
  157. *
  158. * @return Offer
  159. */
  160. public function setStartDate($startDate)
  161. {
  162. $this->startDate = $startDate;
  163.  
  164. return $this;
  165. }
  166.  
  167. /**
  168. * Get startDate
  169. *
  170. * @return \DateTime
  171. */
  172. public function getStartDate()
  173. {
  174. return $this->startDate;
  175. }
  176.  
  177. /**
  178. * Set endDate
  179. *
  180. * @param \DateTime $endDate
  181. *
  182. * @return Offer
  183. */
  184. public function setEndDate($endDate)
  185. {
  186. $this->endDate = $endDate;
  187.  
  188. return $this;
  189. }
  190.  
  191. /**
  192. * Get endDate
  193. *
  194. * @return \DateTime
  195. */
  196. public function getEndDate()
  197. {
  198. return $this->endDate;
  199. }
  200.  
  201. /**
  202. * Set status
  203. *
  204. * @param string $status
  205. *
  206. * @return Offer
  207. */
  208. public function setStatus($status)
  209. {
  210. $this->status = $status;
  211.  
  212. return $this;
  213. }
  214.  
  215. /**
  216. * Get status
  217. *
  218. * @return string
  219. */
  220. public function getStatus()
  221. {
  222. return $this->status;
  223. }
  224.  
  225. /**
  226. * Add skills.
  227. *
  228. * @param Skill $skills
  229. *
  230. * @return Company
  231. */
  232. public function addSkill(Skill $skills)
  233. {
  234. $this->skills[] = $skills;
  235.  
  236. return $this;
  237. }
  238.  
  239. /**
  240. * Remove skills.
  241. *
  242. * @param Skill $skills
  243. */
  244. public function removeSkill(Skill $skills)
  245. {
  246. $this->skills->removeElement($skills);
  247. }
  248.  
  249. /**
  250. * Get skills.
  251. *
  252. * @return Collection
  253. */
  254. public function getSkills()
  255. {
  256. return $this->skills;
  257. }
  258.  
  259. /**
  260. * Set recruiter.
  261. *
  262. * @param \AppBundle\Entity\Recruiter $recruiter
  263. *
  264. * @return Experience
  265. */
  266. public function setRecruiter(\AppBundle\Entity\Recruiter $recruiter = null)
  267. {
  268. $this->recruiter = $recruiter;
  269.  
  270. return $this;
  271. }
  272.  
  273. /**
  274. * Get recruiter.
  275. *
  276. * @return \AppBundle\Entity\Recruiter
  277. */
  278. public function getRecruiter()
  279. {
  280. return $this->recruiter;
  281. }
  282. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement