mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-01-26 15:58:42 +00:00
Create GSDCustomerMapper.php
This commit is contained in:
parent
fdc30106fa
commit
5b92a182eb
72
Interfaces/GSD/Model/GSDCustomerMapper.php
Normal file
72
Interfaces/GSD/Model/GSDCustomerMapper.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.2
|
||||
*
|
||||
* @package Interfaces\GSD\Models
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://website.orange-management.de
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Interfaces\GSD\Models;
|
||||
|
||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||
|
||||
/**
|
||||
* Mapper class.
|
||||
*
|
||||
* @package Interfaces\GSD\Models
|
||||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*/
|
||||
final class GSDCustomerMapper extends DataMapperAbstract
|
||||
{
|
||||
/**
|
||||
* Columns.
|
||||
*
|
||||
* @var array<string, array<string, bool|string>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
||||
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
|
||||
'Kundennummer' => ['name' => 'Kundennummer', 'type' => 'string', 'internal' => 'number'],
|
||||
];
|
||||
|
||||
protected static $ownsOne = [
|
||||
'mainAddress' => [
|
||||
'mapper' => GSDAddress::class,
|
||||
'src' => 'AddressId',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Primary table.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $table = 'Kunden';
|
||||
|
||||
/**
|
||||
* Created at.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $createdAt = 'row_create_time';
|
||||
|
||||
/**
|
||||
* Primary field name.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $primaryField = 'row_id';
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user