src/Entity/ECommerce/PreOrder.php line 99

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ECommerce;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * PreOrder
  6. *
  7. * @ORM\Table(name="pre_order")
  8. * @ORM\Entity(repositoryClass="App\Repository\ECommerce\PreOrderRepository")
  9. * @ORM\Cache(usage="READ_ONLY", region="private")
  10. */
  11. class PreOrder
  12. {
  13. const QUALITY_AVERAGE = 0;
  14. const QUALITY_GOOD = 1;
  15. /**
  16. * @var int
  17. *
  18. * @ORM\Column(name="id", type="integer")
  19. * @ORM\Id
  20. * @ORM\GeneratedValue(strategy="AUTO")
  21. */
  22. private $id;
  23. /**
  24. * @var int
  25. *
  26. * @ORM\Column(name="quantity", type="integer")
  27. */
  28. private $quantity;
  29. /**
  30. * @var float
  31. *
  32. * @ORM\Column(name="price", type="float", nullable=true)
  33. */
  34. private $price;
  35. /**
  36. * @var string
  37. *
  38. * @ORM\Column(name="currency", type="string", length=3)
  39. */
  40. private $currency;
  41. /**
  42. * @var string
  43. *
  44. * @ORM\Column(name="title", type="string", length=200, nullable=true)
  45. */
  46. private $title;
  47. /**
  48. * @var string
  49. *
  50. * @ORM\Column(name="size", type="string", length=40, nullable=true)
  51. */
  52. private $size;
  53. /**
  54. * @var string
  55. *
  56. * @ORM\Column(name="description", type="string", length=200, nullable=true)
  57. */
  58. private $description;
  59. /**
  60. * @var int
  61. *
  62. * @ORM\Column(name="quality", type="smallint", nullable=true)
  63. */
  64. private $quality = self::QUALITY_AVERAGE;
  65. /**
  66. * @var \DateTime
  67. *
  68. * @ORM\Column(name="due_date", type="date", nullable=true)
  69. */
  70. private $dueDate;
  71. /**
  72. * @var string
  73. *
  74. * @ORM\Column(name="remarks", type="text", nullable=true)
  75. */
  76. private $remarks;
  77. /**
  78. * @var Product
  79. *
  80. * @ORM\ManyToOne(targetEntity="App\Entity\ECommerce\Product")
  81. * @ORM\JoinColumn(name="product", referencedColumnName="id", nullable=true)
  82. */
  83. private $product;
  84. public function __construct(Product $product = null)
  85. {
  86. $this->setProduct($product);
  87. }
  88. /**
  89. * Get id
  90. *
  91. * @return int
  92. */
  93. public function getId()
  94. {
  95. return $this->id;
  96. }
  97. /**
  98. * Set quantity
  99. *
  100. * @param integer $quantity
  101. */
  102. public function setQuantity($quantity): static
  103. {
  104. $this->quantity = $quantity;
  105. return $this;
  106. }
  107. /**
  108. * Get quantity
  109. *
  110. * @return int
  111. */
  112. public function getQuantity()
  113. {
  114. return $this->quantity;
  115. }
  116. /**
  117. * Set price
  118. *
  119. * @param float $price
  120. */
  121. public function setPrice($price): static
  122. {
  123. $this->price = $price;
  124. return $this;
  125. }
  126. /**
  127. * Get float
  128. *
  129. * @return string
  130. */
  131. public function getPrice()
  132. {
  133. return $this->price;
  134. }
  135. /**
  136. * Set currency
  137. *
  138. * @param string $currency
  139. */
  140. public function setCurrency($currency): static
  141. {
  142. $this->currency = $currency;
  143. return $this;
  144. }
  145. /**
  146. * Get currency
  147. *
  148. * @return string
  149. */
  150. public function getCurrency()
  151. {
  152. return $this->currency;
  153. }
  154. /**
  155. * Set title
  156. *
  157. * @param string $title
  158. */
  159. public function setTitle($title): static
  160. {
  161. $this->title = $title;
  162. return $this;
  163. }
  164. /**
  165. * Get title
  166. *
  167. * @return string
  168. */
  169. public function getTitle()
  170. {
  171. return $this->title;
  172. }
  173. /**
  174. * Set size
  175. *
  176. * @param string $size
  177. */
  178. public function setSize($size): static
  179. {
  180. $this->size = $size;
  181. return $this;
  182. }
  183. /**
  184. * Get size
  185. *
  186. * @return string
  187. */
  188. public function getSize()
  189. {
  190. return $this->size;
  191. }
  192. /**
  193. * Set description
  194. *
  195. * @param string $description
  196. */
  197. public function setDescription($description): static
  198. {
  199. $this->description = $description;
  200. return $this;
  201. }
  202. /**
  203. * Get description
  204. *
  205. * @return string
  206. */
  207. public function getDescription()
  208. {
  209. return $this->description;
  210. }
  211. /**
  212. * Set quality
  213. *
  214. * @param integer $quality
  215. */
  216. public function setQuality($quality): static
  217. {
  218. $this->quality = $quality;
  219. return $this;
  220. }
  221. /**
  222. * Get quality
  223. *
  224. * @return integer
  225. */
  226. public function getQuality()
  227. {
  228. return $this->quality;
  229. }
  230. /**
  231. * Set dueDate
  232. *
  233. * @param \DateTime $dueDate
  234. */
  235. public function setDueDate($dueDate): static
  236. {
  237. $this->dueDate = $dueDate;
  238. return $this;
  239. }
  240. /**
  241. * Get dueDate
  242. *
  243. * @return \DateTime
  244. */
  245. public function getDueDate()
  246. {
  247. return $this->dueDate;
  248. }
  249. /**
  250. * Set remarks
  251. *
  252. * @param string $remarks
  253. */
  254. public function setRemarks($remarks): static
  255. {
  256. $this->remarks = $remarks;
  257. return $this;
  258. }
  259. /**
  260. * Get remarks
  261. *
  262. * @return string
  263. */
  264. public function getRemarks()
  265. {
  266. return $this->remarks;
  267. }
  268. /**
  269. * Set product
  270. *
  271. *
  272. */
  273. public function setProduct(Product $product = null): static
  274. {
  275. $this->product = $product;
  276. return $this;
  277. }
  278. /**
  279. * Get product
  280. *
  281. * @return Product
  282. */
  283. public function getProduct()
  284. {
  285. return $this->product;
  286. }
  287. }