import { IsString, IsNotEmpty, IsOptional, IsArray, IsObject } from 'class-validator'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class CreateNotificationDto { @ApiProperty({ description: 'Notification title' }) @IsString() @IsNotEmpty() title: string; @ApiProperty({ description: 'Notification message' }) @IsString() @IsNotEmpty() message: string; @ApiProperty({ description: 'Notification type' }) @IsString() @IsNotEmpty() type: string; @ApiPropertyOptional({ description: 'User ID' }) @IsString() @IsOptional() userId?: string; @ApiPropertyOptional({ description: 'Phone number for SMS' }) @IsString() @IsOptional() phoneNumber?: string; @ApiPropertyOptional({ description: 'Push notification tokens', type: [String] }) @IsArray() @IsString({ each: true }) @IsOptional() pushTokens?: string[]; @ApiPropertyOptional({ description: 'Additional data' }) @IsObject() @IsOptional() data?: Record; }