feat: add NotificationsService with SSE subject pool

This commit is contained in:
2026-07-05 23:01:26 +08:00
parent bb11ca1880
commit 5f14b9ff15
6 changed files with 167 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
import { IsString, IsNotEmpty, IsOptional, IsArray, IsInt } from 'class-validator';
export class CreateNotificationDto {
@IsArray()
@IsInt({ each: true })
recipientIds: number[];
@IsString()
@IsNotEmpty()
type: string;
@IsString()
@IsNotEmpty()
title: string;
@IsOptional()
@IsString()
content?: string;
@IsOptional()
@IsString()
link?: string;
}
export class NotificationQueryDto {
@IsOptional()
@IsInt()
after?: number;
@IsOptional()
@IsInt()
limit?: number;
}