*/ final class ContactMapper extends DataMapperFactory { /** * Columns. * * @var array * @since 1.0.0 */ public const COLUMNS = [ 'profile_contact_id' => ['name' => 'profile_contact_id', 'type' => 'int', 'internal' => 'id'], 'profile_contact_name1' => ['name' => 'profile_contact_name1', 'type' => 'string', 'internal' => 'name1'], 'profile_contact_name2' => ['name' => 'profile_contact_name2', 'type' => 'string', 'internal' => 'name2'], 'profile_contact_name3' => ['name' => 'profile_contact_name3', 'type' => 'string', 'internal' => 'name3'], 'profile_contact_description' => ['name' => 'profile_contact_description', 'type' => 'string', 'internal' => 'description'], 'profile_contact_company' => ['name' => 'profile_contact_company', 'type' => 'string', 'internal' => 'company'], 'profile_contact_job' => ['name' => 'profile_contact_job', 'type' => 'string', 'internal' => 'job'], 'profile_contact_birthday' => ['name' => 'profile_contact_birthday', 'type' => 'DateTime', 'internal' => 'birthday'], 'profile_contact_profile' => ['name' => 'profile_contact_profile', 'type' => 'int', 'internal' => 'profile'], ]; /** * Has one relation. * * @var array * @since 1.0.0 */ public const OWNS_ONE = [ 'image' => [ 'mapper' => MediaMapper::class, 'external' => 'profile_contact_image', ], ]; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'profile_contact'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD = 'profile_contact_id'; /** * Has many relation. * * @var array * @since 1.0.0 */ public const HAS_MANY = [ 'locations' => [ 'mapper' => AddressMapper::class, 'table' => 'profile_contact_addressrel', 'external' => 'profile_contact_addressrel_address', 'self' => 'profile_contact_addressrel_contact', ], /* 'contacts' => [ 'mapper' => ContactElementMapper::class, 'table' => 'profile_contact_element', 'self' => 'profile_contact_element_contact', 'external' => null, ], */ ]; }