feat: add NotificationsService with SSE subject pool
This commit is contained in:
33
apps/server/src/notifications/dto/notification.dto.ts
Normal file
33
apps/server/src/notifications/dto/notification.dto.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user