<?php
/**
* Created by PhpStorm.
* User: parcel
* Date: 12/29/18
* Time: 9:43 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\DeliveryRepository")
* @ORM\Table(name="delivery")
*/
class Delivery {
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $parcelCount;
/**
* @Ignore
* @Serializer\Type("ArrayCollection<App\Entity\DeliveryParcel>")
* @ORM\OneToMany(targetEntity="App\Entity\DeliveryParcel", mappedBy="delivery")
*/
private $parcels;
/**
* @var \App\Entity\Station
* @Serializer\Type("App\Entity\Station")
* @ORM\ManyToOne(targetEntity="App\Entity\Station")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="origin_station", referencedColumnName="id")
* })
*/
private $originStation;
/**
* @var \App\Entity\Station
* @Serializer\Type("App\Entity\Station")
* @ORM\ManyToOne(targetEntity="App\Entity\Station")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="destination", referencedColumnName="id")
* })
*/
private $destination;
/**
* @ORM\Column(type="boolean")
*/
private $isCancelled;
/**
* @Ignore
* @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="boolean")
*/
private $isLoaded;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $loadedAt;
/**
* @Ignore
* @var \App\Entity\User
* @Serializer\Type("App\Entity\User")
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="loaded_by", referencedColumnName="id", nullable=true)
* })
*/
private $loadedBy;
/**
* @ORM\Column(type="boolean")
*/
private $isReceived;
/**
* @ORM\Column(type="boolean")
*/
private $isReceivedFully;
/**
* @ORM\Column(type="integer")
*/
private $receivedParcels;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $receivedAt;
/**
* @Ignore
* @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;
/**
* @Ignore
* @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;
/**
* @Ignore
* @Serializer\Type("App\Entity\DeliveryVehicle")
* @ORM\OneToOne(targetEntity="App\Entity\DeliveryVehicle", mappedBy="delivery")
*/
private $deliveryVehicle;
/**
* @ORM\Column(type="boolean")
*/
private $isVerified;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return mixed
*/
public function getParcelCount()
{
return $this->parcelCount;
}
/**
* @param mixed $parcelCount
*/
public function setParcelCount($parcelCount)
{
$this->parcelCount = $parcelCount;
}
/**
* @return Station
*/
public function getDestination()
{
return $this->destination;
}
/**
* @param Station $destination
*/
public function setDestination($destination)
{
$this->destination = $destination;
}
/**
* @return mixed
*/
public function getParcels()
{
return $this->parcels;
}
/**
* @param mixed $parcels
*/
public function setParcels($parcels)
{
$this->parcels = $parcels;
}
/**
* @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 getisLoaded()
{
return $this->isLoaded;
}
/**
* @param mixed $isLoaded
*/
public function setIsLoaded($isLoaded)
{
$this->isLoaded = $isLoaded;
}
/**
* @return mixed
*/
public function getLoadedAt()
{
return $this->loadedAt;
}
/**
* @param mixed $loadedAt
*/
public function setLoadedAt($loadedAt)
{
$this->loadedAt = $loadedAt;
}
/**
* @return User
*/
public function getLoadedBy()
{
return $this->loadedBy;
}
/**
* @param User $loadedBy
*/
public function setLoadedBy($loadedBy)
{
$this->loadedBy = $loadedBy;
}
/**
* @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;
}
/**
* @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 Station
*/
public function getOriginStation()
{
return $this->originStation;
}
/**
* @param Station $originStation
*/
public function setOriginStation($originStation)
{
$this->originStation = $originStation;
}
/**
* @return mixed
*/
public function getDeliveryVehicle()
{
return $this->deliveryVehicle;
}
/**
* @param mixed $deliveryVehicle
*/
public function setDeliveryVehicle($deliveryVehicle)
{
$this->deliveryVehicle = $deliveryVehicle;
}
/**
* @return mixed
*/
public function getisVerified()
{
return $this->isVerified;
}
/**
* @param mixed $isVerified
*/
public function setIsVerified($isVerified)
{
$this->isVerified = $isVerified;
}
/**
* @return mixed
*/
public function getisReceivedFully()
{
return $this->isReceivedFully;
}
/**
* @param mixed $isReceivedFully
*/
public function setIsReceivedFully($isReceivedFully)
{
$this->isReceivedFully = $isReceivedFully;
}
/**
* @return mixed
*/
public function getReceivedParcels()
{
return $this->receivedParcels;
}
/**
* @param mixed $receivedParcels
*/
public function setReceivedParcels($receivedParcels)
{
$this->receivedParcels = $receivedParcels;
}
}