mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 17:38:12 +00:00
fix u=issue
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
Reference in New Issue
Block a user