<?php
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="ps_locks", indexes={
*
* @ORM\Index(name="reference", columns={"reference"}),
* @ORM\Index(name="date_validate", columns={"date_validate"}),
* @ORM\Index(name="ps_locks_stock_lock_reference_index", columns={"stock_lock_reference"}),
* @ORM\Index(name="id_product", columns={"id_product"}),
* @ORM\Index(name="date_caducity", columns={"date_caducity"}),
* @ORM\Index(name="date_add", columns={"date_add"}),
* @ORM\Index(name="id_customer", columns={"id_customer"}),
* @ORM\Index(name="id_product_attribute", columns={"id_product_attribute"}),
* @ORM\Index(name="id_state", columns={"id_state"})
* })
*
* @ORM\Entity(repositoryClass="App\Repository\System\LockRepository")
*/
class Lock
{
public const STATUS_NO_TRANSFER = 0;
public const STATUS_AWAITING = 1;
public const STATUS_IN_PROCESS = 2;
public const STATUS_CANCELLED = 3;
public const STATUS_EXPIRED = 4;
public const STATUS_REJECTED = 5;
public const STATUS_FINISHED = 6;
/**
* @ORM\Id()
*
* @ORM\GeneratedValue()
*
* @ORM\Column(name="id_lock", type="integer")
*/
private int $id;
/**
* @ORM\Column(type="integer", length=11, name="id_customer")
*/
private int $customerId;
/**
* @ORM\Column(type="integer", length=11, name="id_product")
*/
private int $productId;
/**
* @ORM\Column(type="integer", length=11, name="id_product_attribute", nullable=true)
*/
private ?int $productAttributeId;
/**
* @ORM\Column(type="integer", length=11, options={"default" : 0})
*/
private int $quantity;
/**
* @ORM\Column(type="float", options={"default" : 0.000000})
*/
private float $price;
/**
* @ORM\Column(type="datetime")
*/
private \DateTime $dateAdd;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $dateValidate;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $dateCaducity;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private ?string $reference;
/**
* @ORM\Column(name="id_state", type="integer", options={"default": 0})
*/
private int $stateId;
/**
* @ORM\Column(type="string", length=64, nullable=true)
*/
private ?string $stockLockReference;
public function getId(): int
{
return $this->id;
}
public function setId(int $id): Lock
{
$this->id = $id;
return $this;
}
public function getCustomerId(): int
{
return $this->customerId;
}
public function setCustomerId(int $customerId): Lock
{
$this->customerId = $customerId;
return $this;
}
public function getProductId(): int
{
return $this->productId;
}
public function setProductId(int $productId): Lock
{
$this->productId = $productId;
return $this;
}
public function getProductAttributeId(): ?int
{
return $this->productAttributeId;
}
public function setProductAttributeId(?int $productAttributeId = null): Lock
{
$this->productAttributeId = $productAttributeId;
return $this;
}
public function getQuantity(): int
{
return $this->quantity;
}
public function setQuantity(int $quantity): Lock
{
$this->quantity = $quantity;
return $this;
}
public function getPrice(): float
{
return $this->price;
}
public function setPrice(float $price): Lock
{
$this->price = $price;
return $this;
}
public function getDateAdd(): \DateTime
{
return $this->dateAdd;
}
public function setDateAdd(\DateTime $dateAdd): Lock
{
$this->dateAdd = $dateAdd;
return $this;
}
public function getDateValidate(): ?\DateTime
{
return $this->dateValidate;
}
public function setDateValidate(?\DateTime $dateValidate): Lock
{
$this->dateValidate = $dateValidate;
return $this;
}
public function getDateCaducity(): ?\DateTime
{
return $this->dateCaducity;
}
public function setDateCaducity(?\DateTime $dateCaducity): Lock
{
$this->dateCaducity = $dateCaducity;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): Lock
{
$this->reference = $reference;
return $this;
}
public function getStateId(): int
{
return $this->stateId;
}
public function setStateId(int $stateId): Lock
{
$this->stateId = $stateId;
return $this;
}
public function getStockLockReference(): ?string
{
return $this->stockLockReference;
}
public function setStockLockReference(?string $stockLockReference): Lock
{
$this->stockLockReference = $stockLockReference;
return $this;
}
}