src/Entity/Delivery.php line 20

Open in your IDE?
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: parcel
  5. * Date: 12/29/18
  6. * Time: 9:43 AM
  7. */
  8. namespace App\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use JMS\Serializer\Annotation as Serializer;
  11. use Symfony\Component\Serializer\Annotation\Ignore;
  12. /**
  13. * @ORM\Entity(repositoryClass="App\Repository\DeliveryRepository")
  14. * @ORM\Table(name="delivery")
  15. */
  16. class Delivery {
  17. /**
  18. * @ORM\Id
  19. * @ORM\GeneratedValue(strategy="IDENTITY")
  20. * @ORM\Column(type="integer")
  21. */
  22. private $id;
  23. /**
  24. * @ORM\Column(type="integer")
  25. */
  26. private $parcelCount;
  27. /**
  28. * @Ignore
  29. * @Serializer\Type("ArrayCollection<App\Entity\DeliveryParcel>")
  30. * @ORM\OneToMany(targetEntity="App\Entity\DeliveryParcel", mappedBy="delivery")
  31. */
  32. private $parcels;
  33. /**
  34. * @var \App\Entity\Station
  35. * @Serializer\Type("App\Entity\Station")
  36. * @ORM\ManyToOne(targetEntity="App\Entity\Station")
  37. * @ORM\JoinColumns({
  38. * @ORM\JoinColumn(name="origin_station", referencedColumnName="id")
  39. * })
  40. */
  41. private $originStation;
  42. /**
  43. * @var \App\Entity\Station
  44. * @Serializer\Type("App\Entity\Station")
  45. * @ORM\ManyToOne(targetEntity="App\Entity\Station")
  46. * @ORM\JoinColumns({
  47. * @ORM\JoinColumn(name="destination", referencedColumnName="id")
  48. * })
  49. */
  50. private $destination;
  51. /**
  52. * @ORM\Column(type="boolean")
  53. */
  54. private $isCancelled;
  55. /**
  56. * @Ignore
  57. * @var \App\Entity\User
  58. * @Serializer\Type("App\Entity\User")
  59. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  60. * @ORM\JoinColumns({
  61. * @ORM\JoinColumn(name="cancelled_by", referencedColumnName="id", nullable=true)
  62. * })
  63. */
  64. private $cancelledBy;
  65. /**
  66. * @ORM\Column(type="datetime", nullable=true)
  67. */
  68. private $cancelledAt;
  69. /**
  70. * @ORM\Column(type="boolean")
  71. */
  72. private $isLoaded;
  73. /**
  74. * @ORM\Column(type="datetime", nullable=true)
  75. */
  76. private $loadedAt;
  77. /**
  78. * @Ignore
  79. * @var \App\Entity\User
  80. * @Serializer\Type("App\Entity\User")
  81. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  82. * @ORM\JoinColumns({
  83. * @ORM\JoinColumn(name="loaded_by", referencedColumnName="id", nullable=true)
  84. * })
  85. */
  86. private $loadedBy;
  87. /**
  88. * @ORM\Column(type="boolean")
  89. */
  90. private $isReceived;
  91. /**
  92. * @ORM\Column(type="boolean")
  93. */
  94. private $isReceivedFully;
  95. /**
  96. * @ORM\Column(type="integer")
  97. */
  98. private $receivedParcels;
  99. /**
  100. * @ORM\Column(type="datetime", nullable=true)
  101. */
  102. private $receivedAt;
  103. /**
  104. * @Ignore
  105. * @var \App\Entity\User
  106. * @Serializer\Type("App\Entity\User")
  107. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  108. * @ORM\JoinColumns({
  109. * @ORM\JoinColumn(name="received_by", referencedColumnName="id", nullable=true)
  110. * })
  111. */
  112. private $receivedBy;
  113. /**
  114. * @ORM\Column(type="datetime")
  115. */
  116. private $createdAt;
  117. /**
  118. * @Ignore
  119. * @var \App\Entity\User
  120. * @Serializer\Type("App\Entity\User")
  121. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  122. * @ORM\JoinColumns({
  123. * @ORM\JoinColumn(name="created_by", referencedColumnName="id")
  124. * })
  125. */
  126. private $createdBy;
  127. /**
  128. * @Ignore
  129. * @Serializer\Type("App\Entity\DeliveryVehicle")
  130. * @ORM\OneToOne(targetEntity="App\Entity\DeliveryVehicle", mappedBy="delivery")
  131. */
  132. private $deliveryVehicle;
  133. /**
  134. * @ORM\Column(type="boolean")
  135. */
  136. private $isVerified;
  137. /**
  138. * @return mixed
  139. */
  140. public function getId()
  141. {
  142. return $this->id;
  143. }
  144. /**
  145. * @param mixed $id
  146. */
  147. public function setId($id)
  148. {
  149. $this->id = $id;
  150. }
  151. /**
  152. * @return mixed
  153. */
  154. public function getParcelCount()
  155. {
  156. return $this->parcelCount;
  157. }
  158. /**
  159. * @param mixed $parcelCount
  160. */
  161. public function setParcelCount($parcelCount)
  162. {
  163. $this->parcelCount = $parcelCount;
  164. }
  165. /**
  166. * @return Station
  167. */
  168. public function getDestination()
  169. {
  170. return $this->destination;
  171. }
  172. /**
  173. * @param Station $destination
  174. */
  175. public function setDestination($destination)
  176. {
  177. $this->destination = $destination;
  178. }
  179. /**
  180. * @return mixed
  181. */
  182. public function getParcels()
  183. {
  184. return $this->parcels;
  185. }
  186. /**
  187. * @param mixed $parcels
  188. */
  189. public function setParcels($parcels)
  190. {
  191. $this->parcels = $parcels;
  192. }
  193. /**
  194. * @return mixed
  195. */
  196. public function getisCancelled()
  197. {
  198. return $this->isCancelled;
  199. }
  200. /**
  201. * @param mixed $isCancelled
  202. */
  203. public function setIsCancelled($isCancelled)
  204. {
  205. $this->isCancelled = $isCancelled;
  206. }
  207. /**
  208. * @return User
  209. */
  210. public function getCancelledBy()
  211. {
  212. return $this->cancelledBy;
  213. }
  214. /**
  215. * @param User $cancelledBy
  216. */
  217. public function setCancelledBy($cancelledBy)
  218. {
  219. $this->cancelledBy = $cancelledBy;
  220. }
  221. /**
  222. * @return mixed
  223. */
  224. public function getCancelledAt()
  225. {
  226. return $this->cancelledAt;
  227. }
  228. /**
  229. * @param mixed $cancelledAt
  230. */
  231. public function setCancelledAt($cancelledAt)
  232. {
  233. $this->cancelledAt = $cancelledAt;
  234. }
  235. /**
  236. * @return mixed
  237. */
  238. public function getisLoaded()
  239. {
  240. return $this->isLoaded;
  241. }
  242. /**
  243. * @param mixed $isLoaded
  244. */
  245. public function setIsLoaded($isLoaded)
  246. {
  247. $this->isLoaded = $isLoaded;
  248. }
  249. /**
  250. * @return mixed
  251. */
  252. public function getLoadedAt()
  253. {
  254. return $this->loadedAt;
  255. }
  256. /**
  257. * @param mixed $loadedAt
  258. */
  259. public function setLoadedAt($loadedAt)
  260. {
  261. $this->loadedAt = $loadedAt;
  262. }
  263. /**
  264. * @return User
  265. */
  266. public function getLoadedBy()
  267. {
  268. return $this->loadedBy;
  269. }
  270. /**
  271. * @param User $loadedBy
  272. */
  273. public function setLoadedBy($loadedBy)
  274. {
  275. $this->loadedBy = $loadedBy;
  276. }
  277. /**
  278. * @return mixed
  279. */
  280. public function getisReceived()
  281. {
  282. return $this->isReceived;
  283. }
  284. /**
  285. * @param mixed $isReceived
  286. */
  287. public function setIsReceived($isReceived)
  288. {
  289. $this->isReceived = $isReceived;
  290. }
  291. /**
  292. * @return mixed
  293. */
  294. public function getReceivedAt()
  295. {
  296. return $this->receivedAt;
  297. }
  298. /**
  299. * @param mixed $receivedAt
  300. */
  301. public function setReceivedAt($receivedAt)
  302. {
  303. $this->receivedAt = $receivedAt;
  304. }
  305. /**
  306. * @return User
  307. */
  308. public function getReceivedBy()
  309. {
  310. return $this->receivedBy;
  311. }
  312. /**
  313. * @param User $receivedBy
  314. */
  315. public function setReceivedBy($receivedBy)
  316. {
  317. $this->receivedBy = $receivedBy;
  318. }
  319. /**
  320. * @return mixed
  321. */
  322. public function getCreatedAt()
  323. {
  324. return $this->createdAt;
  325. }
  326. /**
  327. * @param mixed $createdAt
  328. */
  329. public function setCreatedAt($createdAt)
  330. {
  331. $this->createdAt = $createdAt;
  332. }
  333. /**
  334. * @return User
  335. */
  336. public function getCreatedBy()
  337. {
  338. return $this->createdBy;
  339. }
  340. /**
  341. * @param User $createdBy
  342. */
  343. public function setCreatedBy($createdBy)
  344. {
  345. $this->createdBy = $createdBy;
  346. }
  347. /**
  348. * @return Station
  349. */
  350. public function getOriginStation()
  351. {
  352. return $this->originStation;
  353. }
  354. /**
  355. * @param Station $originStation
  356. */
  357. public function setOriginStation($originStation)
  358. {
  359. $this->originStation = $originStation;
  360. }
  361. /**
  362. * @return mixed
  363. */
  364. public function getDeliveryVehicle()
  365. {
  366. return $this->deliveryVehicle;
  367. }
  368. /**
  369. * @param mixed $deliveryVehicle
  370. */
  371. public function setDeliveryVehicle($deliveryVehicle)
  372. {
  373. $this->deliveryVehicle = $deliveryVehicle;
  374. }
  375. /**
  376. * @return mixed
  377. */
  378. public function getisVerified()
  379. {
  380. return $this->isVerified;
  381. }
  382. /**
  383. * @param mixed $isVerified
  384. */
  385. public function setIsVerified($isVerified)
  386. {
  387. $this->isVerified = $isVerified;
  388. }
  389. /**
  390. * @return mixed
  391. */
  392. public function getisReceivedFully()
  393. {
  394. return $this->isReceivedFully;
  395. }
  396. /**
  397. * @param mixed $isReceivedFully
  398. */
  399. public function setIsReceivedFully($isReceivedFully)
  400. {
  401. $this->isReceivedFully = $isReceivedFully;
  402. }
  403. /**
  404. * @return mixed
  405. */
  406. public function getReceivedParcels()
  407. {
  408. return $this->receivedParcels;
  409. }
  410. /**
  411. * @param mixed $receivedParcels
  412. */
  413. public function setReceivedParcels($receivedParcels)
  414. {
  415. $this->receivedParcels = $receivedParcels;
  416. }
  417. }