<?php
/**
* Created by PhpStorm.
* User: parcel
* Date: 12/29/18
* Time: 10:02 AM
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\Ignore;
/**
* @ORM\Entity(repositoryClass="App\Repository\DeliveryParcelRepository")
* @ORM\Table(name="delivery_parcel")
*/
class DeliveryParcel {
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @Ignore
* @var \App\Entity\Delivery
* @Serializer\Type("App\Entity\Delivery")
* @ORM\ManyToOne(targetEntity="App\Entity\Delivery", inversedBy="parcels")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="delivery_id", referencedColumnName="id")
* })
*/
private $delivery;
/**
* @Ignore
* @var \App\Entity\Parcel
* @Serializer\Type("App\Entity\Parcel")
* @ORM\ManyToOne(targetEntity="App\Entity\Parcel")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="parcel_id", referencedColumnName="id")
* })
*/
private $parcel;
/**
* @ORM\Column(type="boolean")
*/
private $isCancelled;
/**
* @var \App\Entity\User
* @Serializer\Type("App\Entity\User")
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="cancelled_by", referencedColumnName="id", nullable=true)
* })
*/
private $cancelledBy;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $cancelledAt;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $cancelledBecause;
/**
* @ORM\Column(type="boolean")
*/
private $isReceived;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $receivedAt;
/**
* @var \App\Entity\User
* @Serializer\Type("App\Entity\User")
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="received_by", referencedColumnName="id", nullable=true)
* })
*/
private $receivedBy;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
*
* @var \App\Entity\User
* @Serializer\Type("App\Entity\User")
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="created_by", referencedColumnName="id")
* })
*/
private $createdBy;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return Delivery
*/
public function getDelivery()
{
return $this->delivery;
}
/**
* @param Delivery $delivery
*/
public function setDelivery($delivery)
{
$this->delivery = $delivery;
}
/**
* @return Parcel
*/
public function getParcel()
{
return $this->parcel;
}
/**
* @param Parcel $parcel
*/
public function setParcel($parcel)
{
$this->parcel = $parcel;
}
/**
* @return mixed
*/
public function getisCancelled()
{
return $this->isCancelled;
}
/**
* @param mixed $isCancelled
*/
public function setIsCancelled($isCancelled)
{
$this->isCancelled = $isCancelled;
}
/**
* @return User
*/
public function getCancelledBy()
{
return $this->cancelledBy;
}
/**
* @param User $cancelledBy
*/
public function setCancelledBy($cancelledBy)
{
$this->cancelledBy = $cancelledBy;
}
/**
* @return mixed
*/
public function getCancelledAt()
{
return $this->cancelledAt;
}
/**
* @param mixed $cancelledAt
*/
public function setCancelledAt($cancelledAt)
{
$this->cancelledAt = $cancelledAt;
}
/**
* @return mixed
*/
public function getCancelledBecause()
{
return $this->cancelledBecause;
}
/**
* @param mixed $cancelledBecause
*/
public function setCancelledBecause($cancelledBecause)
{
$this->cancelledBecause = $cancelledBecause;
}
/**
* @return mixed
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param mixed $createdAt
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
}
/**
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* @param User $createdBy
*/
public function setCreatedBy($createdBy)
{
$this->createdBy = $createdBy;
}
/**
* @return mixed
*/
public function getisReceived()
{
return $this->isReceived;
}
/**
* @param mixed $isReceived
*/
public function setIsReceived($isReceived)
{
$this->isReceived = $isReceived;
}
/**
* @return mixed
*/
public function getReceivedAt()
{
return $this->receivedAt;
}
/**
* @param mixed $receivedAt
*/
public function setReceivedAt($receivedAt)
{
$this->receivedAt = $receivedAt;
}
/**
* @return User
*/
public function getReceivedBy()
{
return $this->receivedBy;
}
/**
* @param User $receivedBy
*/
public function setReceivedBy($receivedBy)
{
$this->receivedBy = $receivedBy;
}
}