mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 05:18:11 +00:00
Initial commit of edr-passenger-api alpha version
This commit is contained in:
20
apps/edr-passenger-api/src/modules/fleet/fleet.dto.ts
Normal file
20
apps/edr-passenger-api/src/modules/fleet/fleet.dto.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
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[];
|
||||
}
|
||||
Reference in New Issue
Block a user