<?php
namespace App\Entity;
use App\Repository\OrderArticleRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=OrderArticleRepository::class)
*/
class OrderArticle
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Orders::class, inversedBy="orderArticles")
*/
private $orderCart;
/**
* @ORM\ManyToOne(targetEntity=Articles::class, inversedBy="orderArticles")
*/
private $article;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="createdOrderArticle")
*/
private $createdBy;
/**
* @ORM\Column(type="float")
*/
private $quantity = 0.0;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="float", length=255)
*/
private $priceUnit;
/**
* @ORM\Column(type="float")
*/
private $tax = 0.0;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $priceUnitTvac;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $weightCounting;
/**
* @ORM\Column(type="boolean")
*/
private $deletionRequested = false;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $deletedAt = null;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
*/
private $deletedBy = null;
public function __construct()
{
$this->createdAt = New \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getOrderCart(): ?Orders
{
return $this->orderCart;
}
public function setOrderCart(?Orders $orderCart): self
{
$this->orderCart = $orderCart;
return $this;
}
public function getArticle(): ?Articles
{
return $this->article;
}
public function setArticle(?Articles $article): self
{
$this->article = $article;
return $this;
}
public function getCreatedBy(): ?Users
{
return $this->createdBy;
}
public function setCreatedBy(?Users $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getQuantity(): ?float
{
return $this->quantity;
}
public function setQuantity(float $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getPriceUnit(): ?float
{
return $this->priceUnit;
}
public function setPriceUnit(float $priceUnit): self
{
$this->priceUnit = $priceUnit;
return $this;
}
public function getTax(): ?float
{
return $this->tax;
}
public function setTax(float $tax): self
{
$this->tax = $tax;
return $this;
}
public function getPriceUnitTvac(): ?float
{
return $this->priceUnitTvac;
}
public function setPriceUnitTvac(?float $priceUnitTvac): self
{
$this->priceUnitTvac = $priceUnitTvac;
return $this;
}
public function getWeightCounting(): ?float
{
return $this->weightCounting;
}
public function setWeightCounting(?float $weightCounting): self
{
$this->weightCounting = $weightCounting;
return $this;
}
public function isDeletionRequested(): ?bool
{
return $this->deletionRequested;
}
public function setDeletionRequested(bool $deletionRequested): self
{
$this->deletionRequested = $deletionRequested;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(\DateTimeInterface $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
public function getDeletedBy(): ?Users
{
return $this->deletedBy;
}
public function setDeletedBy(?Users $deletedBy): self
{
$this->deletedBy = $deletedBy;
return $this;
}
}