Tour package booking, app release, new endpoints, more updates and fixes

This commit is contained in:
Stephanos A
2026-07-05 00:28:06 +03:00
parent 868639084c
commit 595be6e123
68 changed files with 2773 additions and 787 deletions

View File

@@ -28,6 +28,25 @@ import { IamGuard } from "../../common/iam-adapter";
export class SeatsController {
constructor(private service: SeatsService) {}
// ── Coach Availability ────────────────────────────────────────────────────
@Get('coaches/:scheduleId')
@SetMetadata('isPublic', true)
@ApiOperation({
summary: 'List coaches with remaining seat counts for a schedule',
description: 'Returns each coach assigned to the schedule with total, available, held, and booked seat counts. Optionally scoped to a specific origin→destination leg.',
})
@ApiParam({ name: 'scheduleId', description: 'TrainSchedule UUID' })
@ApiQuery({ name: 'originStationId', required: false, description: 'Scope availability to this origin station' })
@ApiQuery({ name: 'destinationStationId', required: false, description: 'Scope availability to this destination station' })
@ApiResponse({ status: 200, description: 'Coaches with seat availability counts' })
getCoachesWithAvailability(
@Param('scheduleId') scheduleId: string,
@Query('originStationId') originStationId?: string,
@Query('destinationStationId') destinationStationId?: string,
) {
return this.service.getCoachesWithAvailability(scheduleId, originStationId, destinationStationId);
}
// ── Seat Map ──────────────────────────────────────────────────────────────
@Get("seatmap/:scheduleId")
@SetMetadata('isPublic', true)