mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-02-15 14:58:40 +00:00
Re-format mappers
This commit is contained in:
parent
1ce799d486
commit
291d52af14
|
|
@ -30,13 +30,13 @@ class AddressMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
'profile_address_id' => ['name' => 'profile_address_id', 'type' => 'int', 'internal' => 'id'],
|
'profile_address_id' => ['name' => 'profile_address_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'profile_address_type' => ['name' => 'profile_address_type', 'type' => 'int', 'internal' => 'type'],
|
'profile_address_type' => ['name' => 'profile_address_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
'profile_address_address' => ['name' => 'profile_address_address', 'type' => 'string', 'internal' => 'address'],
|
'profile_address_address' => ['name' => 'profile_address_address', 'type' => 'string', 'internal' => 'address'],
|
||||||
'profile_address_street' => ['name' => 'profile_address_street', 'type' => 'string', 'internal' => 'street'],
|
'profile_address_street' => ['name' => 'profile_address_street', 'type' => 'string', 'internal' => 'street'],
|
||||||
'profile_address_city' => ['name' => 'profile_address_city', 'type' => 'string', 'internal' => 'city'],
|
'profile_address_city' => ['name' => 'profile_address_city', 'type' => 'string', 'internal' => 'city'],
|
||||||
'profile_address_zip' => ['name' => 'profile_address_zip', 'type' => 'string', 'internal' => 'postal'],
|
'profile_address_zip' => ['name' => 'profile_address_zip', 'type' => 'string', 'internal' => 'postal'],
|
||||||
'profile_address_country' => ['name' => 'profile_address_country', 'type' => 'string', 'internal' => 'country'],
|
'profile_address_country' => ['name' => 'profile_address_country', 'type' => 'string', 'internal' => 'country'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class ContactElementMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
'profile_contact_id' => ['name' => 'profile_contact_id', 'type' => 'int', 'internal' => 'id'],
|
'profile_contact_id' => ['name' => 'profile_contact_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ class ProfileMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
'profile_account_id' => ['name' => 'profile_account_id', 'type' => 'int', 'internal' => 'id'],
|
'profile_account_id' => ['name' => 'profile_account_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'profile_account_image' => ['name' => 'profile_account_image', 'type' => 'int', 'internal' => 'image'],
|
'profile_account_image' => ['name' => 'profile_account_image', 'type' => 'int', 'internal' => 'image'],
|
||||||
'profile_account_birthday' => ['name' => 'profile_account_birthday', 'type' => 'DateTime', 'internal' => 'birthday'],
|
'profile_account_birthday' => ['name' => 'profile_account_birthday', 'type' => 'DateTime', 'internal' => 'birthday'],
|
||||||
'profile_account_account' => ['name' => 'profile_account_account', 'type' => 'int', 'internal' => 'account'],
|
'profile_account_account' => ['name' => 'profile_account_account', 'type' => 'int', 'internal' => 'account'],
|
||||||
'profile_account_calendar' => ['name' => 'profile_account_calendar', 'type' => 'int', 'internal' => 'calendar'],
|
'profile_account_calendar' => ['name' => 'profile_account_calendar', 'type' => 'int', 'internal' => 'calendar'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -46,17 +46,17 @@ class ProfileMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $ownsOne = [
|
protected static $ownsOne = [
|
||||||
'account' => [
|
'account' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
'src' => 'profile_account_account',
|
'src' => 'profile_account_account',
|
||||||
],
|
],
|
||||||
'image' => [
|
'image' => [
|
||||||
'mapper' => MediaMapper::class,
|
'mapper' => MediaMapper::class,
|
||||||
'src' => 'profile_account_image',
|
'src' => 'profile_account_image',
|
||||||
],
|
],
|
||||||
'calendar' => [
|
'calendar' => [
|
||||||
'mapper' => CalendarMapper::class,
|
'mapper' => CalendarMapper::class,
|
||||||
'src' => 'profile_account_calendar',
|
'src' => 'profile_account_calendar',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -68,10 +68,10 @@ class ProfileMapper extends DataMapperAbstract
|
||||||
*/
|
*/
|
||||||
protected static $hasMany = [
|
protected static $hasMany = [
|
||||||
'location' => [
|
'location' => [
|
||||||
'mapper' => AddressMapper::class,
|
'mapper' => AddressMapper::class,
|
||||||
'table' => 'profile_address',
|
'table' => 'profile_address',
|
||||||
'dst' => 'profile_address_account',
|
'dst' => 'profile_address_account',
|
||||||
'src' => null,
|
'src' => null,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user