src/Entity/System/Lock.php line 23

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