src/Entity/Delivery.php line 19

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