-
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
feat: bookMark
- Loading branch information
Showing
16 changed files
with
73 additions
and
64 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
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
29 changes: 17 additions & 12 deletions
29
src/main/java/com/dear/domain/bookMark/presentation/dto/res/BookMarkLoadRes.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 |
---|---|---|
@@ -1,29 +1,34 @@ | ||
package com.dear.domain.bookMark.presentation.dto.res; | ||
|
||
import com.dear.domain.professor.domain.ProfessorEntity; | ||
import com.dear.domain.major.domain.MajorEntity; | ||
import com.dear.domain.school.domain.SchoolEntity; | ||
import com.dear.domain.user.domain.UserEntity; | ||
|
||
import java.util.Optional; | ||
|
||
public record BookMarkLoadRes( | ||
String id, | ||
String name, | ||
String content, | ||
String type | ||
String Id, | ||
String Name, | ||
Optional<String> school, | ||
Optional<String> major | ||
) { | ||
public static BookMarkLoadRes of(ProfessorEntity professorEntity, boolean isBookMarked){ | ||
public static BookMarkLoadRes of(UserEntity professorEntity, Optional<MajorEntity> majorEntity) { | ||
return new BookMarkLoadRes( | ||
professorEntity.getId().toString(), | ||
professorEntity.getUser().getName(), | ||
professorEntity.getMajor().getMClass(), | ||
professorEntity.getUser().getRole().toString() | ||
professorEntity.getName(), | ||
Optional.ofNullable(professorEntity.getSchools()) | ||
.map(SchoolEntity::getSchoolName), | ||
Optional.ofNullable(majorEntity.orElse(null)) | ||
.map(MajorEntity::getMClass) | ||
); | ||
} | ||
|
||
public static BookMarkLoadRes of(SchoolEntity schoolEntity, boolean isBookMarked){ | ||
public static BookMarkLoadRes of(SchoolEntity schoolEntity){ | ||
return new BookMarkLoadRes( | ||
schoolEntity.getSeq(), | ||
schoolEntity.getSchoolName(), | ||
schoolEntity.getSchoolIntro(), | ||
"UNIVERCCITY" | ||
null, | ||
null | ||
); | ||
} | ||
} |
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
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
6 changes: 5 additions & 1 deletion
6
src/main/java/com/dear/domain/professor/dto/response/ProfessorLoadResponse.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
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
14 changes: 7 additions & 7 deletions
14
src/main/java/com/dear/global/properties/NeisProperties.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
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