mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-14 03:28:41 +00:00
always use and many other todo implementations
This commit is contained in:
parent
e9473abba5
commit
2b27aec9f5
|
|
@ -29,14 +29,14 @@ class Navigation
|
||||||
/**
|
/**
|
||||||
* Install navigation providing
|
* Install navigation providing
|
||||||
*
|
*
|
||||||
* @param string $path Module path
|
|
||||||
* @param ApplicationAbstract $app Application
|
* @param ApplicationAbstract $app Application
|
||||||
|
* @param string $path Module path
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function install(string $path, ApplicationAbstract $app) : void
|
public static function install(ApplicationAbstract $app, string $path) : void
|
||||||
{
|
{
|
||||||
\Modules\Navigation\Admin\Installer::installExternal($app, ['path' => __DIR__ . '/Navigation.install.json']);
|
\Modules\Navigation\Admin\Installer::installExternal($app, ['path' => __DIR__ . '/Navigation.install.json']);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,18 +50,18 @@ final class Installer extends InstallerAbstract
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public static function install(DatabasePool $dbPool, ModuleInfo $info, SettingsInterface $cfgHandler) : void
|
public static function install(ApplicationAbstract $app, ModuleInfo $info, SettingsInterface $cfgHandler) : void
|
||||||
{
|
{
|
||||||
parent::install($dbPool, $info, $cfgHandler);
|
parent::install($app, $info, $cfgHandler);
|
||||||
|
|
||||||
$sqlite = new SQLiteConnection([
|
$sqlite = new SQLiteConnection([
|
||||||
'db' => 'sqlite',
|
'db' => 'sqlite',
|
||||||
'database' => __DIR__ . '/../../../phpOMS/Localization/Defaults/localization.sqlite',
|
'database' => __DIR__ . '/../../../phpOMS/Localization/Defaults/localization.sqlite',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self::installCountries($sqlite, $dbPool);
|
self::installCountries($sqlite, $app->dbPool);
|
||||||
self::installLanguages($sqlite, $dbPool);
|
self::installLanguages($sqlite, $app->dbPool);
|
||||||
self::installCurrencies($sqlite, $dbPool);
|
self::installCurrencies($sqlite, $app->dbPool);
|
||||||
self::installDefaultSettings();
|
self::installDefaultSettings();
|
||||||
|
|
||||||
$sqlite->close();
|
$sqlite->close();
|
||||||
|
|
|
||||||
58
Models/AccountCredentialMapper.php
Normal file
58
Models/AccountCredentialMapper.php
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Karaka
|
||||||
|
*
|
||||||
|
* PHP Version 8.0
|
||||||
|
*
|
||||||
|
* @package Modules\Admin\Models
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://karaka.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Admin\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Account mapper class.
|
||||||
|
*
|
||||||
|
* @package Modules\Admin\Models
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link https://karaka.app
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class AccountCredentialMapper extends AccountMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Columns.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, bool|string|array>>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const COLUMNS = [
|
||||||
|
'account_id' => ['name' => 'account_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
|
'account_status' => ['name' => 'account_status', 'type' => 'int', 'internal' => 'status'],
|
||||||
|
'account_type' => ['name' => 'account_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
|
'account_login' => ['name' => 'account_login', 'type' => 'string', 'internal' => 'login', 'autocomplete' => true],
|
||||||
|
'account_name1' => ['name' => 'account_name1', 'type' => 'string', 'internal' => 'name1', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
|
'account_name2' => ['name' => 'account_name2', 'type' => 'string', 'internal' => 'name2', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
|
'account_name3' => ['name' => 'account_name3', 'type' => 'string', 'internal' => 'name3', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
|
'account_password' => ['name' => 'account_password', 'type' => 'string', 'internal' => 'password', 'writeonly' => true],
|
||||||
|
'account_password_temp' => ['name' => 'account_password_temp', 'type' => 'string', 'internal' => 'tempPassword', 'writeonly' => true],
|
||||||
|
'account_password_temp_limit' => ['name' => 'account_password_temp_limit', 'type' => 'DateTimeImmutable', 'internal' => 'tempPasswordLimit'],
|
||||||
|
'account_email' => ['name' => 'account_email', 'type' => 'string', 'internal' => 'email', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
|
'account_tries' => ['name' => 'account_tries', 'type' => 'int', 'internal' => 'tries'],
|
||||||
|
'account_lactive' => ['name' => 'account_lactive', 'type' => 'DateTime', 'internal' => 'lastActive'],
|
||||||
|
'account_localization' => ['name' => 'account_localization', 'type' => 'int', 'internal' => 'l11n'],
|
||||||
|
'account_created_at' => ['name' => 'account_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model to use by the mapper.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const MODEL = Account::class;
|
||||||
|
}
|
||||||
|
|
@ -43,9 +43,6 @@ final class AccountMapper extends DataMapperFactory
|
||||||
'account_name1' => ['name' => 'account_name1', 'type' => 'string', 'internal' => 'name1', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
'account_name1' => ['name' => 'account_name1', 'type' => 'string', 'internal' => 'name1', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
'account_name2' => ['name' => 'account_name2', 'type' => 'string', 'internal' => 'name2', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
'account_name2' => ['name' => 'account_name2', 'type' => 'string', 'internal' => 'name2', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
'account_name3' => ['name' => 'account_name3', 'type' => 'string', 'internal' => 'name3', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
'account_name3' => ['name' => 'account_name3', 'type' => 'string', 'internal' => 'name3', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
'account_password' => ['name' => 'account_password', 'type' => 'string', 'internal' => 'password', 'writeonly' => true],
|
|
||||||
'account_password_temp' => ['name' => 'account_password_temp', 'type' => 'string', 'internal' => 'tempPassword', 'writeonly' => true],
|
|
||||||
'account_password_temp_limit' => ['name' => 'account_password_temp_limit', 'type' => 'DateTimeImmutable', 'internal' => 'tempPasswordLimit'],
|
|
||||||
'account_email' => ['name' => 'account_email', 'type' => 'string', 'internal' => 'email', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
'account_email' => ['name' => 'account_email', 'type' => 'string', 'internal' => 'email', 'autocomplete' => true, 'annotations' => ['gdpr' => true]],
|
||||||
'account_tries' => ['name' => 'account_tries', 'type' => 'int', 'internal' => 'tries'],
|
'account_tries' => ['name' => 'account_tries', 'type' => 'int', 'internal' => 'tries'],
|
||||||
'account_lactive' => ['name' => 'account_lactive', 'type' => 'DateTime', 'internal' => 'lastActive'],
|
'account_lactive' => ['name' => 'account_lactive', 'type' => 'DateTime', 'internal' => 'lastActive'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user