Skip to content

Commit

Permalink
πŸ—ƒοΈ νšŒμ› νƒˆν‡΄ κΈ°λŠ₯(out port μ˜μ†μ„±)(#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Jul 26, 2022
1 parent f2df83f commit dbe3d69
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package hexagonal.api.member.adapter.out.persistence;

import hexagonal.api.member.application.port.out.DeleteMemberPort;
import hexagonal.api.member.application.port.out.FindMemberPort;
import hexagonal.api.member.application.port.out.SaveMemberPort;
import hexagonal.api.member.application.port.out.UpdateMemberPort;
Expand All @@ -13,7 +14,8 @@

@RequiredArgsConstructor
@Component
class MemberPersistenceAdapter implements FindMemberPort, SaveMemberPort, UpdateMemberPort {
class MemberPersistenceAdapter implements FindMemberPort, SaveMemberPort, UpdateMemberPort,
DeleteMemberPort {

private final MemberRepository memberRepository;

Expand Down Expand Up @@ -45,4 +47,12 @@ public Long updateMember(MemberJpaEntity memberJpaEntity) {
MemberJpaEntity saveEntity = memberRepository.save(memberJpaEntity);
return saveEntity.getId();
}

@Override
public Boolean deleteMember(Long id) {
memberRepository.deleteById(id);
return true;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hexagonal.api.member.application.port.out;

public interface DeleteMemberPort {
Boolean deleteMember(Long id);
}

0 comments on commit dbe3d69

Please sign in to comment.