src/Entity/System/Lock.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Table(name="ps_locks", indexes={
  6. *
  7. * @ORM\Index(name="reference", columns={"reference"}),
  8. * @ORM\Index(name="date_validate", columns={"date_validate"}),
  9. * @ORM\Index(name="ps_locks_stock_lock_reference_index", columns={"stock_lock_reference"}),
  10. * @ORM\Index(name="date_caducity", columns={"date_caducity"}),
  11. * @ORM\Index(name="date_add", columns={"date_add"}),
  12. * })
  13. *
  14. * @ORM\Entity(repositoryClass="App\Repository\System\LockRepository")
  15. */
  16. class Lock
  17. {
  18. /**
  19. * @ORM\Id()
  20. *
  21. * @ORM\GeneratedValue()
  22. *
  23. * @ORM\Column(name="id_lock", type="integer")
  24. */
  25. private int $id;
  26. /**
  27. * @ORM\ManyToOne(targetEntity="Customer")
  28. *
  29. * @ORM\JoinColumn(name="id_customer", referencedColumnName="id_customer", nullable=false)
  30. */
  31. private Customer $customer;
  32. /**
  33. * @ORM\ManyToOne(targetEntity="Product")
  34. *
  35. * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product", nullable=false)
  36. */
  37. private Product $product;
  38. /**
  39. * @ORM\ManyToOne(targetEntity="ProductAttribute")
  40. *
  41. * @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute", nullable=true)
  42. */
  43. private ?ProductAttribute $productAttribute;
  44. /**
  45. * @ORM\Column(type="integer", length=11, options={"default" : 0})
  46. */
  47. private int $quantity;
  48. /**
  49. * @ORM\Column(type="float", options={"default" : 0.000000})
  50. */
  51. private float $price;
  52. /**
  53. * @ORM\Column(type="datetime")
  54. */
  55. private \DateTime $dateAdd;
  56. /**
  57. * @ORM\Column(type="datetime", nullable=true)
  58. */
  59. private ?\DateTime $dateValidate;
  60. /**
  61. * @ORM\Column(type="datetime", nullable=true)
  62. */
  63. private ?\DateTime $dateCaducity;
  64. /**
  65. * @ORM\Column(type="string", length=32, nullable=true)
  66. */
  67. private ?string $reference;
  68. /**
  69. * @ORM\ManyToOne(targetEntity="LockStatus")
  70. *
  71. * @ORM\JoinColumn(name="id_state", referencedColumnName="id", nullable=false)
  72. */
  73. private LockStatus $status;
  74. /**
  75. * @ORM\Column(type="string", length=64, nullable=true)
  76. */
  77. private ?string $stockLockReference;
  78. public function getId(): int
  79. {
  80. return $this->id;
  81. }
  82. public function setId(int $id): Lock
  83. {
  84. $this->id = $id;
  85. return $this;
  86. }
  87. public function getCustomer(): Customer
  88. {
  89. return $this->customer;
  90. }
  91. public function setCustomer(Customer $customer): Lock
  92. {
  93. $this->customer = $customer;
  94. return $this;
  95. }
  96. public function getProduct(): Product
  97. {
  98. return $this->product;
  99. }
  100. public function setProduct(Product $product): Lock
  101. {
  102. $this->product = $product;
  103. return $this;
  104. }
  105. public function getProductAttribute(): ?ProductAttribute
  106. {
  107. return $this->productAttribute;
  108. }
  109. public function setProductAttribute(?ProductAttribute $productAttribute = null): Lock
  110. {
  111. $this->productAttribute = $productAttribute;
  112. return $this;
  113. }
  114. public function getQuantity(): int
  115. {
  116. return $this->quantity;
  117. }
  118. public function setQuantity(int $quantity): Lock
  119. {
  120. $this->quantity = $quantity;
  121. return $this;
  122. }
  123. public function getPrice(): float
  124. {
  125. return $this->price;
  126. }
  127. public function setPrice(float $price): Lock
  128. {
  129. $this->price = $price;
  130. return $this;
  131. }
  132. public function getDateAdd(): \DateTime
  133. {
  134. return $this->dateAdd;
  135. }
  136. public function setDateAdd(\DateTime $dateAdd): Lock
  137. {
  138. $this->dateAdd = $dateAdd;
  139. return $this;
  140. }
  141. public function getDateValidate(): ?\DateTime
  142. {
  143. return $this->dateValidate;
  144. }
  145. public function setDateValidate(?\DateTime $dateValidate): Lock
  146. {
  147. $this->dateValidate = $dateValidate;
  148. return $this;
  149. }
  150. public function getDateCaducity(): ?\DateTime
  151. {
  152. return $this->dateCaducity;
  153. }
  154. public function setDateCaducity(?\DateTime $dateCaducity): Lock
  155. {
  156. $this->dateCaducity = $dateCaducity;
  157. return $this;
  158. }
  159. public function getReference(): ?string
  160. {
  161. return $this->reference;
  162. }
  163. public function setReference(?string $reference): Lock
  164. {
  165. $this->reference = $reference;
  166. return $this;
  167. }
  168. /**
  169. * @deprecated
  170. */
  171. public function getStateId(): int
  172. {
  173. return $this->status->getId();
  174. }
  175. public function getStatus(): LockStatus
  176. {
  177. return $this->status;
  178. }
  179. public function setStatus(LockStatus $status): Lock
  180. {
  181. $this->status = $status;
  182. return $this;
  183. }
  184. public function getStockLockReference(): ?string
  185. {
  186. return $this->stockLockReference;
  187. }
  188. public function setStockLockReference(?string $stockLockReference): Lock
  189. {
  190. $this->stockLockReference = $stockLockReference;
  191. return $this;
  192. }
  193. }