update dto
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
import { NotifChannelEnum } from '../interfaces/notification.interface';
|
|
||||||
import { IsArray, IsEnum } from 'class-validator';
|
import { IsArray, IsEnum } from 'class-validator';
|
||||||
|
import { NotifChannelEnum } from '../interfaces/notification.interface';
|
||||||
|
|
||||||
export class UpdatePreferenceDto {
|
export class UpdatePreferenceDto {
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
description: 'Notification type (SMS, PUSH, BOTH, or NONE)',
|
description: 'Notification channels (can be empty or contain any enum values)',
|
||||||
enum: NotifChannelEnum,
|
enum: NotifChannelEnum,
|
||||||
example: NotifChannelEnum.SMS,
|
isArray: true,
|
||||||
|
example: ['sms', 'push'],
|
||||||
})
|
})
|
||||||
@IsEnum(NotifChannelEnum)
|
|
||||||
@IsArray()
|
@IsArray()
|
||||||
@IsEnum(NotifChannelEnum, { each: true })
|
@IsEnum(NotifChannelEnum, { each: true })
|
||||||
channels!: NotifChannelEnum[];
|
channels!: NotifChannelEnum[];
|
||||||
|
|||||||
Reference in New Issue
Block a user