import { IsString, IsEnum, IsInt } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; import { ServiceClass } from '@prisma/client'; export class CreateTrainServiceDto { @ApiProperty({ example: '301' }) @IsString() number: string; @ApiProperty({ example: 'Express 301' }) @IsString() name: string; } export class CreateCoachDto { @ApiProperty() @IsString() tripId: string; @ApiProperty({ example: 'A' }) @IsString() label: string; @ApiProperty({ enum: ServiceClass }) @IsEnum(ServiceClass) serviceClass: ServiceClass; } export class CreateSeatBatchDto { @ApiProperty() @IsString() coachId: string; @ApiProperty({ example: 10 }) @IsInt() rows: number; @ApiProperty({ example: ['A', 'B', 'C', 'D'] }) cols: string[]; }