mirror of
https://github.com/Karaka-Management/oms-ProjectManagement.git
synced 2026-02-12 22:08:40 +00:00
Unit test bug fixes
This commit is contained in:
parent
ac08d91d1f
commit
478c0cf2e5
|
|
@ -15,6 +15,8 @@
|
||||||
*/
|
*/
|
||||||
namespace Modules\ProjectManagement\Models;
|
namespace Modules\ProjectManagement\Models;
|
||||||
|
|
||||||
|
use Modules\Calendar\Models\CalendarMapper;
|
||||||
|
use Modules\Tasks\Models\TaskMapper;
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\DataStorage\Database\Query\Column;
|
use phpOMS\DataStorage\Database\Query\Column;
|
||||||
|
|
@ -58,8 +60,8 @@ class ProjectMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $hasOne = [
|
protected static $hasOne = [
|
||||||
'project' => [
|
'calendar' => [
|
||||||
'mapper' => \Modules\Calendar\Models\CalendarMapper::class,
|
'mapper' => CalendarMapper::class,
|
||||||
'src' => 'projectmanagement_project_calendar',
|
'src' => 'projectmanagement_project_calendar',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
@ -71,13 +73,6 @@ class ProjectMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $hasMany = [
|
protected static $hasMany = [
|
||||||
'sources' => [
|
|
||||||
'mapper' => \Modules\Tasks\Models\TaskMapper::class, /* mapper of the related object */
|
|
||||||
'relationmapper' => null, /* if the relation itself is a more complex object that has it's own mapper */
|
|
||||||
'table' => 'projectmanager_task_relation', /* table of the related object, null if no relation table is used (many->1) */
|
|
||||||
'dst' => 'projectmanager_task_relation_dst',
|
|
||||||
'src' => 'projectmanager_task_relation_src',
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -88,6 +83,14 @@ class ProjectMapper extends DataMapperAbstract
|
||||||
*/
|
*/
|
||||||
protected static $table = 'projectmanagement_project';
|
protected static $table = 'projectmanagement_project';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Primary field name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $primaryField = 'projectmanagement_project_id';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create media.
|
* Create media.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user