This commit is contained in:
@@ -14,7 +14,7 @@ class Stock
|
||||
private $id;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $product_id;
|
||||
private $gtin;
|
||||
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $stock;
|
||||
@@ -25,19 +25,22 @@ class Stock
|
||||
#[ORM\ManyToOne(targetEntity: Warehouse::class, inversedBy: 'warehouse_id')]
|
||||
private $warehouse_id;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'stocks')]
|
||||
private ?Products $prod_id = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getProductId(): ?string
|
||||
public function getGtin(): ?string
|
||||
{
|
||||
return $this->product_id;
|
||||
return $this->gtin;
|
||||
}
|
||||
|
||||
public function setProductId(string $product_id): self
|
||||
public function setGtin(string $gtin): self
|
||||
{
|
||||
$this->product_id = $product_id;
|
||||
$this->gtin = $gtin;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -77,4 +80,16 @@ class Stock
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getProdId(): ?Products
|
||||
{
|
||||
return $this->prod_id;
|
||||
}
|
||||
|
||||
public function setProdId(?Products $prod_id): self
|
||||
{
|
||||
$this->prod_id = $prod_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user