<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="product_prices")
* @ORM\Entity
*/
class ProductPrice
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Product", inversedBy="prices")
* @ORM\JoinColumn(name="products_id", referencedColumnName="products_id", nullable=true, onDelete="CASCADE")
*/
private $product;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\PriceGroup", cascade={"persist"})
* @ORM\JoinColumn(name="price_group_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
*/
private $group;
/**
* @var float
* @ORM\Column(name="price", type="decimal", precision=15, scale=4, nullable=false, options={"default"="0.0000"})
*/
private $price = '0.0000';
public function getId(): int {
return $this->id;
}
public function getProduct() {
return $this->product;
}
public function getGroup() {
return $this->group;
}
public function getPrice(): float {
return $this->price;
}
public function setId(int $id): void {
$this->id = $id;
}
public function setProduct($product): void {
$this->product = $product;
}
public function setGroup($group): void {
$this->group = $group;
}
public function setPrice(float $price): void {
$this->price = $price;
}
}