mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-02 23:13:40 +00:00
21 lines
756 B
TypeScript
21 lines
756 B
TypeScript
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[];
|
|
}
|