mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-02-10 09:18:40 +00:00
Re-format mappers
This commit is contained in:
parent
fbb14266a7
commit
e8ed72a46d
|
|
@ -38,11 +38,11 @@ class KanbanBoardMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
'kanban_board_id' => ['name' => 'kanban_board_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_board_name' => ['name' => 'kanban_board_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_board_desc' => ['name' => 'kanban_board_desc', 'type' => 'string', 'internal' => 'description'],
|
||||
'kanban_board_status' => ['name' => 'kanban_board_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'kanban_board_order' => ['name' => 'kanban_board_order', 'type' => 'int', 'internal' => 'order'],
|
||||
'kanban_board_id' => ['name' => 'kanban_board_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_board_name' => ['name' => 'kanban_board_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_board_desc' => ['name' => 'kanban_board_desc', 'type' => 'string', 'internal' => 'description'],
|
||||
'kanban_board_status' => ['name' => 'kanban_board_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'kanban_board_order' => ['name' => 'kanban_board_order', 'type' => 'int', 'internal' => 'order'],
|
||||
'kanban_board_created_by' => ['name' => 'kanban_board_created_by', 'type' => 'int', 'internal' => 'createdBy'],
|
||||
'kanban_board_created_at' => ['name' => 'kanban_board_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
||||
];
|
||||
|
|
@ -55,10 +55,10 @@ class KanbanBoardMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static $hasMany = [
|
||||
'columns' => [
|
||||
'mapper' => KanbanColumnMapper::class,
|
||||
'table' => 'kanban_column',
|
||||
'dst' => 'kanban_column_board',
|
||||
'src' => null,
|
||||
'mapper' => KanbanColumnMapper::class,
|
||||
'table' => 'kanban_column',
|
||||
'dst' => 'kanban_column_board',
|
||||
'src' => null,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ class KanbanCardCommentMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
'kanban_card_comment_id' => ['name' => 'kanban_card_comment_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_card_comment_description' => ['name' => 'kanban_card_comment_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'kanban_card_comment_card' => ['name' => 'kanban_card_comment_card', 'type' => 'int', 'internal' => 'card'],
|
||||
'kanban_card_comment_id' => ['name' => 'kanban_card_comment_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_card_comment_description' => ['name' => 'kanban_card_comment_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'kanban_card_comment_card' => ['name' => 'kanban_card_comment_card', 'type' => 'int', 'internal' => 'card'],
|
||||
'kanban_card_comment_created_at' => ['name' => 'kanban_card_comment_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
||||
'kanban_card_comment_created_by' => ['name' => 'kanban_card_comment_created_by', 'type' => 'int', 'internal' => 'createdBy'],
|
||||
];
|
||||
|
|
@ -53,10 +53,10 @@ class KanbanCardCommentMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static $hasMany = [
|
||||
'media' => [
|
||||
'mapper' => MediaMapper::class,
|
||||
'table' => 'kanban_card_comment_media',
|
||||
'dst' => 'kanban_card_comment_media_dst',
|
||||
'src' => 'kanban_card_comment_media_src',
|
||||
'mapper' => MediaMapper::class,
|
||||
'table' => 'kanban_card_comment_media',
|
||||
'dst' => 'kanban_card_comment_media_dst',
|
||||
'src' => 'kanban_card_comment_media_src',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -39,14 +39,14 @@ class KanbanCardMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'],
|
||||
'kanban_card_ref' => ['name' => 'kanban_card_ref', 'type' => 'int', 'internal' => 'ref'],
|
||||
'kanban_card_column' => ['name' => 'kanban_card_column', 'type' => 'int', 'internal' => 'column'],
|
||||
'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'],
|
||||
'kanban_card_ref' => ['name' => 'kanban_card_ref', 'type' => 'int', 'internal' => 'ref'],
|
||||
'kanban_card_column' => ['name' => 'kanban_card_column', 'type' => 'int', 'internal' => 'column'],
|
||||
'kanban_card_created_at' => ['name' => 'kanban_card_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
||||
'kanban_card_created_by' => ['name' => 'kanban_card_created_by', 'type' => 'int', 'internal' => 'createdBy'],
|
||||
];
|
||||
|
|
@ -65,23 +65,23 @@ class KanbanCardMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static $hasMany = [
|
||||
'media' => [
|
||||
'mapper' => MediaMapper::class,
|
||||
'table' => 'kanban_card_media',
|
||||
'dst' => 'kanban_card_media_dst',
|
||||
'src' => 'kanban_card_media_src',
|
||||
'media' => [
|
||||
'mapper' => MediaMapper::class,
|
||||
'table' => 'kanban_card_media',
|
||||
'dst' => 'kanban_card_media_dst',
|
||||
'src' => 'kanban_card_media_src',
|
||||
],
|
||||
'labels' => [
|
||||
'mapper' => KanbanLabelMapper::class,
|
||||
'table' => 'kanban_label_relation',
|
||||
'dst' => 'kanban_label_relation_card',
|
||||
'src' => 'kanban_label_relation_label',
|
||||
'labels' => [
|
||||
'mapper' => KanbanLabelMapper::class,
|
||||
'table' => 'kanban_label_relation',
|
||||
'dst' => 'kanban_label_relation_card',
|
||||
'src' => 'kanban_label_relation_label',
|
||||
],
|
||||
'comments' => [
|
||||
'mapper' => KanbanCardCommentMapper::class,
|
||||
'table' => 'kanban_card_comment',
|
||||
'dst' => 'kanban_card_comment_card',
|
||||
'src' => null,
|
||||
'mapper' => KanbanCardCommentMapper::class,
|
||||
'table' => 'kanban_card_comment',
|
||||
'dst' => 'kanban_card_comment_card',
|
||||
'src' => null,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ class KanbanColumnMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
'kanban_column_id' => ['name' => 'kanban_column_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_column_name' => ['name' => 'kanban_column_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_column_order' => ['name' => 'kanban_column_order', 'type' => 'int', 'internal' => 'order'],
|
||||
'kanban_column_board' => ['name' => 'kanban_column_board', 'type' => 'int', 'internal' => 'board'],
|
||||
'kanban_column_id' => ['name' => 'kanban_column_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_column_name' => ['name' => 'kanban_column_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_column_order' => ['name' => 'kanban_column_order', 'type' => 'int', 'internal' => 'order'],
|
||||
'kanban_column_board' => ['name' => 'kanban_column_board', 'type' => 'int', 'internal' => 'board'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -51,10 +51,10 @@ class KanbanColumnMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static $hasMany = [
|
||||
'cards' => [
|
||||
'mapper' => KanbanCardMapper::class,
|
||||
'table' => 'kanban_card',
|
||||
'dst' => 'kanban_card_column',
|
||||
'src' => null,
|
||||
'mapper' => KanbanCardMapper::class,
|
||||
'table' => 'kanban_card',
|
||||
'dst' => 'kanban_card_column',
|
||||
'src' => null,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ class KanbanLabelMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
'kanban_label_id' => ['name' => 'kanban_label_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_label_name' => ['name' => 'kanban_label_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_label_color' => ['name' => 'kanban_label_color', 'type' => 'int', 'internal' => 'color'],
|
||||
'kanban_label_board' => ['name' => 'kanban_label_board', 'type' => 'int', 'internal' => 'board'],
|
||||
'kanban_label_id' => ['name' => 'kanban_label_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'kanban_label_name' => ['name' => 'kanban_label_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'kanban_label_color' => ['name' => 'kanban_label_color', 'type' => 'int', 'internal' => 'color'],
|
||||
'kanban_label_board' => ['name' => 'kanban_label_board', 'type' => 'int', 'internal' => 'board'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user