mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 16:28:12 +00:00
Fare engine updates, seat class amount updates
This commit is contained in:
@@ -1,17 +1,31 @@
|
||||
import { IsString, IsInt, IsBoolean, IsOptional } from 'class-validator';
|
||||
import { IsString, IsInt, IsBoolean, IsOptional, IsIn } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
||||
|
||||
export class CreateSeatClassDto {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
coachTypeId: string;
|
||||
|
||||
@ApiProperty({ example: 'Economy Seat' })
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Standard economy seating' })
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
|
||||
@ApiProperty({ example: 45000, description: 'Base price in minor currency units' })
|
||||
@ApiPropertyOptional({ enum: ['LOCAL', 'INTERNATIONAL'] })
|
||||
@IsOptional()
|
||||
@IsIn(['LOCAL', 'INTERNATIONAL'])
|
||||
nationalityType?: string;
|
||||
|
||||
@ApiPropertyOptional({ enum: ['UPPER', 'MIDDLE', 'LOWER'] })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
bedPosition?: string;
|
||||
|
||||
@ApiProperty({ example: 3000, description: 'Per-km rate in minor units (tariff decimal × 100000)' })
|
||||
@IsInt()
|
||||
basePrice: number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user