Re-format mappers

This commit is contained in:
Dennis Eichhorn 2018-05-31 19:47:26 +02:00
parent 1ce799d486
commit 291d52af14
3 changed files with 25 additions and 25 deletions

View File

@ -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'],
]; ];
/** /**

View File

@ -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'],
]; ];
/** /**

View File

@ -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,
], ],
]; ];