diff --git a/src/Currency.php b/src/Currency.php new file mode 100644 index 0000000..ffdfdce --- /dev/null +++ b/src/Currency.php @@ -0,0 +1,20 @@ +values === null) { + $this->values = $this->parentOf(Value::class, [Model::CHILD_KEY => 'currency_id']); + } + } +} diff --git a/src/Value.php b/src/Value.php new file mode 100644 index 0000000..319d73a --- /dev/null +++ b/src/Value.php @@ -0,0 +1,32 @@ +currency === null) { + $this->currency = $this->childOf(Currency::class, [Model::SELF_KEY => 'currency_id']); + } + return $this->currency; + } + protected $base; + public function base(): ?Currency { + if ($this->base === null) { + $this->base = $this->childOf(Currency::class, [Model::SELF_KEY => 'base_id']); + } + return $this->base; + } +}