Re-format mappers

This commit is contained in:
Dennis Eichhorn 2018-05-31 19:47:26 +02:00
parent fbb14266a7
commit e8ed72a46d
5 changed files with 50 additions and 50 deletions

View File

@ -38,11 +38,11 @@ class KanbanBoardMapper extends DataMapperAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static $columns = [
'kanban_board_id' => ['name' => 'kanban_board_id', 'type' => 'int', 'internal' => 'id'], 'kanban_board_id' => ['name' => 'kanban_board_id', 'type' => 'int', 'internal' => 'id'],
'kanban_board_name' => ['name' => 'kanban_board_name', 'type' => 'string', 'internal' => 'name'], 'kanban_board_name' => ['name' => 'kanban_board_name', 'type' => 'string', 'internal' => 'name'],
'kanban_board_desc' => ['name' => 'kanban_board_desc', 'type' => 'string', 'internal' => 'description'], 'kanban_board_desc' => ['name' => 'kanban_board_desc', 'type' => 'string', 'internal' => 'description'],
'kanban_board_status' => ['name' => 'kanban_board_status', 'type' => 'int', 'internal' => 'status'], 'kanban_board_status' => ['name' => 'kanban_board_status', 'type' => 'int', 'internal' => 'status'],
'kanban_board_order' => ['name' => 'kanban_board_order', 'type' => 'int', 'internal' => 'order'], '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_by' => ['name' => 'kanban_board_created_by', 'type' => 'int', 'internal' => 'createdBy'],
'kanban_board_created_at' => ['name' => 'kanban_board_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'], 'kanban_board_created_at' => ['name' => 'kanban_board_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
]; ];
@ -55,10 +55,10 @@ class KanbanBoardMapper extends DataMapperAbstract
*/ */
protected static $hasMany = [ protected static $hasMany = [
'columns' => [ 'columns' => [
'mapper' => KanbanColumnMapper::class, 'mapper' => KanbanColumnMapper::class,
'table' => 'kanban_column', 'table' => 'kanban_column',
'dst' => 'kanban_column_board', 'dst' => 'kanban_column_board',
'src' => null, 'src' => null,
], ],
]; ];

View File

@ -38,9 +38,9 @@ class KanbanCardCommentMapper extends DataMapperAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static $columns = [
'kanban_card_comment_id' => ['name' => 'kanban_card_comment_id', 'type' => 'int', 'internal' => 'id'], '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_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_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_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'], '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 = [ protected static $hasMany = [
'media' => [ 'media' => [
'mapper' => MediaMapper::class, 'mapper' => MediaMapper::class,
'table' => 'kanban_card_comment_media', 'table' => 'kanban_card_comment_media',
'dst' => 'kanban_card_comment_media_dst', 'dst' => 'kanban_card_comment_media_dst',
'src' => 'kanban_card_comment_media_src', 'src' => 'kanban_card_comment_media_src',
], ],
]; ];

View File

@ -39,14 +39,14 @@ class KanbanCardMapper extends DataMapperAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static $columns = [
'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'], 'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'],
'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'], 'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'],
'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'], 'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'],
'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'], 'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'],
'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'], 'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'],
'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'], 'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'],
'kanban_card_ref' => ['name' => 'kanban_card_ref', 'type' => 'int', 'internal' => 'ref'], 'kanban_card_ref' => ['name' => 'kanban_card_ref', 'type' => 'int', 'internal' => 'ref'],
'kanban_card_column' => ['name' => 'kanban_card_column', 'type' => 'int', 'internal' => 'column'], '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_at' => ['name' => 'kanban_card_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
'kanban_card_created_by' => ['name' => 'kanban_card_created_by', 'type' => 'int', 'internal' => 'createdBy'], '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 * @since 1.0.0
*/ */
protected static $hasMany = [ protected static $hasMany = [
'media' => [ 'media' => [
'mapper' => MediaMapper::class, 'mapper' => MediaMapper::class,
'table' => 'kanban_card_media', 'table' => 'kanban_card_media',
'dst' => 'kanban_card_media_dst', 'dst' => 'kanban_card_media_dst',
'src' => 'kanban_card_media_src', 'src' => 'kanban_card_media_src',
], ],
'labels' => [ 'labels' => [
'mapper' => KanbanLabelMapper::class, 'mapper' => KanbanLabelMapper::class,
'table' => 'kanban_label_relation', 'table' => 'kanban_label_relation',
'dst' => 'kanban_label_relation_card', 'dst' => 'kanban_label_relation_card',
'src' => 'kanban_label_relation_label', 'src' => 'kanban_label_relation_label',
], ],
'comments' => [ 'comments' => [
'mapper' => KanbanCardCommentMapper::class, 'mapper' => KanbanCardCommentMapper::class,
'table' => 'kanban_card_comment', 'table' => 'kanban_card_comment',
'dst' => 'kanban_card_comment_card', 'dst' => 'kanban_card_comment_card',
'src' => null, 'src' => null,
], ],
]; ];

View File

@ -37,10 +37,10 @@ class KanbanColumnMapper extends DataMapperAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static $columns = [
'kanban_column_id' => ['name' => 'kanban_column_id', 'type' => 'int', 'internal' => 'id'], 'kanban_column_id' => ['name' => 'kanban_column_id', 'type' => 'int', 'internal' => 'id'],
'kanban_column_name' => ['name' => 'kanban_column_name', 'type' => 'string', 'internal' => 'name'], 'kanban_column_name' => ['name' => 'kanban_column_name', 'type' => 'string', 'internal' => 'name'],
'kanban_column_order' => ['name' => 'kanban_column_order', 'type' => 'int', 'internal' => 'order'], 'kanban_column_order' => ['name' => 'kanban_column_order', 'type' => 'int', 'internal' => 'order'],
'kanban_column_board' => ['name' => 'kanban_column_board', 'type' => 'int', 'internal' => 'board'], 'kanban_column_board' => ['name' => 'kanban_column_board', 'type' => 'int', 'internal' => 'board'],
]; ];
/** /**
@ -51,10 +51,10 @@ class KanbanColumnMapper extends DataMapperAbstract
*/ */
protected static $hasMany = [ protected static $hasMany = [
'cards' => [ 'cards' => [
'mapper' => KanbanCardMapper::class, 'mapper' => KanbanCardMapper::class,
'table' => 'kanban_card', 'table' => 'kanban_card',
'dst' => 'kanban_card_column', 'dst' => 'kanban_card_column',
'src' => null, 'src' => null,
], ],
]; ];

View File

@ -37,10 +37,10 @@ class KanbanLabelMapper extends DataMapperAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static $columns = [
'kanban_label_id' => ['name' => 'kanban_label_id', 'type' => 'int', 'internal' => 'id'], 'kanban_label_id' => ['name' => 'kanban_label_id', 'type' => 'int', 'internal' => 'id'],
'kanban_label_name' => ['name' => 'kanban_label_name', 'type' => 'string', 'internal' => 'name'], 'kanban_label_name' => ['name' => 'kanban_label_name', 'type' => 'string', 'internal' => 'name'],
'kanban_label_color' => ['name' => 'kanban_label_color', 'type' => 'int', 'internal' => 'color'], 'kanban_label_color' => ['name' => 'kanban_label_color', 'type' => 'int', 'internal' => 'color'],
'kanban_label_board' => ['name' => 'kanban_label_board', 'type' => 'int', 'internal' => 'board'], 'kanban_label_board' => ['name' => 'kanban_label_board', 'type' => 'int', 'internal' => 'board'],
]; ];
/** /**