This repository has been archived by the owner on Dec 21, 2024. It is now read-only.
-
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.
Browse files
Browse the repository at this point in the history
…#4 [feat] - post delete
- Loading branch information
Showing
3 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
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
30 changes: 30 additions & 0 deletions
30
src/main/java/com/team20/t4/post/PostUpdateRequestDto.java
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,30 @@ | ||
package com.team20.t4.post; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.Size; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class PostUpdateRequestDto { | ||
private Long postId; | ||
@Size(max = 255, message = "title은 255자 이하여야합니다.") | ||
private String title; | ||
@Size(max = 1000, message = "content는 1000자 이하여야합니다.") | ||
private String content; | ||
@Size(max = 255, message = "chatRoomLink는 255자 이하여야합니다.") | ||
private String chatRoomLink; | ||
// private PlanSaveRequestDto plan; | ||
|
||
public Post toEntity(Long postId) { | ||
return Post.builder() | ||
.id(postId) | ||
.title(title) | ||
.content(content) | ||
.chatRoomLink(chatRoomLink) | ||
.build(); | ||
} | ||
} |