src/AdminBundle/Entity/Objectives.php line 13

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * Objectives
  7. */
  8. #[ORM\Table(name: 'objectives')]
  9. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\ObjectivesRepository::class)]
  10. class Objectives
  11. {
  12. /**
  13. * @var int
  14. */
  15. #[ORM\Column(name: 'id', type: 'integer')]
  16. #[ORM\Id]
  17. #[ORM\GeneratedValue(strategy: 'AUTO')]
  18. private $id;
  19. /**
  20. * @var string
  21. */
  22. #[ORM\Column(name: 'title', type: 'string', length: 255)]
  23. private $title;
  24. /**
  25. * @var string
  26. */
  27. #[ORM\Column(name: 'description', type: 'text', length: 4294967295, nullable: true)]
  28. private $description;
  29. /**
  30. * @var float
  31. */
  32. #[ORM\Column(name: 'price', type: 'float', scale: 2, nullable: true)]
  33. private $price;
  34. /**
  35. * @var string
  36. */
  37. #[ORM\Column(name: 'important_details', type: 'text', length: 4294967295, nullable: true)]
  38. private $importantDetails;
  39. #[ORM\OneToMany(targetEntity: \Images::class, mappedBy: 'objectives')]
  40. private $images;
  41. #[ORM\ManyToMany(targetEntity: \Tours::class, mappedBy: 'objectives', cascade: ['persist', 'remove'])]
  42. private $tours;
  43. /**
  44. * Constructor
  45. */
  46. public function __construct()
  47. {
  48. $this->images = new ArrayCollection();
  49. $this->tours = new ArrayCollection();
  50. }
  51. /**
  52. * Get id
  53. *
  54. * @return int
  55. */
  56. public function getId()
  57. {
  58. return $this->id;
  59. }
  60. /**
  61. * Set title
  62. *
  63. * @param string $title
  64. *
  65. * @return Objectives
  66. */
  67. public function setTitle($title)
  68. {
  69. $this->title = $title;
  70. return $this;
  71. }
  72. /**
  73. * Get title
  74. *
  75. * @return string
  76. */
  77. public function getTitle()
  78. {
  79. return $this->title;
  80. }
  81. /**
  82. * Set description
  83. *
  84. * @param string $description
  85. *
  86. * @return Objectives
  87. */
  88. public function setDescription($description)
  89. {
  90. $this->description = $description;
  91. return $this;
  92. }
  93. /**
  94. * Get description
  95. *
  96. * @return string
  97. */
  98. public function getDescription()
  99. {
  100. return $this->description;
  101. }
  102. /**
  103. * Set importantDetails
  104. *
  105. * @param string $importantDetails
  106. *
  107. * @return Objectives
  108. */
  109. public function setImportantDetails($importantDetails)
  110. {
  111. $this->importantDetails = $importantDetails;
  112. return $this;
  113. }
  114. /**
  115. * Get importantDetails
  116. *
  117. * @return string
  118. */
  119. public function getImportantDetails()
  120. {
  121. return $this->importantDetails;
  122. }
  123. /**
  124. * Add image
  125. *
  126. * @param \AdminBundle\Entity\Images $image
  127. *
  128. * @return Objectives
  129. */
  130. public function addImage(Images $image)
  131. {
  132. $this->images[] = $image;
  133. return $this;
  134. }
  135. /**
  136. * Remove image
  137. *
  138. * @param \AdminBundle\Entity\Images $image
  139. */
  140. public function removeImage(Images $image)
  141. {
  142. $this->images->removeElement($image);
  143. }
  144. /**
  145. * Get images
  146. *
  147. * @return \Doctrine\Common\Collections\Collection
  148. */
  149. public function getImages()
  150. {
  151. return $this->images;
  152. }
  153. /**
  154. * Add tour
  155. *
  156. * @param \AdminBundle\Entity\Tours $tour
  157. *
  158. * @return Objectives
  159. */
  160. public function addTour(Tours $tour)
  161. {
  162. $this->tours[] = $tour;
  163. return $this;
  164. }
  165. /**
  166. * Remove tour
  167. *
  168. * @param \AdminBundle\Entity\Objectives $tour
  169. */
  170. public function removeTour(Objectives $tour)
  171. {
  172. $this->tours->removeElement($tour);
  173. }
  174. /**
  175. * Get tour
  176. *
  177. * @return \Doctrine\Common\Collections\Collection
  178. */
  179. public function getTours()
  180. {
  181. return $this->tours;
  182. }
  183. /**
  184. * @return float
  185. */
  186. public function getPrice()
  187. {
  188. return $this->price;
  189. }
  190. /**
  191. * @param float $price
  192. */
  193. public function setPrice($price)
  194. {
  195. $this->price = $price;
  196. }
  197. }