import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"
import { IsInt, IsNotEmpty, IsOptional, IsString } from "class-validator"

export class CreateNotificationDto {
  @ApiProperty({
    description: "ID of the user to whom the notification belongs",
    example: 123,
  })
  @IsInt()
  user_id: number

  @ApiProperty({
    description: "Title of the notification",
    example: "New message received",
  })
  @IsString()
  @IsNotEmpty()
  title: string

  @ApiProperty({
    description: "Content/message of the notification",
    example: "You have a new message in your inbox.",
  })
  @IsString()
  @IsNotEmpty()
  message: string

  @ApiPropertyOptional({
    description: "Additional data for the notification",
    example: { url: "https://example.com/message/123" },
  })
  @IsOptional()
  data?: any
}
