-
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.
Merge pull request #5 from f-lab-edu/feature/1
[#1] repository에서 도메인 모델 분리
- Loading branch information
Showing
15 changed files
with
116 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package com.study.bookcafe.dao; | ||
|
||
import com.study.bookcafe.entity.BookEntity; | ||
import com.study.bookcafe.domain.Book; | ||
|
||
import java.util.List; | ||
|
||
public interface BookRepository { | ||
BookEntity findById(long bookId); | ||
List<BookEntity> findByIdList(List<Long> bookIdList); | ||
Book findById(long bookId); | ||
List<Book> findByIdList(List<Long> bookIdList); | ||
} |
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,13 +1,12 @@ | ||
package com.study.bookcafe.dao; | ||
|
||
import com.study.bookcafe.entity.BorrowEntity; | ||
|
||
import com.study.bookcafe.domain.Borrow; | ||
import java.util.List; | ||
|
||
public interface BorrowRepository { | ||
|
||
BorrowEntity findById(long borrowId); | ||
BorrowEntity save(BorrowEntity borrowEntity); | ||
List<BorrowEntity> save(List<BorrowEntity> borrowEntityList); | ||
Borrow findById(long borrowId); | ||
Borrow save(Borrow borrow); | ||
List<Borrow> save(List<Borrow> borrowList); | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package com.study.bookcafe.dao; | ||
|
||
import com.study.bookcafe.entity.MemberEntity; | ||
import com.study.bookcafe.domain.Member; | ||
|
||
public interface MemberRepository { | ||
MemberEntity findById(long memberId); | ||
Member findById(long memberId); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
package com.study.bookcafe.entity; | ||
|
||
import com.study.bookcafe.vo.Period; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.sql.Timestamp; | ||
import lombok.NonNull; | ||
|
||
@Builder | ||
@Getter | ||
public class BorrowEntity { | ||
private long id; // 대출 ID | ||
@NonNull | ||
private MemberEntity member; // 회원 | ||
@NonNull | ||
private BookEntity book; // 도서 | ||
private Timestamp borrowDate; // 대출 날짜 | ||
private Timestamp returnDate; // 반납 날짜 | ||
private Period period; // 대출 기간 | ||
} |
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
Oops, something went wrong.