File

src/notification/dto/update-notification.dto.ts

Extends

PartialType(CreateNotificationDto)

Index

Properties

Properties

Optional notifiedAt
Type : Date
Decorators :
@ApiProperty({example: '2023-08-14T08:00:00Z', description: 'Timestamp when the user was notified', required: false})
@IsDate()
@IsOptional()
Optional status
Type : NotificationStatus
Decorators :
@ApiProperty({example: 'READ', enum: NotificationStatus, description: 'Status of the notification', required: false})
@IsEnum(NotificationStatus)
@IsOptional()
import { ApiProperty, PartialType } from "@nestjs/swagger";
import { IsDate, IsEnum, IsOptional } from "class-validator";
import { CreateNotificationDto } from "./create-notification.dto";
import { NotificationStatus } from "../types/notification.enums";

export class UpdateNotificationDto extends PartialType(CreateNotificationDto) {
  @ApiProperty({
    example: "READ",
    enum: NotificationStatus,
    description: "Status of the notification",
    required: false,
  })
  @IsEnum(NotificationStatus)
  @IsOptional()
  status?: NotificationStatus;

  @ApiProperty({
    example: "2023-08-14T08:00:00Z",
    description: "Timestamp when the user was notified",
    required: false,
  })
  @IsDate()
  @IsOptional()
  notifiedAt?: Date;
}

results matching ""

    No results matching ""