fix u=issue

This commit is contained in:
Marshal
2026-07-16 12:02:11 +00:00
parent fe29b38377
commit e8e12c1363
12 changed files with 416 additions and 37 deletions

View File

@@ -0,0 +1,39 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsArray, IsISO8601, IsOptional, IsString, IsUUID } from 'class-validator';
/**
* Admin maintenance reschedule: move a train's departure to a new date/time.
* Every allocated booking rides along (links and wagon assignments untouched);
* only the dates move — the schedule's train set, route, and window rule
* snapshot all stay exactly as they were.
*/
export class MaintenanceRescheduleDto {
@ApiProperty({
example: '2026-07-20T05:00:00.000Z',
description: 'New scheduled departure date/time (ISO 8601)',
})
@IsISO8601()
newDepartureDate!: string;
@ApiPropertyOptional({ description: 'Why the train is being moved (logged)' })
@IsOptional()
@IsString()
reason?: string;
@ApiPropertyOptional({
description: 'Client-side trigger tag (e.g. TRAIN_MAINTENANCE) — logged only',
})
@IsOptional()
@IsString()
trigger?: string;
@ApiPropertyOptional({
description:
"The bookings the client believes are aboard — informational; the server moves the schedule's actual bookings",
type: [String],
})
@IsOptional()
@IsArray()
@IsUUID('4', { each: true })
incomingBookingIds?: string[];
}