*/ final class InvestmentObjectMapper extends DataMapperFactory { /** * Columns. * * @var array * @since 1.0.0 */ public const COLUMNS = [ 'investmgmt_option_id' => ['name' => 'investmgmt_option_id', 'type' => 'int', 'internal' => 'id'], 'investmgmt_option_name' => ['name' => 'investmgmt_option_name', 'type' => 'string', 'internal' => 'name'], 'investmgmt_option_description' => ['name' => 'investmgmt_option_description', 'type' => 'string', 'internal' => 'description'], 'investmgmt_option_link' => ['name' => 'investmgmt_option_link', 'type' => 'string', 'internal' => 'link'], 'investmgmt_option_supplier' => ['name' => 'investmgmt_option_supplier', 'type' => 'int', 'internal' => 'supplier'], 'investmgmt_option_supplier_alt' => ['name' => 'investmgmt_option_supplier_alt', 'type' => 'string', 'internal' => 'supplierName'], 'investmgmt_option_item' => ['name' => 'investmgmt_option_item', 'type' => 'int', 'internal' => 'item'], 'investmgmt_option_approved' => ['name' => 'investmgmt_option_approved', 'type' => 'bool', 'internal' => 'approved'], 'investmgmt_option_investment' => ['name' => 'investmgmt_option_investment', 'type' => 'int', 'internal' => 'investment'], ]; /** * Has one relation. * * @var array * @since 1.0.0 */ public const OWNS_ONE = [ 'supplier' => [ 'mapper' => SupplierMapper::class, 'external' => 'investmgmt_option_supplier', ], 'item' => [ 'mapper' => ItemMapper::class, 'external' => 'investmgmt_option_item', ], ]; /** * Has many relation. * * @var array * @since 1.0.0 */ public const HAS_MANY = [ 'files' => [ 'mapper' => MediaMapper::class, /* mapper of the related object */ 'table' => 'investmgmt_option_media', /* table of the related object, null if no relation table is used (many->1) */ 'external' => 'investmgmt_option_media_media', 'self' => 'investmgmt_option_media_option', ], 'notes' => [ 'mapper' => EditorDocMapper::class, /* mapper of the related object */ 'table' => 'investmgmt_option_note', /* table of the related object, null if no relation table is used (many->1) */ 'external' => 'investmgmt_option_note_doc', 'self' => 'investmgmt_option_note_option', ], 'amountGroups' => [ 'mapper' => AmountGroupMapper::class, 'table' => 'investmgmt_amount_group', 'self' => 'investmgmt_amount_group_option', 'external' => null, ], ]; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'investmgmt_option'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD = 'investmgmt_option_id'; }