<?php
namespace App\Entity;
use App\Repository\BackOrderRepository;
use Doctrine\ORM\Mapping as ORM;
use DateTimeImmutable;
/**
* @ORM\Entity(repositoryClass=BackOrderRepository::class)
*/
class BackOrder
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Articles::class, inversedBy="backOrders")
*/
private $article;
/**
* @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="backOrders")
*/
private $establishment;
/**
* @ORM\Column(type="float")
*/
private $quantity;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="backOrders")
*/
private $user;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=ShoppingCart::class, inversedBy="backOrders")
*/
private $shoppingCart;
/**
* @ORM\Column(type="boolean")
*/
private $userNotified = false;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $deletedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $quantityPunch;
public function __construct()
{
$this->createdAt = new DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getArticle(): ?Articles
{
return $this->article;
}
public function setArticle(?Articles $article): self
{
$this->article = $article;
return $this;
}
public function getEstablishment(): ?Establishments
{
return $this->establishment;
}
public function setEstablishment(?Establishments $establishment): self
{
$this->establishment = $establishment;
return $this;
}
public function getQuantity(): ?float
{
return $this->quantity;
}
public function setQuantity(float $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getUser(): ?Users
{
return $this->user;
}
public function setUser(?Users $user): self
{
$this->user = $user;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getShoppingCart(): ?ShoppingCart
{
return $this->shoppingCart;
}
public function setShoppingCart(?ShoppingCart $shoppingCart): self
{
$this->shoppingCart = $shoppingCart;
return $this;
}
public function isUserNotified(): ?bool
{
return $this->userNotified;
}
public function setUserNotified(bool $userNotified): self
{
$this->userNotified = $userNotified;
return $this;
}
public function getDeletedAt(): ?\DateTimeImmutable
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeImmutable $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
public function getQuantityPunch(): ?string
{
return $this->quantityPunch;
}
public function setQuantityPunch(?string $quantityPunch): self
{
$this->quantityPunch = $quantityPunch;
return $this;
}
}