<?php
namespace App\Entity\Gauge;
use App\Entity\Extension\HistoricalInterface;
use App\Entity\Extension\HistoricalTrait;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use App\Repository\Gauge\GaugePriceSupplyPointRepository;
/**
* @ORM\Entity(repositoryClass=GaugePriceSupplyPointRepository::class)
* @ORM\Table(name="gauge_price_supply_point")
*/
class GaugePriceSupplyPoint implements HistoricalInterface
{
use HistoricalTrait;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private int $id;
/**
* @var Gauge $gauge
* @ORM\ManyToOne(targetEntity="App\Entity\Gauge\Gauge", inversedBy="priceSupplyPoint")
* @ORM\JoinColumn(name="gauge_id", referencedColumnName="id", nullable=false)
*/
private Gauge $gauge;
/**
* @ORM\Column(type="float")
*/
private float $price;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
* @return GaugePriceSupplyPoint
*/
public function setId(int $id): GaugePriceSupplyPoint
{
$this->id = $id;
return $this;
}
/**
* @return Gauge
*/
public function getGauge(): Gauge
{
return $this->gauge;
}
/**
* @param Gauge $gauge
* @return GaugePriceSupplyPoint
*/
public function setGauge(Gauge $gauge): GaugePriceSupplyPoint
{
$this->gauge = $gauge;
return $this;
}
/**
* @return float
*/
public function getPrice(): float
{
return $this->price;
}
/**
* @param float $price
* @return GaugePriceSupplyPoint
*/
public function setPrice(float $price): GaugePriceSupplyPoint
{
$this->price = $price;
return $this;
}
}