- Implemented TourProgressController to handle API endpoints for tracking guided tours seen by users. - Created UserTourProgress entity to store the highest version of tours seen by each user. - Developed UserTourProgressRepository for database interactions related to user tour progress. - Introduced TourProgressService to manage business logic for marking tours as seen and retrieving seen maps. - Added comprehensive tests for API endpoints and entity behavior to ensure functionality and data integrity.
12 lines
417 B
TypeScript
12 lines
417 B
TypeScript
import type { TourDefinition } from './types';
|
|
import { appointmentsTour } from './tours/appointments';
|
|
|
|
/** هر صفحه تور خودش را در tours/ دارد و فقط اینجا ثبت میشود. */
|
|
export const TOURS: Record<string, TourDefinition> = {
|
|
[appointmentsTour.id]: appointmentsTour,
|
|
};
|
|
|
|
export function getTour(id?: string): TourDefinition | null {
|
|
return id ? TOURS[id] ?? null : null;
|
|
}
|