Katalog: seed 404 cwiczen i 31 pozycji sprzetu z CSV, partia Lydki (reset BUILTIN do seed_version 2)
This commit is contained in:
70
api/src/data/equipment.ts
Normal file
70
api/src/data/equipment.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import type { EquipmentKind, EquipmentSpec } from '../lib/equipmentSpec.js';
|
||||
|
||||
/** Slug po nazwie sprzętu (bez diakrytyków) — spójny key między seedem a testami. */
|
||||
export function equipmentSlugFromName(name: string): string {
|
||||
return name
|
||||
.normalize('NFKD')
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
.toLowerCase()
|
||||
.replace(/ł/g, 'l')
|
||||
.replace(/[^a-z0-9]+/g, '-')
|
||||
.replace(/^-+|-+$/g, '');
|
||||
}
|
||||
|
||||
export interface EquipmentSeed {
|
||||
slug: string;
|
||||
name: string;
|
||||
kind: EquipmentKind;
|
||||
spec: EquipmentSpec | null;
|
||||
description: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Equipment (machine/device) catalog — slug → Polish display name.
|
||||
* The slug is the stable key used by the exercise seed data; the name is what
|
||||
* admins and gym owners see and pick from.
|
||||
* `kind` determines the shape of the type-specific `spec` payload:
|
||||
* DUMBBELL/KETTLEBELL/CABLE/MACHINE → { minKg, maxKg } (available load range)
|
||||
* BARBELL/BENCH → { maxLoadKg } (max total load)
|
||||
* CARDIO → { maxSpeedKmh?, maxInclinePct? }
|
||||
* BODYWEIGHT/OTHER → no spec
|
||||
*/
|
||||
export const EQUIPMENT: EquipmentSeed[] = [
|
||||
{ slug: 'barbell', name: 'Sztanga', kind: 'BARBELL', spec: { maxLoadKg: 100 }, description: 'Sztanga z talerzami.' },
|
||||
{ slug: 'dumbbells', name: 'Hantle', kind: 'DUMBBELL', spec: { minKg: 2.5, maxKg: 25 }, description: 'Hantle wolne.' },
|
||||
{ slug: 'bodyweight', name: 'Masa ciała', kind: 'BODYWEIGHT', spec: null, description: 'Ćwiczenia z masą ciała.' },
|
||||
{ slug: 'cable', name: 'Wyciąg', kind: 'CABLE', spec: { minKg: 5, maxKg: 50 }, description: 'Wyciąg linowy.' },
|
||||
{ slug: 'dip-bars', name: 'Drążek do dipów', kind: 'BODYWEIGHT', spec: null, description: 'Stojak do dipów.' },
|
||||
{ slug: 'pull-up-bar', name: 'Drążek do podciągania', kind: 'BODYWEIGHT', spec: null, description: 'Drążek do podciągania.' },
|
||||
{ slug: 'leg-press', name: 'Leg press', kind: 'MACHINE', spec: { minKg: 20, maxKg: 120 }, description: 'Maszyna do prostowania nóg.' },
|
||||
{ slug: 'leg-curl', name: 'Leg curl', kind: 'MACHINE', spec: { minKg: 10, maxKg: 60 }, description: 'Maszyna do uginania nóg.' },
|
||||
// Katalog sprzętu z docs/database/maszyna-lub-przedmiot.csv (bez pozycji pokrywających się z powyższymi):
|
||||
{ slug: 'brama', name: 'Brama', kind: 'CABLE', spec: { minKg: 5, maxKg: 50 }, description: 'Brama siłowa (wyciąg wielostanowiskowy).' },
|
||||
{ slug: 'guma-oporowa', name: 'Guma oporowa', kind: 'OTHER', spec: null, description: 'Guma oporowa do asysty i oporu.' },
|
||||
{ slug: 'laweczka-plaska', name: 'Ławeczka płaska', kind: 'BENCH', spec: { maxLoadKg: 300 }, description: 'Ławka płaska ze stojakami.' },
|
||||
{ slug: 'laweczka-skosna', name: 'Ławeczka skośna', kind: 'BENCH', spec: { maxLoadKg: 300 }, description: 'Ławka ze skosem dodatnim/ujemnym.' },
|
||||
{ slug: 'suwnica-smitha', name: 'Suwnica smitha', kind: 'MACHINE', spec: { minKg: 5, maxKg: 120 }, description: 'Suwnica Smitha.' },
|
||||
{ slug: 'butterfly', name: 'Butterfly', kind: 'MACHINE', spec: { minKg: 5, maxKg: 80 }, description: 'Maszyna butterfly (rozpiętki).' },
|
||||
{ slug: 'trx', name: 'TRX', kind: 'OTHER', spec: null, description: 'Zawiesia TRX.' },
|
||||
{ slug: 'porecze-do-dipow', name: 'Poręcze do dipów', kind: 'BODYWEIGHT', spec: null, description: 'Poręcze do dipów.' },
|
||||
{ slug: 'hammer', name: 'Hammer', kind: 'MACHINE', spec: { minKg: 5, maxKg: 100 }, description: 'Maszyna hammer strength.' },
|
||||
{ slug: 'drazek', name: 'Drążek', kind: 'BODYWEIGHT', spec: null, description: 'Drążek do podciągania i zwisów.' },
|
||||
{ slug: 'kettlebell', name: 'Kettlebell', kind: 'KETTLEBELL', spec: { minKg: 4, maxKg: 32 }, description: 'Kettlebell.' },
|
||||
{ slug: 'kolka', name: 'Kółka', kind: 'OTHER', spec: null, description: 'Kółka gimnastyczne.' },
|
||||
{ slug: 'laweczka-rzymska', name: 'Ławeczka rzymska', kind: 'BENCH', spec: { maxLoadKg: 150 }, description: 'Ławka rzymska (hyperextension).' },
|
||||
{ slug: 'shoulder-press', name: 'Shoulder Press', kind: 'MACHINE', spec: { minKg: 5, maxKg: 100 }, description: 'Maszyna do wyciskania na barki.' },
|
||||
{ slug: 'sztanga-lamana', name: 'Sztanga łamana', kind: 'BARBELL', spec: { maxLoadKg: 100 }, description: 'Sztanga łamana (EZ).' },
|
||||
{ slug: 'triceps-press', name: 'Triceps Press', kind: 'MACHINE', spec: { minKg: 5, maxKg: 80 }, description: 'Maszyna na triceps.' },
|
||||
{ slug: 'modlitewnik', name: 'Modlitewnik', kind: 'BENCH', spec: { maxLoadKg: 60 }, description: 'Modlitewnik do uginania biceps.' },
|
||||
{ slug: 'pilka-gimnastyczne', name: 'Piłka gimnastyczne', kind: 'OTHER', spec: null, description: 'Piłka gimnastyczna (fitball).' },
|
||||
{ slug: 'ab-wheel', name: 'Ab wheel', kind: 'OTHER', spec: null, description: 'Kółko do brzucha.' },
|
||||
{ slug: 'podwyzszenie-schodki', name: 'Podwyższenie / Schodki', kind: 'OTHER', spec: null, description: 'Podwyższenie lub schodki do wchodzenia.' },
|
||||
{ slug: 'skrzynia', name: 'Skrzynia', kind: 'OTHER', spec: null, description: 'Skrzynia plyometryczna.' },
|
||||
{ slug: 'leg-extension-leg-curl', name: 'Leg Extension / Leg Curl', kind: 'MACHINE', spec: { minKg: 5, maxKg: 100 }, description: 'Maszyna do prostowania i uginania nóg.' },
|
||||
{ slug: 'drabinka', name: 'Drabinka', kind: 'OTHER', spec: null, description: 'Drabinka gimnastyczna.' },
|
||||
{ slug: 'kierownica-talerz', name: 'Kierownica/ Talerz', kind: 'OTHER', spec: null, description: 'Kierownica trójkątna lub talerz obciążeniowy.' },
|
||||
{ slug: 'suwnica-na-nogi', name: 'Suwnica na nogi', kind: 'MACHINE', spec: { minKg: 10, maxKg: 200 }, description: 'Suwnica (prasa) na nogi.' },
|
||||
{ slug: 'glute-kickback-machine', name: 'Glute Kickback Machine', kind: 'MACHINE', spec: { minKg: 5, maxKg: 80 }, description: 'Maszyna na pośladki (kickback).' },
|
||||
{ slug: 'adductor', name: 'Adductor', kind: 'MACHINE', spec: { minKg: 5, maxKg: 80 }, description: 'Maszyna na przywodziciele/odwodziciele.' },
|
||||
{ slug: 'maszyna-na-lydki', name: 'Maszyna na łydki', kind: 'MACHINE', spec: { minKg: 5, maxKg: 120 }, description: 'Maszyna do wspięć na palce.' },
|
||||
];
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user