File

src/userInteraction/dto/create-user-interaction.dto.ts

Index

Properties

Properties

interactionType
Type : InteractionType
Decorators :
@IsNotEmpty()
@IsEnum(InteractionType)
@ApiProperty({required: true})
Optional projectId
Type : number
Decorators :
@IsOptional()
@IsInt()
Optional userId
Type : string
Decorators :
@IsOptional()
@IsString()
import { ApiProperty } from "@nestjs/swagger";
import {
  IsOptional,
  IsString,
  IsEnum,
  IsInt,
  IsNotEmpty,
} from "class-validator";
import { InteractionType } from "../entities/user-interaction.entity";

export class CreateUserInteractionDto {
  @IsOptional()
  @IsString()
  userId?: string;

  @IsOptional()
  @IsInt()
  projectId?: number;

  @IsNotEmpty()
  @IsEnum(InteractionType)
  @ApiProperty({ required: true })
  interactionType: InteractionType;
}

results matching ""

    No results matching ""