Location.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. namespace MapBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7. * @ORM\Table
  8. * @ORM\Entity
  9. */
  10. class Location
  11. {
  12. use ExtraDataTrait;
  13. /**
  14. * @var int
  15. *
  16. * @ORM\Column(name="id", type="integer")
  17. * @ORM\Id
  18. * @ORM\GeneratedValue(strategy="AUTO")
  19. */
  20. private $id;
  21. /**
  22. * @var int
  23. *
  24. * @ORM\Column(type="integer", nullable=true)
  25. */
  26. private $mapId;
  27. /**
  28. * @var int
  29. *
  30. * @ORM\Column(type="integer", nullable=true)
  31. */
  32. private $objectTypeId;
  33. /**
  34. * @return string
  35. */
  36. public function getData()
  37. {
  38. return array(
  39. 'mapId' => $this->mapId,
  40. 'extraData' => $this->jsonExtraData(),
  41. );
  42. }
  43. /**
  44. * Get id
  45. *
  46. * @return int
  47. */
  48. public function getId()
  49. {
  50. return $this->id;
  51. }
  52. /**
  53. * Set mapId
  54. *
  55. * @param integer $mapId
  56. *
  57. * @return Location
  58. */
  59. public function setMapId($mapId = null)
  60. {
  61. $this->mapId = $mapId;
  62. return $this;
  63. }
  64. /**
  65. * Get mapId
  66. *
  67. * @return int
  68. */
  69. public function getMapId()
  70. {
  71. return $this->mapId;
  72. }
  73. /**
  74. * Set objectTypeId
  75. *
  76. * @param integer $objectTypeId
  77. *
  78. * @return Location
  79. */
  80. public function setObjectTypeId($objectTypeId = null)
  81. {
  82. $this->objectTypeId = $objectTypeId;
  83. return $this;
  84. }
  85. /**
  86. * Get objectTypeId
  87. *
  88. * @return int
  89. */
  90. public function getObjectTypeId()
  91. {
  92. return $this->objectTypeId;
  93. }
  94. }