Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADRの導入の検討 #18

Merged
merged 3 commits into from Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .adr-dir
@@ -0,0 +1 @@
doc
@@ -0,0 +1,25 @@
# 1. リポジトリのインターフェースをUseCase層に置く

Date: 2020-12-07

## ステータス(Status)

Accepted

## コンテキスト(Context)

予約をする、というユースケースを実装するにあたり、Repositoryのインターフェース定義が必要になった。
前回(Reservation1)の方では、Domain層にインターフェースを置いていたが、
今回は『リポジトリは、外界とのやり取りをするものであり、ドメイン層の持ち物では無い』という考え方が挙がってきた。

## 決定(Decision)

今回は『リポジトリは、外界とのやり取りをするものであり、ドメイン層の持ち物では無い』という考え方でトライしてみることとした。
したがって、外界とのやり取りをするための Interface は UseCase 層に置くこととする。


## 結果(Consequences)

UseCase層にRepositoryInterfacesというディレクトリを切る。
その中に、I予約Repositoryインターフェースを用意する。