Skip to content

Commit

Permalink
[feat] #37 Post 게시물 모집 상태 변경 dto 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
OJOJIN committed Jan 12, 2024
1 parent 6ef77b5 commit a3f5dee
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.gachon.checkmate.domain.post.dto.request;

import jakarta.validation.constraints.NotNull;
import org.gachon.checkmate.domain.post.entity.PostState;

public record PostStateUpdateRequestDto(
@NotNull(message = "게시글 상태를 입력해주세요") PostState postState
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.gachon.checkmate.domain.post.dto.response;

import lombok.Builder;
import org.gachon.checkmate.domain.post.entity.Post;

@Builder
public record PostStateUpdateResponseDto (
Long postId,
String postState
) {
public static PostStateUpdateResponseDto of(Post post) {
return PostStateUpdateResponseDto.builder()
.postId(post.getId())
.postState(post.getPostState().getDesc())
.build();
}
}

0 comments on commit a3f5dee

Please sign in to comment.