<?php
namespace App\Entity\Gauge;
use App\Entity\Extension\HistoricalInterface;
use App\Entity\Extension\HistoricalTrait;
use App\Entity\Rate;
use App\Repository\Gauge\GaugeRateRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=GaugeRateRepository::class)
* @ORM\Table(name="gauge_rate")
*/
class GaugeRate 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="rates")
* @ORM\JoinColumn(name="gauge_id", referencedColumnName="id", nullable=false)
*/
private Gauge $gauge;
/**
* @var Rate $rate
* @ORM\ManyToOne(targetEntity="App\Entity\Rate")
* @ORM\JoinColumn(name="rate_id", referencedColumnName="id", nullable=false)
*/
private Rate $rate;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
* @return self
*/
public function setId(int $id): self
{
$this->id = $id;
return $this;
}
/**
* @return Gauge
*/
public function getGauge(): Gauge
{
return $this->gauge;
}
/**
* @param Gauge $gauge
* @return GaugeRate
*/
public function setGauge(Gauge $gauge): GaugeRate
{
$this->gauge = $gauge;
return $this;
}
/**
* @return Rate
*/
public function getRate(): Rate
{
return $this->rate;
}
/**
* @param Rate $rate
* @return GaugeRate
*/
public function setRate(Rate $rate): GaugeRate
{
$this->rate = $rate;
return $this;
}
}