Files
edr-platform/apps/edr-freight-api/src/modules/rule-engine/dto/rate-change-request.dto.ts
2026-07-17 10:15:26 +00:00

29 lines
810 B
TypeScript

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsOptional, IsString, IsUUID, MaxLength, ValidateNested } from 'class-validator';
import { UpdateRateDto } from './update-rate.dto';
export class SubmitRateChangeDto {
@ApiProperty({ description: 'The LIVE rate to reprice' })
@IsUUID()
rateId!: string;
@ApiProperty({
description:
'Proposed field changes. The live rate keeps its current values until this is approved.',
type: UpdateRateDto,
})
@ValidateNested()
@Type(() => UpdateRateDto)
update!: UpdateRateDto;
}
export class DecideRateChangeDto {
@ApiPropertyOptional({ description: 'Optional note shown to the requester' })
@IsOptional()
@IsString()
@MaxLength(1000)
decisionNote?: string;
}