mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
63 lines
1.7 KiB
PHP
Executable File
63 lines
1.7 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Jingga
|
|
*
|
|
* PHP Version 8.2
|
|
*
|
|
* @package phpOMS\Localization\Defaults
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 2.0
|
|
* @version 1.0.0
|
|
* @link https://jingga.app
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace phpOMS\Localization\Defaults;
|
|
|
|
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
|
|
|
/**
|
|
* Country mapper class.
|
|
*
|
|
* @package phpOMS\Localization\Defaults
|
|
* @license OMS License 2.0
|
|
* @link https://jingga.app
|
|
* @since 1.0.0
|
|
*
|
|
* @template T of Country
|
|
* @extends DataMapperFactory<T>
|
|
*/
|
|
class CountryMapper extends DataMapperFactory
|
|
{
|
|
/**
|
|
* Columns.
|
|
*
|
|
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
|
|
* @since 1.0.0
|
|
*/
|
|
public const COLUMNS = [
|
|
'country_id' => ['name' => 'country_id', 'type' => 'int', 'internal' => 'id'],
|
|
'country_name' => ['name' => 'country_name', 'type' => 'string', 'internal' => 'name'],
|
|
'country_code2' => ['name' => 'country_code2', 'type' => 'string', 'internal' => 'code2'],
|
|
'country_code3' => ['name' => 'country_code3', 'type' => 'string', 'internal' => 'code3'],
|
|
'country_numeric' => ['name' => 'country_numeric', 'type' => 'int', 'internal' => 'numeric'],
|
|
'country_developed' => ['name' => 'country_developed', 'type' => 'bool', 'internal' => 'isDeveloped'],
|
|
];
|
|
|
|
/**
|
|
* Primary table.
|
|
*
|
|
* @var string
|
|
* @since 1.0.0
|
|
*/
|
|
public const TABLE = 'country';
|
|
|
|
/**
|
|
* Primary field name.
|
|
*
|
|
* @var string
|
|
* @since 1.0.0
|
|
*/
|
|
public const PRIMARYFIELD = 'country_id';
|
|
}
|