๐Ÿ“ฆ Kimsoo0119 / map_finder_backend

๐Ÿ“„ create-user-report.dto.ts ยท 27 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27import {
  IsEnum,
  IsNotEmpty,
  IsNumber,
  IsOptional,
  IsString,
} from 'class-validator';
import { Reason, ReportType } from '@prisma/client';

export class CreateUserReportDto {
  @IsNumber()
  @IsNotEmpty()
  targetUserId: number;

  @IsEnum(ReportType)
  @IsNotEmpty()
  reportType: ReportType;

  @IsEnum(Reason)
  @IsNotEmpty()
  reason: Reason;

  @IsString()
  @IsOptional()
  description: string;
}