<?php
namespace App\Entity;
use App\Repository\CurrencyRateRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\UX\Turbo\Attribute\Broadcast;
#[ORM\Entity(repositoryClass: CurrencyRateRepository::class)]
#[Broadcast]
class CurrencyRate
{
use IdentifiableTrait;
#[ORM\ManyToOne(inversedBy: 'currencyRates')]
private ?Currency $currency = null;
#[ORM\Column(length: 5)]
private ?string $year = null;
#[ORM\Column]
private ?float $rate = null;
public function getId(): ?int
{
return $this->id;
}
public function getCurrency(): ?Currency
{
return $this->currency;
}
public function setCurrency(?Currency $currency): self
{
$this->currency = $currency;
return $this;
}
public function getYear(): ?string
{
return $this->year;
}
public function setYear(string $year): self
{
$this->year = $year;
return $this;
}
public function getRate(): ?float
{
return $this->rate;
}
public function setRate(float $rate): self
{
$this->rate = $rate;
return $this;
}
}