src/Entity/CurrencyRate.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CurrencyRateRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\UX\Turbo\Attribute\Broadcast;
  6. #[ORM\Entity(repositoryClassCurrencyRateRepository::class)]
  7. #[Broadcast]
  8. class CurrencyRate
  9. {
  10.     use IdentifiableTrait;
  11.     #[ORM\ManyToOne(inversedBy'currencyRates')]
  12.     private ?Currency $currency null;
  13.     #[ORM\Column(length5)]
  14.     private ?string $year null;
  15.     #[ORM\Column]
  16.     private ?float $rate null;
  17.     public function getId(): ?int
  18.     {
  19.         return $this->id;
  20.     }
  21.     public function getCurrency(): ?Currency
  22.     {
  23.         return $this->currency;
  24.     }
  25.     public function setCurrency(?Currency $currency): self
  26.     {
  27.         $this->currency $currency;
  28.         return $this;
  29.     }
  30.     public function getYear(): ?string
  31.     {
  32.         return $this->year;
  33.     }
  34.     public function setYear(string $year): self
  35.     {
  36.         $this->year $year;
  37.         return $this;
  38.     }
  39.     public function getRate(): ?float
  40.     {
  41.         return $this->rate;
  42.     }
  43.     public function setRate(float $rate): self
  44.     {
  45.         $this->rate $rate;
  46.         return $this;
  47.     }
  48. }