src/Entity/CollectedParcel.php line 20

Open in your IDE?
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: parcel
  5. * Date: 1/3/19
  6. * Time: 8:30 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
  14. * @ORM\Table(name="collected_parcel")
  15. */
  16. class CollectedParcel {
  17. /**
  18. * @ORM\Id
  19. * @ORM\GeneratedValue(strategy="AUTO")
  20. * @ORM\Column(type="integer")
  21. */
  22. private $id;
  23. /**
  24. * @var WayBill
  25. * @Ignore
  26. * @Serializer\Type("App\Entity\WayBill")
  27. * @ORM\OneToOne(targetEntity="App\Entity\WayBill")
  28. * @ORM\JoinColumns({
  29. * @ORM\JoinColumn(name="waybill_id", referencedColumnName="id")
  30. * })
  31. */
  32. private $waybill;
  33. /**
  34. * @ORM\Column(type="boolean")
  35. */
  36. private $isConsignee;
  37. /**
  38. * @ORM\Column(type="string")
  39. */
  40. private $consigneeNationalId;
  41. /**
  42. * @ORM\Column(type="string")
  43. */
  44. private $collectorName;
  45. /**
  46. * @ORM\Column(type="string")
  47. */
  48. private $nationalId;
  49. /**
  50. * @Serializer\Type("DateTime<'d/m/Y'>")
  51. * @ORM\Column(type="datetime")
  52. */
  53. private $createdAt;
  54. /**
  55. * @var \App\Entity\User
  56. * @Serializer\Type("App\Entity\User")
  57. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  58. * @ORM\JoinColumns({
  59. * @ORM\JoinColumn(name="created_by", referencedColumnName="id")
  60. * })
  61. */
  62. private $createdBy;
  63. /**
  64. * @return mixed
  65. */
  66. public function getId()
  67. {
  68. return $this->id;
  69. }
  70. /**
  71. * @param mixed $id
  72. */
  73. public function setId($id)
  74. {
  75. $this->id = $id;
  76. }
  77. /**
  78. * @return WayBill
  79. */
  80. public function getWaybill()
  81. {
  82. return $this->waybill;
  83. }
  84. /**
  85. * @param WayBill $waybill
  86. */
  87. public function setWaybill($waybill)
  88. {
  89. $this->waybill = $waybill;
  90. }
  91. /**
  92. * @return mixed
  93. */
  94. public function getNationalId()
  95. {
  96. return $this->nationalId;
  97. }
  98. /**
  99. * @param mixed $nationalId
  100. */
  101. public function setNationalId($nationalId)
  102. {
  103. $this->nationalId = $nationalId;
  104. }
  105. /**
  106. * @return mixed
  107. */
  108. public function getCollectorName()
  109. {
  110. return $this->collectorName;
  111. }
  112. /**
  113. * @param mixed $collectorName
  114. */
  115. public function setCollectorName($collectorName)
  116. {
  117. $this->collectorName = $collectorName;
  118. }
  119. /**
  120. * @return mixed
  121. */
  122. public function getCreatedAt()
  123. {
  124. return $this->createdAt;
  125. }
  126. /**
  127. * @param mixed $createdAt
  128. */
  129. public function setCreatedAt($createdAt)
  130. {
  131. $this->createdAt = $createdAt;
  132. }
  133. /**
  134. * @return User
  135. */
  136. public function getCreatedBy()
  137. {
  138. return $this->createdBy;
  139. }
  140. /**
  141. * @param User $createdBy
  142. */
  143. public function setCreatedBy($createdBy)
  144. {
  145. $this->createdBy = $createdBy;
  146. }
  147. /**
  148. * @return mixed
  149. */
  150. public function getIsConsignee()
  151. {
  152. return $this->isConsignee;
  153. }
  154. /**
  155. * @param mixed $isConsignee
  156. */
  157. public function setIsConsignee($isConsignee)
  158. {
  159. $this->isConsignee = $isConsignee;
  160. }
  161. /**
  162. * @return mixed
  163. */
  164. public function getConsigneeNationalId()
  165. {
  166. return $this->consigneeNationalId;
  167. }
  168. /**
  169. * @param mixed $consigneeNationalId
  170. */
  171. public function setConsigneeNationalId($consigneeNationalId)
  172. {
  173. $this->consigneeNationalId = $consigneeNationalId;
  174. }
  175. }