-
Notifications
You must be signed in to change notification settings - Fork 4
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 #49 from sjmjys954646/feature/3-branch-mentoring
멘토링 글 필터링 추가
- Loading branch information
Showing
12 changed files
with
206 additions
and
96 deletions.
There are no files selected for viewing
27 changes: 0 additions & 27 deletions
27
src/main/java/com/example/demo/config/utils/StateConverter.java
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
src/main/java/com/example/demo/config/utils/StateEnum.java
This file was deleted.
Oops, something went wrong.
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
5 changes: 5 additions & 0 deletions
5
src/main/java/com/example/demo/mentoring/MentorPostCategoryEnum.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,5 @@ | ||
package com.example.demo.mentoring; | ||
|
||
public enum MentorPostCategoryEnum { | ||
NULL, TITLE, WRITER, INTEREST; | ||
} |
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
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
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
22 changes: 22 additions & 0 deletions
22
src/main/java/com/example/demo/mentoring/MentorPostStateConverter.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,22 @@ | ||
package com.example.demo.mentoring; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
import javax.persistence.AttributeConverter; | ||
import java.util.Optional; | ||
|
||
@RequiredArgsConstructor | ||
@Component | ||
public class MentorPostStateConverter implements AttributeConverter<MentorPostStateEnum, String> { | ||
|
||
@Override | ||
public String convertToDatabaseColumn(MentorPostStateEnum attribute) { | ||
return attribute.getValue(); | ||
} | ||
|
||
@Override | ||
public MentorPostStateEnum convertToEntityAttribute(String dbData) { | ||
return MentorPostStateEnum.findOf(dbData); | ||
} | ||
} |
Oops, something went wrong.