notification module refactor

This commit is contained in:
2025-12-10 23:19:48 +03:30
parent 00d1c42331
commit 2d0c7dabee
16 changed files with 234 additions and 222 deletions
@@ -1,24 +1,24 @@
import { IsNotEmpty, IsEnum } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { NotificationTitle } from '../entities/notification.entity';
import { NotificationTitleEnum } from '../interfaces/notification.interface';
import { NotificationType } from '../interfaces/notification.interface';
export class CreatePreferenceDto {
@ApiProperty({
@ApiProperty({
description: 'Notification type (SMS, PUSH, BOTH, or NONE)',
enum: NotificationType,
example: NotificationType.SMS
example: NotificationType.SMS,
})
@IsEnum(NotificationType)
@IsNotEmpty()
notificationType!: NotificationType;
@ApiProperty({
@ApiProperty({
description: 'Notification title/type (e.g., order.created, review.created)',
enum: NotificationTitle,
example: NotificationTitle.ORDER_CREATED
enum: NotificationTitleEnum,
example: NotificationTitleEnum.ORDER_CREATED,
})
@IsEnum(NotificationTitle)
@IsEnum(NotificationTitleEnum)
@IsNotEmpty()
title!: NotificationTitle;
title!: NotificationTitleEnum;
}