src/Entity/Parcel.php line 20

Open in your IDE?
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: parcel
  5. * Date: 10/15/18
  6. * Time: 2:42 PM
  7. */
  8. namespace App\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use JMS\Serializer\Annotation as Serializer;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. /**
  13. * @ORM\Entity(repositoryClass="App\Repository\ParcelRepository")
  14. * @ORM\Table(name="parcel")
  15. */
  16. class Parcel {
  17. /**
  18. * @ORM\Id
  19. * @ORM\GeneratedValue(strategy="IDENTITY")
  20. * @ORM\Column(type="integer")
  21. */
  22. private $id;
  23. /**
  24. * @Assert\NotBlank(message="Please fill in Parcel Description")
  25. * @ORM\Column(type="string")
  26. */
  27. private $description;
  28. /**
  29. * @var WayBill
  30. *
  31. * @ORM\ManyToOne(targetEntity="App\Entity\WayBill", inversedBy="parcels")
  32. * @ORM\JoinColumns({
  33. * @ORM\JoinColumn(name="way_bill_id", referencedColumnName="id")
  34. * })
  35. */
  36. private $waybill;
  37. /**
  38. * @ORM\Column(type="integer", nullable=true)
  39. */
  40. private $number;
  41. /**
  42. * @ORM\Column(type="boolean")
  43. */
  44. private $isInDelivery;
  45. /**
  46. * @Serializer\Type("DateTime<'Y-m-d H:i:s'>")
  47. * @ORM\Column(type="datetime")
  48. */
  49. private $createdAt;
  50. /**
  51. * @return mixed
  52. */
  53. public function getId()
  54. {
  55. return $this->id;
  56. }
  57. /**
  58. * @param mixed $id
  59. */
  60. public function setId($id)
  61. {
  62. $this->id = $id;
  63. }
  64. /**
  65. * @return mixed
  66. */
  67. public function getDescription()
  68. {
  69. return $this->description;
  70. }
  71. /**
  72. * @param mixed $description
  73. */
  74. public function setDescription($description)
  75. {
  76. $this->description = $description;
  77. }
  78. /**
  79. * @return WayBill
  80. */
  81. public function getWaybill()
  82. {
  83. return $this->waybill;
  84. }
  85. /**
  86. * @param WayBill $waybill
  87. */
  88. public function setWaybill($waybill)
  89. {
  90. $this->waybill = $waybill;
  91. }
  92. /**
  93. * @return mixed
  94. */
  95. public function getNumber()
  96. {
  97. return $this->number;
  98. }
  99. /**
  100. * @param mixed $number
  101. */
  102. public function setNumber($number)
  103. {
  104. $this->number = $number;
  105. }
  106. /**
  107. * @return mixed
  108. */
  109. public function getisInDelivery()
  110. {
  111. return $this->isInDelivery;
  112. }
  113. /**
  114. * @param mixed $isInDelivery
  115. */
  116. public function setIsInDelivery($isInDelivery)
  117. {
  118. $this->isInDelivery = $isInDelivery;
  119. }
  120. /**
  121. * @return mixed
  122. */
  123. public function getCreatedAt()
  124. {
  125. return $this->createdAt;
  126. }
  127. /**
  128. * @param mixed $createdAt
  129. */
  130. public function setCreatedAt($createdAt)
  131. {
  132. $this->createdAt = $createdAt;
  133. }
  134. }