mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Coach edit related fixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { IsString, IsInt, IsOptional, IsArray, IsBoolean } from 'class-validator';
|
||||
import { Transform } from 'class-transformer';
|
||||
import { ApiProperty, ApiPropertyOptional, PartialType, OmitType } from '@nestjs/swagger';
|
||||
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
||||
|
||||
export class CreateTrainDto {
|
||||
@ApiProperty({ example: '301', description: 'Unique train service number' }) @IsString() number: string;
|
||||
@@ -32,7 +32,7 @@ export class CreateCoachDto {
|
||||
@IsOptional() @IsInt() sequence?: number;
|
||||
}
|
||||
|
||||
export class UpdateCoachDto extends PartialType(OmitType(CreateCoachDto, ['number'] as const)) {
|
||||
export class UpdateCoachDto extends PartialType(CreateCoachDto) {
|
||||
@ApiPropertyOptional({ example: 1, description: 'Sequence number for ordering' })
|
||||
@IsOptional() @IsInt() sequence?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user