mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-01-14 05:18:41 +00:00
61 lines
1.3 KiB
PHP
61 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.0
|
|
*
|
|
* @category TBD
|
|
* @package TBD
|
|
* @author OMS Development Team <dev@oms.com>
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link http://orange-management.com
|
|
*/
|
|
namespace Modules\HumanResourceManagement\Models;
|
|
|
|
use Modules\Admin\Models\AccountMapper;
|
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
|
|
|
class EmployeeMapper extends DataMapperAbstract
|
|
{
|
|
|
|
/**
|
|
* Columns.
|
|
*
|
|
* @var array<string, array>
|
|
* @since 1.0.0
|
|
*/
|
|
protected static $columns = [
|
|
'hr_staff_id' => ['name' => 'hr_staff_id', 'type' => 'int', 'internal' => 'id'],
|
|
'hr_staff_account' => ['name' => 'hr_staff_account', 'type' => 'int', 'internal' => 'account'],
|
|
];
|
|
|
|
protected static $ownsOne = [
|
|
'account' => [
|
|
'mapper' => AccountMapper::class,
|
|
'src' => 'hr_staff',
|
|
],
|
|
];
|
|
|
|
protected static $hasMany = [
|
|
];
|
|
|
|
/**
|
|
* Primary table.
|
|
*
|
|
* @var string
|
|
* @since 1.0.0
|
|
*/
|
|
protected static $table = 'hr_staff';
|
|
|
|
/**
|
|
* Primary field name.
|
|
*
|
|
* @var string
|
|
* @since 1.0.0
|
|
*/
|
|
protected static $primaryField = 'hr_staff_id';
|
|
}
|