import { ApiPropertyOptional } from '@nestjs/swagger'; import { IsDateString, IsOptional, IsString, Matches, MaxLength, } from 'class-validator'; import { DAY_MESSAGE, DAY_PATTERN } from './create-authority-notice.dto'; import { MAX_NOTICE_TEXT_LENGTH } from './update-authority-notice.dto'; export class MarkSentDto { @ApiPropertyOptional({ example: '2027-01-15', description: 'Vorgabe: heute (Berlin)', }) @IsOptional() @Matches(DAY_PATTERN, { message: `sentOn ${DAY_MESSAGE}` }) @IsDateString({ strict: true }) sentOn?: string; @ApiPropertyOptional({ description: 'z. B. E-Mail, Post' }) @IsOptional() @IsString() @MaxLength(MAX_NOTICE_TEXT_LENGTH) sentVia?: string; @ApiPropertyOptional({ description: 'Aktenzeichen' }) @IsOptional() @IsString() @MaxLength(MAX_NOTICE_TEXT_LENGTH) reference?: string; }