diff --git a/Localization/Defaults/Currency.php b/Localization/Defaults/Currency.php index 1b85de59c..adef8dff4 100644 --- a/Localization/Defaults/Currency.php +++ b/Localization/Defaults/Currency.php @@ -49,13 +49,29 @@ final class Currency private string $code = ''; /** - * Currency code. + * Currency symbol. + * + * @var string + * @since 1.0.0 + */ + private string $symbol = ''; + + /** + * Currency number. * * @var int * @since 1.0.0 */ private int $number = 0; + /** + * Currency subunits. + * + * @var int + * @since 1.0.0 + */ + private int $subunits = 0; + /** * Currency decimals. * @@ -97,7 +113,19 @@ final class Currency } /** - * Get currency code + * Get currency symbol + * + * @return string + * + * @since 1.0.0 + */ + public function getSymbol() : string + { + return $this->symbol; + } + + /** + * Get currency number * * @return int * @@ -108,6 +136,18 @@ final class Currency return $this->number; } + /** + * Get currency subunits + * + * @return int + * + * @since 1.0.0 + */ + public function getSubunits() : int + { + return $this->subunits; + } + /** * Get currency decimals * diff --git a/Localization/Defaults/CurrencyMapper.php b/Localization/Defaults/CurrencyMapper.php index 6a4c010c1..a804ee93b 100644 --- a/Localization/Defaults/CurrencyMapper.php +++ b/Localization/Defaults/CurrencyMapper.php @@ -35,9 +35,11 @@ class CurrencyMapper extends DataMapperAbstract protected static array $columns = [ 'currency_id' => ['name' => 'currency_id', 'type' => 'int', 'internal' => 'id'], 'currency_name' => ['name' => 'currency_name', 'type' => 'string', 'internal' => 'name'], - 'currency_code' => ['name' => 'currency_code', 'type' => 'string', 'internal' => 'code'], - 'currency_number' => ['name' => 'currency_number', 'type' => 'int', 'internal' => 'number'], - 'currency_decimal' => ['name' => 'currency_decimal', 'type' => 'int', 'internal' => 'decimals'], + 'currency_char' => ['name' => 'currency_char', 'type' => 'string', 'internal' => 'code'], + 'currency_number' => ['name' => 'currency_num', 'type' => 'string', 'internal' => 'number'], + 'currency_symbol' => ['name' => 'currency_symbol', 'type' => 'string', 'internal' => 'symbol'], + 'currency_subunits' => ['name' => 'currency_subunits', 'type' => 'int', 'internal' => 'subunits'], + 'currency_decimals' => ['name' => 'currency_decimals', 'type' => 'int', 'internal' => 'decimals'], 'currency_countries' => ['name' => 'currency_countries', 'type' => 'string', 'internal' => 'countries'], ];