-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
server/src/post/v1/dto/delete-meeting-post/post-v1-delete-post-param.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsNotEmpty, IsNumber } from 'class-validator'; | ||
|
||
export class PostV1DeletePostParamDto { | ||
@ApiProperty({ | ||
description: '게시글 ID', | ||
example: 1, | ||
}) | ||
@IsNotEmpty() | ||
@IsNumber() | ||
postId: number; | ||
} |
37 changes: 37 additions & 0 deletions
37
server/src/post/v1/dto/update-meeting-post/post-v1-update-post-body.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString, IsNotEmpty } from 'class-validator'; | ||
|
||
/** | ||
* 게시물 수정 body Dto | ||
* @author @rdd9223 | ||
*/ | ||
export class PostV1UpdatePostBodyDto { | ||
@ApiProperty({ | ||
example: '알고보면 쓸데있는 개발 프로세스', | ||
description: '모임 제목', | ||
required: true, | ||
}) | ||
@IsNotEmpty() | ||
@IsString() | ||
title: string; | ||
|
||
@ApiProperty({ | ||
example: | ||
'https://makers-web-img.s3.ap-northeast-2.amazonaws.com/meeting/2023/04/12/7bd87736-b557-4b26-a0d5-9b09f1f1d7df', | ||
description: '게시글 이미지 리스트', | ||
required: true, | ||
isArray: true, | ||
}) | ||
@IsNotEmpty() | ||
@IsString({ each: true }) | ||
images: string[]; | ||
|
||
@ApiProperty({ | ||
example: 'api 가 터졌다고? 깃이 터졌다고?', | ||
description: '게시글 내용', | ||
required: true, | ||
}) | ||
@IsNotEmpty() | ||
@IsString() | ||
contents: string; | ||
} |
12 changes: 12 additions & 0 deletions
12
server/src/post/v1/dto/update-meeting-post/post-v1-update-post-param.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsNotEmpty, IsNumber } from 'class-validator'; | ||
|
||
export class PostV1UpdatePostParamDto { | ||
@ApiProperty({ | ||
description: '게시글 ID', | ||
example: 1, | ||
}) | ||
@IsNotEmpty() | ||
@IsNumber() | ||
postId: number; | ||
} |
10 changes: 10 additions & 0 deletions
10
server/src/post/v1/dto/update-meeting-post/post-v1-update-post-response.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { PickType } from '@nestjs/swagger'; | ||
import { Post } from 'src/entity/post/post.entity'; | ||
|
||
export class PostV1UpdatePostResponseDto extends PickType(Post, [ | ||
'id', | ||
'title', | ||
'contents', | ||
'updatedDate', | ||
'images', | ||
]) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters