<?php
namespace App\Entity;
use App\Repository\ArticleBuyRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ArticleBuyRepository::class)
*/
class ArticleBuy
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $price;
/**
* @ORM\Column(type="integer")
*/
private $quantity;
/**
* @ORM\ManyToOne(targetEntity=Article::class, inversedBy="articleBuys")
* @ORM\JoinColumn(nullable=false)
*/
private $article;
/**
* @ORM\ManyToOne(targetEntity=Client::class, inversedBy="articleBuys")
* @ORM\JoinColumn(nullable=false)
*/
private $client;
public function getId(): ?int
{
return $this->id;
}
public function getPrice(): ?int
{
return $this->price;
}
public function setPrice(int $price): self
{
$this->price = $price;
return $this;
}
public function getQuantity(): ?int
{
return $this->quantity;
}
public function setQuantity(int $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getArticle(): ?Article
{
return $this->article;
}
public function setArticle(?Article $article): self
{
$this->article = $article;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setClient(?Client $client): self
{
$this->client = $client;
return $this;
}
}