-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] 게시글 작성 api 구현 #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
09abc4a
[chore] #25 dto valid 의존성 추가
RyuKwanKon 6ed65d4
[feat] #25 제목 중복 error code 구현
RyuKwanKon 51eac60
[feat] #25 post 생성 static method 추가
RyuKwanKon c1ffdc9
[feat] #25 postCheckList 생성 static method 추가
RyuKwanKon 7f2274f
[feat] #25 postCheckList repository 생성
RyuKwanKon b3d79f0
[feat] #25 post repository 생성
RyuKwanKon 14c7e5b
[feat] #25 post id 일치 조건 method 이름 변경
RyuKwanKon 7a3a8bc
[feat] #25 post 생성 dto 구현
RyuKwanKon 0f7e1ec
[feat] #25 post 생성 controller 구현
RyuKwanKon d7484fb
[feat] #25 post 생성 service 구현
RyuKwanKon f8bf866
[feat] #25 post 생성시 user mapping 추가
RyuKwanKon 757890f
[fix] #25 enum class not null check로 변경
RyuKwanKon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
7 changes: 7 additions & 0 deletions
7
src/main/java/org/gachon/checkmate/domain/checkList/repository/PostCheckListRepository.java
This file contains hidden or 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,7 @@ | ||
package org.gachon.checkmate.domain.checkList.repository; | ||
|
||
import org.gachon.checkmate.domain.checkList.entity.PostCheckList; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface PostCheckListRepository extends JpaRepository<PostCheckList, Long> { | ||
} |
This file contains hidden or 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 hidden or 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
23 changes: 23 additions & 0 deletions
23
src/main/java/org/gachon/checkmate/domain/post/dto/request/PostCreateRequestDto.java
This file contains hidden or 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,23 @@ | ||
package org.gachon.checkmate.domain.post.dto.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
import lombok.NonNull; | ||
import org.gachon.checkmate.domain.checkList.dto.request.CheckListRequestDto; | ||
import org.gachon.checkmate.domain.post.entity.ImportantKeyType; | ||
import org.gachon.checkmate.domain.post.entity.RoomType; | ||
import org.gachon.checkmate.domain.post.entity.SimilarityKeyType; | ||
|
||
import java.time.LocalDate; | ||
|
||
public record PostCreateRequestDto( | ||
@NotBlank(message = "제목을 입력해주세요") String title, | ||
@NotBlank(message = "내용을 입력해주세요") String content, | ||
@NotNull(message = "중요 키워드를 입력해주세요") ImportantKeyType importantKey, | ||
@NotNull(message = "유사도를 입력해주세요") SimilarityKeyType similarityKey, | ||
@NotNull(message = "기숙사 유형을 입력해주세요") RoomType roomType, | ||
@NotNull(message = "모집 마감기간을 입력해주세요") LocalDate endDate, | ||
@NotNull(message = "체크리스트를 입력해주세요") CheckListRequestDto checkList | ||
) { | ||
} |
This file contains hidden or 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 hidden or 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
10 changes: 10 additions & 0 deletions
10
src/main/java/org/gachon/checkmate/domain/post/repository/PostRepository.java
This file contains hidden or 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 @@ | ||
package org.gachon.checkmate.domain.post.repository; | ||
|
||
import org.gachon.checkmate.domain.post.entity.Post; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.Optional; | ||
|
||
public interface PostRepository extends JpaRepository<Post, Long> { | ||
boolean existsByTitle(String title); | ||
} |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.