Skip to content

Commit 8895c4b

Browse files
committed
✨ feat: 파일 삭제 API DTO 추가
1 parent ef1b9c3 commit 8895c4b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { ApiProperty } from '@nestjs/swagger';
2+
import { Type } from 'class-transformer';
3+
import { IsInt } from 'class-validator';
4+
5+
export class FileDeleteRequestDto {
6+
@ApiProperty({
7+
example: 1,
8+
description: '파일 ID',
9+
})
10+
@IsInt({
11+
message: '숫자로 입력해주세요.',
12+
})
13+
@Type(() => Number)
14+
id: number;
15+
16+
constructor(partial: Partial<FileDeleteRequestDto>) {
17+
Object.assign(this, partial);
18+
}
19+
}

0 commit comments

Comments
 (0)