<?php
/**
* Created by PhpStorm.
* User: parcel
* Date: 1/3/19
* Time: 8:30 AM
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\Ignore;
/**
* @ORM\Entity
* @ORM\Table(name="collected_parcel")
*/
class CollectedParcel {
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var WayBill
* @Ignore
* @Serializer\Type("App\Entity\WayBill")
* @ORM\OneToOne(targetEntity="App\Entity\WayBill")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="waybill_id", referencedColumnName="id")
* })
*/
private $waybill;
/**
* @ORM\Column(type="boolean")
*/
private $isConsignee;
/**
* @ORM\Column(type="string")
*/
private $consigneeNationalId;
/**
* @ORM\Column(type="string")
*/
private $collectorName;
/**
* @ORM\Column(type="string")
*/
private $nationalId;
/**
* @Serializer\Type("DateTime<'d/m/Y'>")
* @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 WayBill
*/
public function getWaybill()
{
return $this->waybill;
}
/**
* @param WayBill $waybill
*/
public function setWaybill($waybill)
{
$this->waybill = $waybill;
}
/**
* @return mixed
*/
public function getNationalId()
{
return $this->nationalId;
}
/**
* @param mixed $nationalId
*/
public function setNationalId($nationalId)
{
$this->nationalId = $nationalId;
}
/**
* @return mixed
*/
public function getCollectorName()
{
return $this->collectorName;
}
/**
* @param mixed $collectorName
*/
public function setCollectorName($collectorName)
{
$this->collectorName = $collectorName;
}
/**
* @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 getIsConsignee()
{
return $this->isConsignee;
}
/**
* @param mixed $isConsignee
*/
public function setIsConsignee($isConsignee)
{
$this->isConsignee = $isConsignee;
}
/**
* @return mixed
*/
public function getConsigneeNationalId()
{
return $this->consigneeNationalId;
}
/**
* @param mixed $consigneeNationalId
*/
public function setConsigneeNationalId($consigneeNationalId)
{
$this->consigneeNationalId = $consigneeNationalId;
}
}