Skip to content

Commit

Permalink
feat: 레포지토리에 member_id로 값을 찾을 수 있는 함수 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
llddang committed Aug 26, 2024
1 parent dab244f commit ef94e4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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);
}
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);
}

0 comments on commit ef94e4a

Please sign in to comment.