mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-01-11 17:18:42 +00:00
todo implementations
This commit is contained in:
parent
bc5a307734
commit
e526749bde
|
|
@ -58,6 +58,13 @@
|
|||
"primary": true,
|
||||
"autoincrement": true
|
||||
},
|
||||
"editor_doc_type": {
|
||||
"name": "editor_doc_type",
|
||||
"type": "INT",
|
||||
"null": true,
|
||||
"foreignTable": "editor_doc_type",
|
||||
"foreignKey": "editor_doc_type_id"
|
||||
},
|
||||
"editor_doc_title": {
|
||||
"name": "editor_doc_title",
|
||||
"type": "VARCHAR(255)",
|
||||
|
|
|
|||
|
|
@ -37,15 +37,15 @@ final class EditorDocMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static array $columns = [
|
||||
'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_title' => ['name' => 'editor_doc_title', 'type' => 'string', 'internal' => 'title'],
|
||||
'editor_doc_plain' => ['name' => 'editor_doc_plain', 'type' => 'string', 'internal' => 'plain'],
|
||||
'editor_doc_content' => ['name' => 'editor_doc_content', 'type' => 'string', 'internal' => 'content'],
|
||||
'editor_doc_type' => ['name' => 'editor_doc_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'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_visible' => ['name' => 'editor_doc_visible', 'type' => 'bool', 'internal' => 'isVisible'],
|
||||
'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_title' => ['name' => 'editor_doc_title', 'type' => 'string', 'internal' => 'title'],
|
||||
'editor_doc_plain' => ['name' => 'editor_doc_plain', 'type' => 'string', 'internal' => 'plain'],
|
||||
'editor_doc_content' => ['name' => 'editor_doc_content', 'type' => 'string', 'internal' => 'content'],
|
||||
'editor_doc_type' => ['name' => 'editor_doc_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'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_visible' => ['name' => 'editor_doc_visible', 'type' => 'bool', 'internal' => 'isVisible'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -56,8 +56,8 @@ final class EditorDocMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static array $belongsTo = [
|
||||
'createdBy' => [
|
||||
'mapper' => AccountMapper::class,
|
||||
'external' => 'editor_doc_created_by',
|
||||
'mapper' => AccountMapper::class,
|
||||
'external' => 'editor_doc_created_by',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
@ -69,8 +69,8 @@ final class EditorDocMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static array $ownsOne = [
|
||||
'type' => [
|
||||
'mapper' => EdutirDocTypeMapper::class,
|
||||
'external' => 'editor_doc_type',
|
||||
'mapper' => EditorDocTypeMapper::class,
|
||||
'external' => 'editor_doc_type',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ final class EditorDocTypeL11nMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static array $columns = [
|
||||
'editor_doc_type_l11n_id' => ['name' => 'editor_doc_type_l11n_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'editor_doc_type_l11n_title' => ['name' => 'editor_doc_type_l11n_title', 'type' => 'string', 'internal' => 'title', 'autocomplete' => true],
|
||||
'editor_doc_type_l11n_type' => ['name' => 'editor_doc_type_l11n_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'editor_doc_type_l11n_language' => ['name' => 'editor_doc_type_l11n_language', 'type' => 'string', 'internal' => 'language'],
|
||||
'editor_doc_type_l11n_id' => ['name' => 'editor_doc_type_l11n_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'editor_doc_type_l11n_title' => ['name' => 'editor_doc_type_l11n_title', 'type' => 'string', 'internal' => 'title', 'autocomplete' => true],
|
||||
'editor_doc_type_l11n_type' => ['name' => 'editor_doc_type_l11n_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'editor_doc_type_l11n_language' => ['name' => 'editor_doc_type_l11n_language', 'type' => 'string', 'internal' => 'language'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ final class EditorDocTypeMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static array $columns = [
|
||||
'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_id' => ['name' => 'editor_doc_type_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'editor_doc_type_name' => ['name' => 'editor_doc_type_name', 'type' => 'string', 'internal' => 'name'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -45,12 +45,12 @@ final class EditorDocTypeMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static array $hasMany = [
|
||||
'title' => [
|
||||
'mapper' => EditorDocTypeL11nMapper::class,
|
||||
'table' => 'editor_doc_type_l11n',
|
||||
'self' => 'editor_doc_type_l11n_type',
|
||||
'column' => 'title',
|
||||
'conditional' => true,
|
||||
'external' => null,
|
||||
'mapper' => EditorDocTypeL11nMapper::class,
|
||||
'table' => 'editor_doc_type_l11n',
|
||||
'self' => 'editor_doc_type_l11n_type',
|
||||
'column' => 'title',
|
||||
'conditional' => true,
|
||||
'external' => null,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
39
Models/NullEditorDocType.php
Normal file
39
Models/NullEditorDocType.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\Editor\Models
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Editor\Models;
|
||||
|
||||
/**
|
||||
* Null model
|
||||
*
|
||||
* @package Modules\Editor\Models
|
||||
* @license OMS License 1.0
|
||||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
final class NullEditorDocType extends EditorDocType
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param int $id Model id
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct(int $id = 0)
|
||||
{
|
||||
$this->id = $id;
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
39
Models/NullEditorDocTypeL11n.php
Normal file
39
Models/NullEditorDocTypeL11n.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\Editor\Models
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Editor\Models;
|
||||
|
||||
/**
|
||||
* Null model
|
||||
*
|
||||
* @package Modules\Editor\Models
|
||||
* @license OMS License 1.0
|
||||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
final class NullEditorDocTypeL11n extends EditorDocTypeL11n
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param int $id Model id
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct(int $id = 0)
|
||||
{
|
||||
$this->id = $id;
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user