mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-02-13 11:28:41 +00:00
Unit test fixes
This commit is contained in:
parent
9dc70af48b
commit
e81a1102f7
|
|
@ -13,7 +13,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
namespace Modules\HumanResources\Models;
|
namespace Modules\HumanResourceManagement\Models;
|
||||||
|
|
||||||
use Modules\Admin\Models\Account;
|
use Modules\Admin\Models\Account;
|
||||||
|
|
||||||
|
|
@ -52,4 +52,9 @@ class Employee {
|
||||||
public function getAccount() : Account {
|
public function getAccount() : Account {
|
||||||
return $this->account;
|
return $this->account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getId() : int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,14 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
namespace Modules\Admin\Models;
|
namespace Modules\HumanResourceManagement\Models;
|
||||||
|
|
||||||
|
use Modules\Admin\Models\AccountMapper;
|
||||||
|
use Modules\HumanResourceManagement\Models\EmployeeHistoryMapper;
|
||||||
|
use Modules\HumanResourceManagement\Models\EmployeeStatus;
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
||||||
class EmployeeMapper
|
class EmployeeMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -33,22 +36,22 @@ class EmployeeMapper
|
||||||
|
|
||||||
protected static $ownsOne = [
|
protected static $ownsOne = [
|
||||||
'account' => [
|
'account' => [
|
||||||
'mapper' => \Modules\Admin\Models\AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
'src' => 'hr_staff',
|
'src' => 'hr_staff',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
protected static $hasMany = [
|
protected static $hasMany = [
|
||||||
'history' => [
|
'history' => [
|
||||||
'mapper' => \Modules\HumanResourceManagement\Models\EmployeeHistoryMapper::class,
|
'mapper' => EmployeeHistoryMapper::class,
|
||||||
'relationmapper' => \Modules\HumanResourceManagement\Models\EmployeeHistoryMapper::class,
|
'relationmapper' => EmployeeHistoryMapper::class,
|
||||||
'table' => 'hr_history',
|
'table' => 'hr_history',
|
||||||
'src' => 'hr_history_staff',
|
'src' => 'hr_history_staff',
|
||||||
'dst' => null,
|
'dst' => null,
|
||||||
],
|
],
|
||||||
'status' => [
|
'status' => [
|
||||||
'mapper' => \Modules\HumanResourceManagement\Models\EmployeeStatus::class,
|
'mapper' => EmployeeStatus::class,
|
||||||
'relationmapper' => \Modules\HumanResourceManagement\Models\EmployeeStatus::class,
|
'relationmapper' => EmployeeStatus::class,
|
||||||
'table' => 'hr_status',
|
'table' => 'hr_status',
|
||||||
'src' => 'hr_status_staff',
|
'src' => 'hr_status_staff',
|
||||||
'dst' => null,
|
'dst' => null,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
namespace Modules\HumanResources\Models;
|
namespace Modules\HumanResourceManagement\Models;
|
||||||
|
|
||||||
use phpOMS\Datatypes\Enum;
|
use phpOMS\Datatypes\Enum;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
namespace Modules\HumanResources\Models;
|
namespace Modules\HumanResourceManagement\Models;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabaseType;
|
use phpOMS\DataStorage\Database\DatabaseType;
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ class StaffList
|
||||||
/**
|
/**
|
||||||
* Database instance.
|
* Database instance.
|
||||||
*
|
*
|
||||||
* @var \phpOMS\DataStorage\Database\Database
|
* @var \phpOMS\DataStorage\Database\Pool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $dbPool = null;
|
private $dbPool = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user