bug fixes / dbmapper fixes

This commit is contained in:
Dennis Eichhorn 2021-12-19 20:20:39 +01:00
parent ae138a2912
commit a6988ceb82
4 changed files with 15 additions and 15 deletions

View File

@ -48,12 +48,12 @@ final class Installer extends InstallerAbstract
*/ */
public static function install(DatabasePool $dbPool, ModuleInfo $info, SettingsInterface $cfgHandler) : void public static function install(DatabasePool $dbPool, ModuleInfo $info, SettingsInterface $cfgHandler) : void
{ {
parent::install($dbPool, $info, $cfgHandler); parent::install($dbPool, $info, $cfgHandler);
$types = include __DIR__ . '/Install/Types/types.php'; $types = include __DIR__ . '/Install/Types/types.php';
foreach ($types as $type) { foreach ($types as $type) {
self::createType($dbPool, $type); self::createType($dbPool, $type);
} }
} }
/** /**

View File

@ -65,7 +65,7 @@ class EditorDoc implements \JsonSerializable, ArrayableInterface
/** /**
* Type. * Type.
* *
* @var null|int|EditorDoc * @var null|int|EditorDocType
* @since 1.0.0 * @since 1.0.0
*/ */
public null | int | EditorDocType $type = null; public null | int | EditorDocType $type = null;

View File

@ -37,15 +37,15 @@ final class EditorDocMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'editor_doc_id' => ['name' => 'editor_doc_id', 'type' => 'int', 'internal' => 'id'], 'editor_doc_id' => ['name' => 'editor_doc_id', 'type' => 'int', 'internal' => 'id'],
'editor_doc_created_by' => ['name' => 'editor_doc_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], 'editor_doc_created_by' => ['name' => 'editor_doc_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
'editor_doc_title' => ['name' => 'editor_doc_title', 'type' => 'string', 'internal' => 'title'], 'editor_doc_title' => ['name' => 'editor_doc_title', 'type' => 'string', 'internal' => 'title'],
'editor_doc_plain' => ['name' => 'editor_doc_plain', 'type' => 'string', 'internal' => 'plain'], 'editor_doc_plain' => ['name' => 'editor_doc_plain', 'type' => 'string', 'internal' => 'plain'],
'editor_doc_content' => ['name' => 'editor_doc_content', 'type' => 'string', 'internal' => 'content'], 'editor_doc_content' => ['name' => 'editor_doc_content', 'type' => 'string', 'internal' => 'content'],
'editor_doc_type' => ['name' => 'editor_doc_type', 'type' => 'int', 'internal' => 'type'], 'editor_doc_type' => ['name' => 'editor_doc_type', 'type' => 'int', 'internal' => 'type'],
'editor_doc_virtual' => ['name' => 'editor_doc_virtual', 'type' => 'string', 'internal' => 'virtualPath'], 'editor_doc_virtual' => ['name' => 'editor_doc_virtual', 'type' => 'string', 'internal' => 'virtualPath'],
'editor_doc_created_at' => ['name' => 'editor_doc_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'editor_doc_created_at' => ['name' => 'editor_doc_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
'editor_doc_visible' => ['name' => 'editor_doc_visible', 'type' => 'bool', 'internal' => 'isVisible'], 'editor_doc_visible' => ['name' => 'editor_doc_visible', 'type' => 'bool', 'internal' => 'isVisible'],
]; ];
/** /**

View File

@ -33,7 +33,7 @@ final class EditorDocTypeMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'editor_doc_type_id' => ['name' => 'editor_doc_type_id', 'type' => 'int', 'internal' => 'id'], 'editor_doc_type_id' => ['name' => 'editor_doc_type_id', 'type' => 'int', 'internal' => 'id'],
'editor_doc_type_name' => ['name' => 'editor_doc_type_name', 'type' => 'string', 'internal' => 'name'], 'editor_doc_type_name' => ['name' => 'editor_doc_type_name', 'type' => 'string', 'internal' => 'name'],
]; ];