src/Entity/System/Lock.php line 12

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")
  6.  *
  7.  * @ORM\Entity(repositoryClass="App\Repository\System\LockRepository")
  8.  */
  9. class Lock
  10. {
  11.     public const STATUS_NO_TRANSFER 0;
  12.     public const STATUS_AWAITING 1;
  13.     public const STATUS_IN_PROCESS 2;
  14.     public const STATUS_CANCELLED 3;
  15.     public const STATUS_EXPIRED 4;
  16.     public const STATUS_REJECTED 5;
  17.     public const STATUS_FINISHED 6;
  18.     public const START_REGISTER 0;
  19.     public const MANY_REGISTER 1;
  20.     public const STATUSES = [
  21.         self::STATUS_NO_TRANSFER => 'PENDING',
  22.         self::STATUS_AWAITING => 'PENDING',
  23.         self::STATUS_IN_PROCESS => 'IN_PROCESS',
  24.         self::STATUS_CANCELLED => 'CANCELED',
  25.         self::STATUS_EXPIRED => 'EXPIRED',
  26.         self::STATUS_REJECTED => 'REJECTED',
  27.         self::STATUS_FINISHED => 'FINISHED',
  28.     ];
  29.     /**
  30.      * @ORM\Id()
  31.      *
  32.      * @ORM\GeneratedValue()
  33.      *
  34.      * @ORM\Column(name="id_lock", type="integer")
  35.      */
  36.     private $id;
  37.     /**
  38.      * @var int
  39.      *
  40.      * @ORM\Column(type="integer", length=11, name="id_customer")
  41.      */
  42.     private $customerId;
  43.     /**
  44.      * @var int
  45.      *
  46.      * @ORM\Column(type="integer", length=11, name="id_product")
  47.      */
  48.     private $productId;
  49.     /**
  50.      * @var int
  51.      *
  52.      * @ORM\Column(type="integer", length=11, name="id_product_attribute")
  53.      */
  54.     private $productAttributeId;
  55.     /**
  56.      * @var int
  57.      *
  58.      * @ORM\Column(type="integer", length=11)
  59.      */
  60.     private $quantity;
  61.     /**
  62.      * @var float
  63.      *
  64.      * @ORM\Column(type="decimal", precision=20, scale=6, options={"default" : 0.000000})
  65.      */
  66.     private $price;
  67.     /**
  68.      * @var \DateTime
  69.      *
  70.      * @ORM\Column(type="datetime")
  71.      */
  72.     private $dateAdd;
  73.     /**
  74.      * @var \DateTime|null
  75.      *
  76.      * @ORM\Column(type="datetime", nullable=true)
  77.      */
  78.     private $dateValidate;
  79.     /**
  80.      * @var \DateTime|null
  81.      *
  82.      * @ORM\Column(type="datetime", nullable=true)
  83.      */
  84.     private $dateCaducity;
  85.     /**
  86.      * @var string|null
  87.      *
  88.      * @ORM\Column(type="string", length=32, nullable=true)
  89.      */
  90.     private $reference;
  91.     /**
  92.      * @var string|null
  93.      *
  94.      * @ORM\Column(type="string", length=128, nullable=true)
  95.      */
  96.     private $name;
  97.     /**
  98.      * @var int|null
  99.      *
  100.      * @ORM\Column(name="id_image", type="integer", length=11, nullable=true)
  101.      */
  102.     private $imageId;
  103.     /**
  104.      * @var int
  105.      *
  106.      * @ORM\Column(name="id_state", columnDefinition="tinyint(3)unsigned", options={"unsigned": 0})
  107.      */
  108.     private $stateId;
  109.     /**
  110.      * @var string|null
  111.      *
  112.      * @ORM\Column(type="text", nullable=true)
  113.      */
  114.     private $comments;
  115.     /**
  116.      * @var int
  117.      *
  118.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  119.      */
  120.     private $inCart;
  121.     /**
  122.      * @var string|null
  123.      *
  124.      * @ORM\Column(type="string", length=64, nullable=true)
  125.      */
  126.     private $stockLockReference;
  127.     /**
  128.      * @return mixed
  129.      */
  130.     public function getId()
  131.     {
  132.         return $this->id;
  133.     }
  134.     /**
  135.      * @param mixed $id
  136.      *
  137.      * @return Lock
  138.      */
  139.     public function setId($id): Lock
  140.     {
  141.         $this->id $id;
  142.         return $this;
  143.     }
  144.     /**
  145.      * @return int
  146.      */
  147.     public function getCustomerId(): int
  148.     {
  149.         return $this->customerId;
  150.     }
  151.     /**
  152.      * @param int $customerId
  153.      *
  154.      * @return Lock
  155.      */
  156.     public function setCustomerId(int $customerId): Lock
  157.     {
  158.         $this->customerId $customerId;
  159.         return $this;
  160.     }
  161.     /**
  162.      * @return int
  163.      */
  164.     public function getProductId(): int
  165.     {
  166.         return $this->productId;
  167.     }
  168.     /**
  169.      * @param int $productId
  170.      *
  171.      * @return Lock
  172.      */
  173.     public function setProductId(int $productId): Lock
  174.     {
  175.         $this->productId $productId;
  176.         return $this;
  177.     }
  178.     /**
  179.      * @return int
  180.      */
  181.     public function getProductAttributeId(): int
  182.     {
  183.         return $this->productAttributeId;
  184.     }
  185.     /**
  186.      * @param int $productAttributeId
  187.      *
  188.      * @return Lock
  189.      */
  190.     public function setProductAttributeId(int $productAttributeId): Lock
  191.     {
  192.         $this->productAttributeId $productAttributeId;
  193.         return $this;
  194.     }
  195.     /**
  196.      * @return int
  197.      */
  198.     public function getQuantity(): int
  199.     {
  200.         return $this->quantity;
  201.     }
  202.     /**
  203.      * @param int $quantity
  204.      *
  205.      * @return Lock
  206.      */
  207.     public function setQuantity(int $quantity): Lock
  208.     {
  209.         $this->quantity $quantity;
  210.         return $this;
  211.     }
  212.     /**
  213.      * @return float
  214.      */
  215.     public function getPrice(): float
  216.     {
  217.         return $this->price;
  218.     }
  219.     /**
  220.      * @param float $price
  221.      *
  222.      * @return Lock
  223.      */
  224.     public function setPrice(float $price): Lock
  225.     {
  226.         $this->price $price;
  227.         return $this;
  228.     }
  229.     /**
  230.      * @return \DateTime
  231.      */
  232.     public function getDateAdd(): \DateTime
  233.     {
  234.         return $this->dateAdd;
  235.     }
  236.     /**
  237.      * @param \DateTime $dateAdd
  238.      *
  239.      * @return Lock
  240.      */
  241.     public function setDateAdd(\DateTime $dateAdd): Lock
  242.     {
  243.         $this->dateAdd $dateAdd;
  244.         return $this;
  245.     }
  246.     /**
  247.      * @return \DateTime|null
  248.      */
  249.     public function getDateValidate(): ?\DateTime
  250.     {
  251.         return $this->dateValidate;
  252.     }
  253.     /**
  254.      * @param \DateTime|null $dateValidate
  255.      *
  256.      * @return Lock
  257.      */
  258.     public function setDateValidate(?\DateTime $dateValidate): Lock
  259.     {
  260.         $this->dateValidate $dateValidate;
  261.         return $this;
  262.     }
  263.     /**
  264.      * @return \DateTime|null
  265.      */
  266.     public function getDateCaducity(): ?\DateTime
  267.     {
  268.         return $this->dateCaducity;
  269.     }
  270.     /**
  271.      * @param \DateTime|null $dateCaducity
  272.      *
  273.      * @return Lock
  274.      */
  275.     public function setDateCaducity(?\DateTime $dateCaducity): Lock
  276.     {
  277.         $this->dateCaducity $dateCaducity;
  278.         return $this;
  279.     }
  280.     /**
  281.      * @return string|null
  282.      */
  283.     public function getReference(): ?string
  284.     {
  285.         return $this->reference;
  286.     }
  287.     /**
  288.      * @param string|null $reference
  289.      *
  290.      * @return Lock
  291.      */
  292.     public function setReference(?string $reference): Lock
  293.     {
  294.         $this->reference $reference;
  295.         return $this;
  296.     }
  297.     /**
  298.      * @return string|null
  299.      */
  300.     public function getName(): ?string
  301.     {
  302.         return $this->name;
  303.     }
  304.     /**
  305.      * @param string|null $name
  306.      *
  307.      * @return Lock
  308.      */
  309.     public function setName(?string $name): Lock
  310.     {
  311.         $this->name $name;
  312.         return $this;
  313.     }
  314.     /**
  315.      * @return int|null
  316.      */
  317.     public function getImageId(): ?int
  318.     {
  319.         return $this->imageId;
  320.     }
  321.     /**
  322.      * @param int|null $imageId
  323.      *
  324.      * @return Lock
  325.      */
  326.     public function setImageId(?int $imageId): Lock
  327.     {
  328.         $this->imageId $imageId;
  329.         return $this;
  330.     }
  331.     /**
  332.      * @return int
  333.      */
  334.     public function getStateId(): int
  335.     {
  336.         return $this->stateId;
  337.     }
  338.     /**
  339.      * @param int $stateId
  340.      *
  341.      * @return Lock
  342.      */
  343.     public function setStateId(int $stateId): Lock
  344.     {
  345.         $this->stateId $stateId;
  346.         return $this;
  347.     }
  348.     /**
  349.      * @return string|null
  350.      */
  351.     public function getComments(): ?string
  352.     {
  353.         return $this->comments;
  354.     }
  355.     /**
  356.      * @param string|null $comments
  357.      *
  358.      * @return Lock
  359.      */
  360.     public function setComments(?string $comments): Lock
  361.     {
  362.         $this->comments $comments;
  363.         return $this;
  364.     }
  365.     /**
  366.      * @return int
  367.      */
  368.     public function getInCart(): int
  369.     {
  370.         return $this->inCart;
  371.     }
  372.     /**
  373.      * @param int $inCart
  374.      *
  375.      * @return Lock
  376.      */
  377.     public function setInCart(int $inCart): Lock
  378.     {
  379.         $this->inCart $inCart;
  380.         return $this;
  381.     }
  382.     /**
  383.      * @return string|null
  384.      */
  385.     public function getStockLockReference(): ?string
  386.     {
  387.         return $this->stockLockReference;
  388.     }
  389.     /**
  390.      * @param string|null $stockLockReference
  391.      *
  392.      * @return Lock
  393.      */
  394.     public function setStockLockReference(?string $stockLockReference): Lock
  395.     {
  396.         $this->stockLockReference $stockLockReference;
  397.         return $this;
  398.     }
  399. }