<?php
namespace Aviatur\GeneralBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Card.
*
* @ORM\Table(name="promotional_code_order_product")
* @ORM\Entity(repositoryClass="Aviatur\GeneralBundle\Entity\PromotionalCodeOrderRepository")
*/
class PromotionalCodeOrderProduct
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=255)
*/
private $code;
/**
*
* @ORM\ManyToOne(targetEntity="OrderProduct", inversedBy="promotionalCodeOrderProduct")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="order_product_id", referencedColumnName="id")
* })
*/
private ?\Aviatur\GeneralBundle\Entity\OrderProduct $orderProduct = null;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set code.
*
* @param string $code
*
* @return PromotionalCodeOrderProduct
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code.
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set orderProduct.
*
* @param \Aviatur\GeneralBundle\Entity\Order $order
*
* @return PromotionalCodeOrderProduct
*/
public function setOrderProduct(\Aviatur\GeneralBundle\Entity\OrderProduct $order = null)
{
$this->orderProduct = $order;
return $this;
}
/**
* Get orderProduct.
*
* @return \Aviatur\GeneralBundle\Entity\Order
*/
public function getOrderProduct()
{
return $this->orderProduct;
}
}