src/AdminBundle/Entity/Locations.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. * Locations
  7. */
  8. #[ORM\Table(name: 'locations')]
  9. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\LocationsRepository::class)]
  10. class Locations
  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: 'place_id', type: 'string', length: 255, nullable: true)]
  23. private $placeId;
  24. /**
  25. * @var string
  26. */
  27. #[ORM\Column(name: 'name', type: 'string', length: 255, nullable: true)]
  28. private $name;
  29. /**
  30. * @var string
  31. */
  32. #[ORM\Column(name: 'address', type: 'string', length: 255, nullable: true)]
  33. private $address;
  34. /**
  35. * @var string
  36. */
  37. #[ORM\Column(name: 'postcode', type: 'string', length: 255, nullable: true)]
  38. private $postcode;
  39. #[ORM\ManyToMany(targetEntity: \Tours::class, mappedBy: 'startPoints', cascade: ['persist'])]
  40. private $toursStarts;
  41. #[ORM\ManyToMany(targetEntity: \Tours::class, mappedBy: 'endPoints', cascade: ['persist'])]
  42. private $toursEnds;
  43. /**
  44. * Constructor
  45. */
  46. public function __construct()
  47. {
  48. $this->toursStarts = new ArrayCollection();
  49. $this->toursEnds = 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 placeId
  62. *
  63. * @param string $placeId
  64. *
  65. * @return Locations
  66. */
  67. public function setPlaceId($placeId)
  68. {
  69. $this->placeId = $placeId;
  70. return $this;
  71. }
  72. /**
  73. * Get placeId
  74. *
  75. * @return string
  76. */
  77. public function getPlaceId()
  78. {
  79. return $this->placeId;
  80. }
  81. /**
  82. * Set name
  83. *
  84. * @param string $name
  85. *
  86. * @return Locations
  87. */
  88. public function setName($name)
  89. {
  90. $this->name = $name;
  91. return $this;
  92. }
  93. /**
  94. * Get name
  95. *
  96. * @return string
  97. */
  98. public function getName()
  99. {
  100. return $this->name;
  101. }
  102. /**
  103. * Set address
  104. *
  105. * @param string $address
  106. *
  107. * @return Locations
  108. */
  109. public function setAddress($address)
  110. {
  111. $this->address = $address;
  112. return $this;
  113. }
  114. /**
  115. * Get address
  116. *
  117. * @return string
  118. */
  119. public function getAddress()
  120. {
  121. return $this->address;
  122. }
  123. /**
  124. * Set postcode
  125. *
  126. * @param string $postcode
  127. *
  128. * @return Locations
  129. */
  130. public function setPostcode($postcode)
  131. {
  132. $this->postcode = $postcode;
  133. return $this;
  134. }
  135. /**
  136. * Get postcode
  137. *
  138. * @return string
  139. */
  140. public function getPostcode()
  141. {
  142. return $this->postcode;
  143. }
  144. /**
  145. * Get toursStarts
  146. *
  147. * @return \Doctrine\Common\Collections\Collection
  148. */
  149. public function getToursStarts()
  150. {
  151. return $this->toursStarts;
  152. }
  153. /**
  154. * Add toursStart
  155. *
  156. * @param \AdminBundle\Entity\Tours $toursStart
  157. *
  158. * @return Locations
  159. */
  160. public function addToursStart(Tours $toursStart)
  161. {
  162. $this->toursStarts[] = $toursStart;
  163. return $this;
  164. }
  165. /**
  166. * Remove toursStart
  167. *
  168. * @param \AdminBundle\Entity\Tours $toursStart
  169. */
  170. public function removeToursStart(Tours $toursStart)
  171. {
  172. $this->toursStarts->removeElement($toursStart);
  173. }
  174. /**
  175. * Get toursEnds
  176. *
  177. * @return \Doctrine\Common\Collections\Collection
  178. */
  179. public function getToursEnds()
  180. {
  181. return $this->toursEnds;
  182. }
  183. /**
  184. * Add toursEnd
  185. *
  186. * @param \AdminBundle\Entity\Tours $toursEnd
  187. *
  188. * @return Locations
  189. */
  190. public function addToursEnd(Tours $toursEnd)
  191. {
  192. $this->toursEnds[] = $toursEnd;
  193. return $this;
  194. }
  195. /**
  196. * Remove toursEnd
  197. *
  198. * @param \AdminBundle\Entity\Tours $toursEnd
  199. */
  200. public function removeTour(Tours $toursEnd)
  201. {
  202. $this->toursEnds->removeElement($toursEnd);
  203. }
  204. }