*/ final class MachineMapper extends DataMapperFactory { /** * Columns. * * @var array * @since 1.0.0 */ public const COLUMNS = [ 'production_machine_id' => ['name' => 'production_machine_id', 'type' => 'int', 'internal' => 'id'], 'production_machine_capacity' => ['name' => 'production_machine_capacity', 'type' => 'int', 'internal' => 'capacity'], 'production_machine_equipment' => ['name' => 'production_machine_equipment', 'type' => 'int', 'internal' => 'equipment'], 'production_machine_unitmeasure' => ['name' => 'production_machine_unitmeasure', 'type' => 'string', 'internal' => 'unitOfMeasure'], 'production_machine_unit' => ['name' => 'production_machine_unit', 'type' => 'int', 'internal' => 'unit'], ]; /** * Has one relation. * * @var array * @since 1.0.0 */ public const OWNS_ONE = [ 'equipment' => [ 'mapper' => EquipmentMapper::class, 'external' => 'production_machine_equipment', ], ]; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'production_machine'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD = 'production_machine_id'; }