feat: secure penalty catalog management

This commit is contained in:
Bastian Wagner
2026-08-01 13:17:44 +02:00
parent 45658e42fa
commit 17228a52db
12 changed files with 629 additions and 98 deletions

View File

@@ -0,0 +1,19 @@
import { ApiProperty } from '@nestjs/swagger';
import { Transform } from 'class-transformer';
import { IsNumber, IsString, Length, Max, Min } from 'class-validator';
export class UpdatePenaltyDTO {
@ApiProperty({ example: 'Zu spät kommen' })
@Transform(({ value }) =>
typeof value === 'string' ? value.trim() : value,
)
@IsString()
@Length(1, 120)
description: string;
@ApiProperty({ example: 5 })
@IsNumber({ maxDecimalPlaces: 2 })
@Min(0.01)
@Max(10000)
amount: number;
}