prefrences
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
import { PartialType } from '@nestjs/swagger';
|
||||
import { CreatePreferenceDto } from './create-preference.dto';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { NotificationType } from '../interfaces/notification.interface';
|
||||
import { IsNotEmpty } from 'class-validator';
|
||||
import { IsEnum } from 'class-validator';
|
||||
|
||||
export class UpdatePreferenceDto extends PartialType(CreatePreferenceDto) {}
|
||||
export class UpdatePreferenceDto {
|
||||
@ApiProperty({
|
||||
description: 'Notification type (SMS, PUSH, BOTH, or NONE)',
|
||||
enum: NotificationType,
|
||||
example: NotificationType.SMS,
|
||||
})
|
||||
@IsEnum(NotificationType)
|
||||
@IsNotEmpty()
|
||||
notificationType!: NotificationType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user