import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { IsEnum, IsInt, IsOptional, IsPositive, IsString, MaxLength, } from 'class-validator'; import { WithdrawalReason } from '../../../generated/prisma'; export class WithdrawStockDto { @ApiProperty({ description: 'Anzahl Gläser bzw. Stück' }) @IsInt() @IsPositive() quantity!: number; @ApiProperty({ enum: WithdrawalReason }) @IsEnum(WithdrawalReason) reason!: WithdrawalReason; @ApiPropertyOptional() @IsOptional() @IsString() @MaxLength(500) notes?: string; }