<?php
namespace App\Entity;
use App\Repository\StockRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=StockRepository::class)
*/
class Stock
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="stocks")
* @ORM\JoinColumn(nullable=false)
*/
private $produit;
/**
* @ORM\Column(type="integer")
*/
private $stockDispo;
/**
* @ORM\Column(type="integer")
*/
private $stockReel;
public function getId(): ?int
{
return $this->id;
}
public function getProduit(): ?Product
{
return $this->produit;
}
public function setProduit(?Product $produit): self
{
$this->produit = $produit;
return $this;
}
public function getStockDispo(): ?int
{
return $this->stockDispo;
}
public function setStockDispo(int $stockDispo): self
{
$this->stockDispo = $stockDispo;
return $this;
}
public function getStockReel(): ?int
{
return $this->stockReel;
}
public function setStockReel(int $stockReel): self
{
$this->stockReel = $stockReel;
return $this;
}
}