mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-01-11 11:28:42 +00:00
Fix account mapper
This commit is contained in:
parent
bb3745d1b6
commit
bf476cc911
|
|
@ -133,7 +133,7 @@ class KanbanCard implements \JsonSerializable
|
|||
$this->description = $description;
|
||||
}
|
||||
|
||||
public function getCreatedBy() : int
|
||||
public function getCreatedBy()
|
||||
{
|
||||
return $this->createdBy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use phpOMS\DataStorage\Database\Query\Builder;
|
|||
use phpOMS\DataStorage\Database\Query\Column;
|
||||
use phpOMS\DataStorage\Database\RelationType;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use Modules\Admin\Models\AccountMapper;
|
||||
|
||||
/**
|
||||
* Mapper class.
|
||||
|
|
@ -51,6 +52,13 @@ class KanbanCardMapper extends DataMapperAbstract
|
|||
'kanban_card_created_by' => ['name' => 'kanban_card_created_by', 'type' => 'int', 'internal' => 'createdBy'],
|
||||
];
|
||||
|
||||
static protected $belongsTo = [
|
||||
'createdBy' => [
|
||||
'mapper' => AccountMapper::class,
|
||||
'src' => 'kanban_card_created_by',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Has many relation.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user