-
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.
feat: 레포지토리에 member_id로 값을 찾을 수 있는 함수 생성
- Loading branch information
Showing
2 changed files
with
6 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
backend/src/main/java/sw_css/member/domain/repository/FacultyMemberRepository.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,8 +1,11 @@ | ||
package sw_css.member.domain.repository; | ||
|
||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import sw_css.member.domain.FacultyMember; | ||
|
||
public interface FacultyMemberRepository extends JpaRepository<FacultyMember, Long> { | ||
boolean existsByMemberId(Long memberId); | ||
|
||
Optional<FacultyMember> findByMemberId(Long memberId); | ||
} |
3 changes: 3 additions & 0 deletions
3
backend/src/main/java/sw_css/member/domain/repository/StudentMemberRepository.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,10 +1,13 @@ | ||
package sw_css.member.domain.repository; | ||
|
||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import sw_css.member.domain.StudentMember; | ||
|
||
public interface StudentMemberRepository extends JpaRepository<StudentMember, Long> { | ||
boolean existsById(Number studentId); | ||
|
||
boolean existsByMemberId(Number memberId); | ||
|
||
Optional<StudentMember> findByMemberId(Number memberId); | ||
} |