<?php
namespace App\Entity\ECommerce;
use Doctrine\ORM\Mapping as ORM;
/**
* PreOrder
*
* @ORM\Table(name="pre_order")
* @ORM\Entity(repositoryClass="App\Repository\ECommerce\PreOrderRepository")
* @ORM\Cache(usage="READ_ONLY", region="private")
*/
class PreOrder
{
const QUALITY_AVERAGE = 0;
const QUALITY_GOOD = 1;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="quantity", type="integer")
*/
private $quantity;
/**
* @var float
*
* @ORM\Column(name="price", type="float", nullable=true)
*/
private $price;
/**
* @var string
*
* @ORM\Column(name="currency", type="string", length=3)
*/
private $currency;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=200, nullable=true)
*/
private $title;
/**
* @var string
*
* @ORM\Column(name="size", type="string", length=40, nullable=true)
*/
private $size;
/**
* @var string
*
* @ORM\Column(name="description", type="string", length=200, nullable=true)
*/
private $description;
/**
* @var int
*
* @ORM\Column(name="quality", type="smallint", nullable=true)
*/
private $quality = self::QUALITY_AVERAGE;
/**
* @var \DateTime
*
* @ORM\Column(name="due_date", type="date", nullable=true)
*/
private $dueDate;
/**
* @var string
*
* @ORM\Column(name="remarks", type="text", nullable=true)
*/
private $remarks;
/**
* @var Product
*
* @ORM\ManyToOne(targetEntity="App\Entity\ECommerce\Product")
* @ORM\JoinColumn(name="product", referencedColumnName="id", nullable=true)
*/
private $product;
public function __construct(Product $product = null)
{
$this->setProduct($product);
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set quantity
*
* @param integer $quantity
*/
public function setQuantity($quantity): static
{
$this->quantity = $quantity;
return $this;
}
/**
* Get quantity
*
* @return int
*/
public function getQuantity()
{
return $this->quantity;
}
/**
* Set price
*
* @param float $price
*/
public function setPrice($price): static
{
$this->price = $price;
return $this;
}
/**
* Get float
*
* @return string
*/
public function getPrice()
{
return $this->price;
}
/**
* Set currency
*
* @param string $currency
*/
public function setCurrency($currency): static
{
$this->currency = $currency;
return $this;
}
/**
* Get currency
*
* @return string
*/
public function getCurrency()
{
return $this->currency;
}
/**
* Set title
*
* @param string $title
*/
public function setTitle($title): static
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set size
*
* @param string $size
*/
public function setSize($size): static
{
$this->size = $size;
return $this;
}
/**
* Get size
*
* @return string
*/
public function getSize()
{
return $this->size;
}
/**
* Set description
*
* @param string $description
*/
public function setDescription($description): static
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set quality
*
* @param integer $quality
*/
public function setQuality($quality): static
{
$this->quality = $quality;
return $this;
}
/**
* Get quality
*
* @return integer
*/
public function getQuality()
{
return $this->quality;
}
/**
* Set dueDate
*
* @param \DateTime $dueDate
*/
public function setDueDate($dueDate): static
{
$this->dueDate = $dueDate;
return $this;
}
/**
* Get dueDate
*
* @return \DateTime
*/
public function getDueDate()
{
return $this->dueDate;
}
/**
* Set remarks
*
* @param string $remarks
*/
public function setRemarks($remarks): static
{
$this->remarks = $remarks;
return $this;
}
/**
* Get remarks
*
* @return string
*/
public function getRemarks()
{
return $this->remarks;
}
/**
* Set product
*
*
*/
public function setProduct(Product $product = null): static
{
$this->product = $product;
return $this;
}
/**
* Get product
*
* @return Product
*/
public function getProduct()
{
return $this->product;
}
}