-
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.
Merge pull request #26 from Domitory-CheckMate/feature/25-post
[feat] 게시글 작성 api 구현
- Loading branch information
Showing
11 changed files
with
138 additions
and
9 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
7 changes: 7 additions & 0 deletions
7
src/main/java/org/gachon/checkmate/domain/checkList/repository/PostCheckListRepository.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,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 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
23 changes: 23 additions & 0 deletions
23
src/main/java/org/gachon/checkmate/domain/post/dto/request/PostCreateRequestDto.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,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 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
10 changes: 10 additions & 0 deletions
10
src/main/java/org/gachon/checkmate/domain/post/repository/PostRepository.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,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 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