Files
lub-web-monorepo/apps/backend/src/contact-requests/contact-requests.dto.ts
T
t.leonards ae33874ae0
Deploy to Dev Server / deploy (push) Has been cancelled
initial commit
2026-03-26 16:10:45 +01:00

42 lines
738 B
TypeScript

import { IsEmail, IsString, IsBoolean, IsOptional, MinLength, MaxLength } from 'class-validator';
export class CreateContactRequestDto {
@IsString()
@MinLength(2)
@MaxLength(100)
name: string;
@IsEmail()
email: string;
@IsString()
@MinLength(1)
@MaxLength(100)
serviceType: string; // Slug aus dem Services-Katalog
@IsString()
@MaxLength(2000)
message: string;
@IsBoolean()
@IsOptional()
prefersCallback?: boolean;
@IsString()
@IsOptional()
phoneNumber?: string;
@IsString()
@IsOptional()
userId?: string; // Falls der User eingeloggt ist
}
export class UpdateContactRequestDto {
@IsBoolean()
@IsOptional()
isProcessed?: boolean;
@IsString()
@IsOptional()
notes?: string;
}