src/Entity/CollectedParcel.php line 19

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