Silownie: bytnosc i check-in QR - model GymPresence + sluznik (slot 30 min, merge luk), API /me/presence + POST /gyms/:id/check-in + admin occupancy/presence-stats + PATCH /plans/:id/gym; apka: strona check-inu, licznik teraz na karcie sirowni, modal przy starcie treningu (meldunek albo zmiana sirowni planu), historia wizyt w profilu, kod QR z drukiem; admin: kolumna teraz na liscie, karta telemetrii bytnosci, modal Kod QR (link na app)
This commit is contained in:
@@ -191,6 +191,30 @@ export interface GymOwner {
|
||||
email: string;
|
||||
}
|
||||
|
||||
// ---------- bytność (telemetria admina, GET /admin/gyms/occupancy | /admin/gyms/:id/presence-stats) ----------
|
||||
export interface AdminOccupancyRow {
|
||||
gymId: string;
|
||||
name: string;
|
||||
capacity: number | null;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface GymPresenceStatsData {
|
||||
visits: number;
|
||||
avgStayMinutes: number | null;
|
||||
heatmap: { day: number; hour: number; count: number }[];
|
||||
topGyms: { gymId: string; gymName: string; visits: number }[];
|
||||
peak: number;
|
||||
topEquipment: { equipmentId: string; name: string; nameEn: string | null; count: number }[];
|
||||
live: number;
|
||||
visitsPerDay: number;
|
||||
}
|
||||
|
||||
export interface GymPresenceStatsResponse {
|
||||
gym: { id: string; name: string; kind: GymKind; capacity: number | null };
|
||||
stats: GymPresenceStatsData;
|
||||
}
|
||||
|
||||
export type ClaimStatus = 'PENDING' | 'APPROVED' | 'REJECTED';
|
||||
|
||||
export interface GymClaimDocument {
|
||||
|
||||
Reference in New Issue
Block a user