Currency::class]; private ?Currency $currency = null; private ?int $currencyId = null; private float $exchangeRate = 0.0; private DateTime $validFrom; public function setCurrency(Currency $currency): void { $this->currency = $currency; } public function setCurrencyId(int $currencyId): void { $this->currencyId = $currencyId; } public function setExchangeRate(float $exchangeRate): void { $this->exchangeRate = $exchangeRate; } public function setValidFromDate(DateTime $validFrom): void { $this->validFrom = $validFrom; } public function setValidFrom(string $validFrom): void { $this->validFrom = new DateTime($validFrom); } public function getCurrency(): ?Currency { return $this->currency; } public function getCurrencyId(): ?int { return $this->currencyId; } public function getExchangeRate(): float { return $this->exchangeRate; } public function getValidFromDate(): DateTime { return $this->validFrom; } public function getValidFrom(): string { return $this->validFrom->format('Y-m-d H:i:s'); } }