Add createdBy belongs to

This commit is contained in:
Dennis Eichhorn 2017-09-26 16:31:38 +02:00
parent c2fcfe5e55
commit bb3745d1b6
2 changed files with 9 additions and 1 deletions

View File

@ -91,7 +91,7 @@ class KanbanBoard implements \JsonSerializable
$this->description = $description;
}
public function getCreatedBy() : int
public function getCreatedBy()
{
return $this->createdBy;
}

View File

@ -18,6 +18,7 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\DataStorage\Database\Query\Builder;
use phpOMS\DataStorage\Database\Query\Column;
use phpOMS\DataStorage\Database\RelationType;
use Modules\Admin\Models\AccountMapper;
/**
* Mapper class.
@ -62,6 +63,13 @@ class KanbanBoardMapper extends DataMapperAbstract
],
];
static protected $belongsTo = [
'createdBy' => [
'mapper' => AccountMapper::class,
'src' => 'kanban_board_created_by',
],
];
/**
* Primary table.
*