<?php/** * Created by PhpStorm. * User: parcel * Date: 10/15/18 * Time: 2:42 PM */namespace App\Entity;use Doctrine\ORM\Mapping as ORM;use JMS\Serializer\Annotation as Serializer;use Symfony\Component\Validator\Constraints as Assert;/** * @ORM\Entity(repositoryClass="App\Repository\ParcelRepository") * @ORM\Table(name="parcel") */class Parcel { /** * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\Column(type="integer") */ private $id; /** * @Assert\NotBlank(message="Please fill in Parcel Description") * @ORM\Column(type="string") */ private $description; /** * @var WayBill * * @ORM\ManyToOne(targetEntity="App\Entity\WayBill", inversedBy="parcels") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="way_bill_id", referencedColumnName="id") * }) */ private $waybill; /** * @ORM\Column(type="integer", nullable=true) */ private $number; /** * @ORM\Column(type="boolean") */ private $isInDelivery; /** * @Serializer\Type("DateTime<'Y-m-d H:i:s'>") * @ORM\Column(type="datetime") */ private $createdAt; /** * @return mixed */ public function getId() { return $this->id; } /** * @param mixed $id */ public function setId($id) { $this->id = $id; } /** * @return mixed */ public function getDescription() { return $this->description; } /** * @param mixed $description */ public function setDescription($description) { $this->description = $description; } /** * @return WayBill */ public function getWaybill() { return $this->waybill; } /** * @param WayBill $waybill */ public function setWaybill($waybill) { $this->waybill = $waybill; } /** * @return mixed */ public function getNumber() { return $this->number; } /** * @param mixed $number */ public function setNumber($number) { $this->number = $number; } /** * @return mixed */ public function getisInDelivery() { return $this->isInDelivery; } /** * @param mixed $isInDelivery */ public function setIsInDelivery($isInDelivery) { $this->isInDelivery = $isInDelivery; } /** * @return mixed */ public function getCreatedAt() { return $this->createdAt; } /** * @param mixed $createdAt */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; }}