src/userInteraction/dto/create-user-interaction.dto.ts
Properties |
|
| interactionType |
Type : InteractionType
|
Decorators :
@IsNotEmpty()
|
| Optional projectId |
Type : number
|
Decorators :
@IsOptional()
|
| Optional userId |
Type : string
|
Decorators :
@IsOptional()
|
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;
}