mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
29 lines
810 B
TypeScript
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;
|
|
}
|