src/Entity/Legacy/EstimateAddress.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Legacy;
  3. use ApiPlatform\Core\Annotation\ApiFilter;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
  6. use DateTime;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. use Roothirsch\CoreBundle\Entity\User;
  10. /**
  11. * @ORM\Entity
  12. * @ORM\Table(name="legacy_estimate_address")
  13. * @ApiResource
  14. * @ApiFilter(BooleanFilter::class, properties={"isHidden"})
  15. */
  16. class EstimateAddress
  17. {
  18. /**
  19. * @ORM\Id
  20. * @ORM\GeneratedValue
  21. * @ORM\Column(type="integer")
  22. */
  23. private $id;
  24. /**
  25. * @var Estimate
  26. * @ORM\ManyToOne(targetEntity="Estimate", cascade={"persist"})
  27. * @ORM\JoinColumn(onDelete="SET NULL")
  28. */
  29. private $estimate;
  30. /**
  31. * @var string
  32. * @ORM\Column(type="string", nullable=true)
  33. */
  34. private $itemShortcode;
  35. /**
  36. * @var User
  37. * @ORM\ManyToOne(targetEntity="\Roothirsch\CoreBundle\Entity\User", cascade={"persist"})
  38. * @ORM\JoinColumn(onDelete="SET NULL")
  39. */
  40. private $owner;
  41. /**
  42. * @ORM\Column(type="string", nullable=true)
  43. */
  44. private $customer;
  45. /**
  46. * @ORM\Column(type="string", nullable=true)
  47. */
  48. private $address;
  49. /**
  50. * @ORM\Column(type="string", nullable=true)
  51. */
  52. private $contactPerson;
  53. /**
  54. * @var string
  55. * @ORM\Column(type="string", nullable=true)
  56. */
  57. private $source;
  58. /**
  59. * @ORM\Column(type="boolean")
  60. */
  61. private $isHidden = false;
  62. /**
  63. * @var DateTime
  64. *
  65. * @Gedmo\Timestampable(on="create")
  66. * @ORM\Column(type="integer")
  67. */
  68. private $created;
  69. /**
  70. * @var DateTime
  71. *
  72. * @Gedmo\Timestampable(on="update")
  73. * @ORM\Column(type="integer")
  74. */
  75. private $updated;
  76. /**
  77. * @return mixed
  78. */
  79. public function getId()
  80. {
  81. return $this->id;
  82. }
  83. /**
  84. * @param mixed $id
  85. *
  86. * @return EstimateAddress
  87. */
  88. public function setId($id)
  89. {
  90. $this->id = $id;
  91. return $this;
  92. }
  93. /**
  94. * @return Estimate
  95. */
  96. public function getEstimate()
  97. {
  98. return $this->estimate;
  99. }
  100. /**
  101. * @param Estimate $estimate
  102. *
  103. * @return EstimateAddress
  104. */
  105. public function setEstimate($estimate)
  106. {
  107. $this->estimate = $estimate;
  108. return $this;
  109. }
  110. /**
  111. * @return string
  112. */
  113. public function getItemShortcode()
  114. {
  115. return $this->itemShortcode;
  116. }
  117. /**
  118. * @param string $itemShortcode
  119. *
  120. * @return EstimateAddress
  121. */
  122. public function setItemShortcode($itemShortcode)
  123. {
  124. $this->itemShortcode = $itemShortcode;
  125. return $this;
  126. }
  127. /**
  128. * @return User
  129. */
  130. public function getOwner()
  131. {
  132. return $this->owner;
  133. }
  134. /**
  135. * @param User $owner
  136. *
  137. * @return EstimateAddress
  138. */
  139. public function setOwner($owner)
  140. {
  141. $this->owner = $owner;
  142. return $this;
  143. }
  144. /**
  145. * @return mixed
  146. */
  147. public function getCustomer()
  148. {
  149. return $this->customer;
  150. }
  151. /**
  152. * @param mixed $customer
  153. *
  154. * @return EstimateAddress
  155. */
  156. public function setCustomer($customer)
  157. {
  158. $this->customer = $customer;
  159. return $this;
  160. }
  161. /**
  162. * @return mixed
  163. */
  164. public function getAddress()
  165. {
  166. return $this->address;
  167. }
  168. /**
  169. * @param mixed $address
  170. *
  171. * @return EstimateAddress
  172. */
  173. public function setAddress($address)
  174. {
  175. $this->address = $address;
  176. return $this;
  177. }
  178. /**
  179. * @return mixed
  180. */
  181. public function getContactPerson()
  182. {
  183. return $this->contactPerson;
  184. }
  185. /**
  186. * @param mixed $contactPerson
  187. *
  188. * @return EstimateAddress
  189. */
  190. public function setContactPerson($contactPerson)
  191. {
  192. $this->contactPerson = $contactPerson;
  193. return $this;
  194. }
  195. /**
  196. * @return string
  197. */
  198. public function getSource()
  199. {
  200. return $this->source;
  201. }
  202. /**
  203. * @param string $source
  204. *
  205. * @return EstimateAddress
  206. */
  207. public function setSource($source)
  208. {
  209. $this->source = $source;
  210. return $this;
  211. }
  212. /**
  213. * @return bool
  214. */
  215. public function isHidden()
  216. {
  217. return $this->isHidden;
  218. }
  219. /**
  220. * @param bool $isHidden
  221. *
  222. * @return EstimateAddress
  223. */
  224. public function setIsHidden($isHidden)
  225. {
  226. $this->isHidden = $isHidden;
  227. return $this;
  228. }
  229. /**
  230. * @return DateTime
  231. */
  232. public function getCreated()
  233. {
  234. return $this->created;
  235. }
  236. /**
  237. * @return DateTime
  238. */
  239. public function getUpdated()
  240. {
  241. return $this->updated;
  242. }
  243. }