src/Entity/OrderItems.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OrderItemsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: OrderItemsRepository::class)]
  6. class OrderItems
  7. {
  8. #[ORM\Id]
  9. #[ORM\GeneratedValue]
  10. #[ORM\Column(type: 'integer')]
  11. private $id;
  12. #[ORM\ManyToOne(targetEntity: Orders::class, inversedBy: 'orderItems')]
  13. private $orders;
  14. #[ORM\Column(type: 'string', length: 255)]
  15. private $name;
  16. #[ORM\ManyToOne(targetEntity: Products::class, inversedBy: 'orderItems')]
  17. private $product;
  18. #[ORM\ManyToOne(targetEntity: Distributors::class, inversedBy: 'orderItems')]
  19. private $distributor;
  20. #[ORM\Column(type: 'integer')]
  21. private $quantity;
  22. #[ORM\Column(type: 'float')]
  23. private $unitPrice;
  24. #[ORM\Column(type: 'float')]
  25. private $total;
  26. #[ORM\Column(type: 'datetime')]
  27. private $modified;
  28. #[ORM\Column(type: 'datetime')]
  29. private $created;
  30. #[ORM\Column(type: 'string', length: 255)]
  31. private $poNumber;
  32. #[ORM\Column(type: 'text', nullable: true)]
  33. private $comments;
  34. #[ORM\Column(type: 'date', nullable: true)]
  35. private $expiryDate;
  36. #[ORM\Column(type: 'integer')]
  37. private $isAccepted;
  38. #[ORM\Column(type: 'integer')]
  39. private $isRenegotiate;
  40. #[ORM\Column(type: 'integer')]
  41. private $isCancelled;
  42. #[ORM\Column(type: 'integer', nullable: true)]
  43. private $isConfirmedDistributor;
  44. #[ORM\Column(type: 'string', length: 255)]
  45. private $status;
  46. #[ORM\Column(type: 'integer', nullable: true)]
  47. private $quantityDelivered;
  48. #[ORM\Column(type: 'integer')]
  49. private $isQuantityCorrect;
  50. #[ORM\Column(type: 'integer')]
  51. private $isQuantityIncorrect;
  52. #[ORM\Column(type: 'integer')]
  53. private $isAcceptedOnDelivery;
  54. #[ORM\Column(type: 'integer')]
  55. private $isRejectedOnDelivery;
  56. #[ORM\Column(type: 'integer')]
  57. private $isQuantityAdjust;
  58. #[ORM\Column(type: 'text', nullable: true)]
  59. private $rejectReason;
  60. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  61. private $orderReceivedBy;
  62. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  63. private $orderPlacedBy;
  64. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  65. private $itemId;
  66. #[ORM\Column(type: 'float', nullable: true)]
  67. private $distributor_total;
  68. public function __construct()
  69. {
  70. $date = new \DateTime("now", new \DateTimeZone('Asia/Dubai'));
  71. $this->setModified($date);
  72. if ($this->getCreated() == null)
  73. {
  74. $this->setCreated($date);
  75. }
  76. }
  77. public function getId(): ?int
  78. {
  79. return $this->id;
  80. }
  81. public function getOrders(): ?Orders
  82. {
  83. return $this->orders;
  84. }
  85. public function setOrders(?Orders $orders): self
  86. {
  87. $this->orders = $orders;
  88. return $this;
  89. }
  90. public function getName(): ?string
  91. {
  92. return $this->name;
  93. }
  94. public function setName(string $name): self
  95. {
  96. $this->name = $name;
  97. return $this;
  98. }
  99. public function getProduct(): ?Products
  100. {
  101. return $this->product;
  102. }
  103. public function setProduct(?Products $product): self
  104. {
  105. $this->product = $product;
  106. return $this;
  107. }
  108. public function getDistributor(): ?Distributors
  109. {
  110. return $this->distributor;
  111. }
  112. public function setDistributor(?Distributors $distributor): self
  113. {
  114. $this->distributor = $distributor;
  115. return $this;
  116. }
  117. public function getQuantity(): ?int
  118. {
  119. return $this->quantity;
  120. }
  121. public function setQuantity(int $quantity): self
  122. {
  123. $this->quantity = $quantity;
  124. return $this;
  125. }
  126. public function getUnitPrice(): ?float
  127. {
  128. return $this->unitPrice;
  129. }
  130. public function setUnitPrice(float $unitPrice): self
  131. {
  132. $this->unitPrice = $unitPrice;
  133. return $this;
  134. }
  135. public function getTotal(): ?float
  136. {
  137. return $this->total;
  138. }
  139. public function setTotal(float $total): self
  140. {
  141. $this->total = $total;
  142. return $this;
  143. }
  144. public function getModified(): ?\DateTimeInterface
  145. {
  146. return $this->modified;
  147. }
  148. public function setModified(\DateTimeInterface $modified): self
  149. {
  150. $this->modified = $modified;
  151. return $this;
  152. }
  153. public function getCreated(): ?\DateTimeInterface
  154. {
  155. return $this->created;
  156. }
  157. public function setCreated(\DateTimeInterface $created): self
  158. {
  159. $this->created = $created;
  160. return $this;
  161. }
  162. public function getPoNumber(): ?string
  163. {
  164. return $this->poNumber;
  165. }
  166. public function setPoNumber(string $poNumber): self
  167. {
  168. $this->poNumber = $poNumber;
  169. return $this;
  170. }
  171. public function getComments(): ?string
  172. {
  173. return $this->comments;
  174. }
  175. public function setComments(?string $comments): self
  176. {
  177. $this->comments = $comments;
  178. return $this;
  179. }
  180. public function getExpiryDate(): ?\DateTimeInterface
  181. {
  182. return $this->expiryDate;
  183. }
  184. public function setExpiryDate(?\DateTimeInterface $expiryDate): self
  185. {
  186. $this->expiryDate = $expiryDate;
  187. return $this;
  188. }
  189. public function getIsAccepted(): ?int
  190. {
  191. return $this->isAccepted;
  192. }
  193. public function setIsAccepted(int $isAccepted): self
  194. {
  195. $this->isAccepted = $isAccepted;
  196. return $this;
  197. }
  198. public function getIsRenegotiate(): ?int
  199. {
  200. return $this->isRenegotiate;
  201. }
  202. public function setIsRenegotiate(int $isRenegotiate): self
  203. {
  204. $this->isRenegotiate = $isRenegotiate;
  205. return $this;
  206. }
  207. public function getIsCancelled(): ?int
  208. {
  209. return $this->isCancelled;
  210. }
  211. public function setIsCancelled(int $isCancelled): self
  212. {
  213. $this->isCancelled = $isCancelled;
  214. return $this;
  215. }
  216. public function getIsConfirmedDistributor(): ?int
  217. {
  218. return $this->isConfirmedDistributor;
  219. }
  220. public function setIsConfirmedDistributor(?int $isConfirmedDistributor): self
  221. {
  222. $this->isConfirmedDistributor = $isConfirmedDistributor;
  223. return $this;
  224. }
  225. public function getStatus(): ?string
  226. {
  227. return $this->status;
  228. }
  229. public function setStatus(string $status): self
  230. {
  231. $this->status = $status;
  232. return $this;
  233. }
  234. public function getQuantityDelivered(): ?int
  235. {
  236. return $this->quantityDelivered;
  237. }
  238. public function setQuantityDelivered(?int $quantityDelivered): self
  239. {
  240. $this->quantityDelivered = $quantityDelivered;
  241. return $this;
  242. }
  243. public function getIsQuantityCorrect(): ?int
  244. {
  245. return $this->isQuantityCorrect;
  246. }
  247. public function setIsQuantityCorrect(int $isQuantityCorrect): self
  248. {
  249. $this->isQuantityCorrect = $isQuantityCorrect;
  250. return $this;
  251. }
  252. public function getIsQuantityIncorrect(): ?int
  253. {
  254. return $this->isQuantityIncorrect;
  255. }
  256. public function setIsQuantityIncorrect(int $isQuantityIncorrect): self
  257. {
  258. $this->isQuantityIncorrect = $isQuantityIncorrect;
  259. return $this;
  260. }
  261. public function getIsAcceptedOnDelivery(): ?int
  262. {
  263. return $this->isAcceptedOnDelivery;
  264. }
  265. public function setIsAcceptedOnDelivery(int $isAcceptedOnDelivery): self
  266. {
  267. $this->isAcceptedOnDelivery = $isAcceptedOnDelivery;
  268. return $this;
  269. }
  270. public function getIsRejectedOnDelivery(): ?int
  271. {
  272. return $this->isRejectedOnDelivery;
  273. }
  274. public function setIsRejectedOnDelivery(int $isRejectedOnDelivery): self
  275. {
  276. $this->isRejectedOnDelivery = $isRejectedOnDelivery;
  277. return $this;
  278. }
  279. public function getIsQuantityAdjust(): ?int
  280. {
  281. return $this->isQuantityAdjust;
  282. }
  283. public function setIsQuantityAdjust(int $isQuantityAdjust): self
  284. {
  285. $this->isQuantityAdjust = $isQuantityAdjust;
  286. return $this;
  287. }
  288. public function getRejectReason(): ?string
  289. {
  290. return $this->rejectReason;
  291. }
  292. public function setRejectReason(?string $rejectReason): self
  293. {
  294. $this->rejectReason = $rejectReason;
  295. return $this;
  296. }
  297. public function getOrderReceivedBy(): ?string
  298. {
  299. return $this->orderReceivedBy;
  300. }
  301. public function setOrderReceivedBy(?string $orderReceivedBy): self
  302. {
  303. $this->orderReceivedBy = $orderReceivedBy;
  304. return $this;
  305. }
  306. public function getOrderPlacedBy(): ?string
  307. {
  308. return $this->orderPlacedBy;
  309. }
  310. public function setOrderPlacedBy(?string $orderPlacedBy): self
  311. {
  312. $this->orderPlacedBy = $orderPlacedBy;
  313. return $this;
  314. }
  315. public function getItemId(): ?string
  316. {
  317. return $this->itemId;
  318. }
  319. public function setItemId(?string $itemId): static
  320. {
  321. $this->itemId = $itemId;
  322. return $this;
  323. }
  324. public function getDistributorTotal(): ?float
  325. {
  326. return $this->distributor_total;
  327. }
  328. public function setDistributorTotal(?float $distributor_total): self
  329. {
  330. $this->distributor_total = $distributor_total;
  331. return $this;
  332. }
  333. }