-
Notifications
You must be signed in to change notification settings - Fork 4
계좌 이체를 진행한다. #2
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
Open
this-is-spear
wants to merge
32
commits into
Exagonal-Study:feature/spear
Choose a base branch
from
this-is-spear:main
base: feature/spear
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
계좌 이체를 진행한다. #2
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
설명
계좌 이체 미션 진행했습니다. 아직 고민하지 못한 점은 다음과 같습니다.
요구사항 정제
계좌 번호를 입력해계좌를 생성한다.계좌 번호는 10자리로 구성되어있다.계좌 번호는 중복되어서는 안된다.자신 계좌 번호와상대방 계좌 번호그리고돈의 수량을 입력해 송금을 진행 한 후 계좌 잔액을 노출한다.상대방 계좌 번호가 존재하지 않으면 안된다.자신 계좌 번호가 존재하지 않으면 안된다.자신 계좌 번호와상대방 계좌 번호가 동일하면 안된다.돈의 수량은 0보다 커야한다.자신 계좌에 잔액이 입력한돈의 수량보다 많아야 한다.자신 계좌에서상대방의 계좌로 돈을 전달한다.자신의 계좌 번호,상대방 계좌 번호,송금한 돈의 수량,송금한 일자가 포함된다.자신 계좌잔액을 노출한다.계좌 번호,돈의 수량를 입력해 돈을 입급한다.계좌 번호가 존재하지 않으면 안된다.돈의 수량은 0보다 커야한다.계좌 번호,돈의 수량를 입력해 돈을 출금한다.계좌 번호가 존재하지 않으면 안된다.돈의 수량은 0보다 커야한다.계좌에 잔액이 입력한돈의 수량보다 많아야 한다.모델링
송금한 계좌,송금받은 계좌,송금한 돈의 수량,송금한 일자가 포함된다.계좌 번호,생성 일자 정보,잔액 정보,송금 이력을 포함한다.송금한 계좌 번호,송금받은 계좌 번호,송금한 돈의 수량,송금한 일자가 포함된다.계좌 번호,입출금 타입,돈의 수량,입출금 일자가 포함된다.입금
계좌 번호(AccountNumber)와돈의 수량(Money)을 입력해 돈을 입금한다.계좌 번호(AccountNumber)가 존재하지 않으면 안된다.돈의 수량(Money)은 0보다 커야한다.입출금 이력(transactionHisotry)에입금 기록(DEPOSIT)을 추가한다.출금
계좌 번호(AccountNumber)와돈의 수량(Money)을 입력해 돈을 출금한다.계좌 번호(AccountNumber)가 존재하지 않으면 안된다.돈의 수량(Money)은 0보다 커야한다.계좌에 잔액이 입력한돈의 수량(Money)보다 많아야 한다.입출금 이력(transactionHisotry)에출금 기록(WITHDRAW)을 추가한다.송금
자신 계좌(sourceAccount)와상대방 계좌(targetAccount),송금 일자(transferDate)그리고돈의 수량(transferMoney)을 입력해 송금한다.상대방 계좌(targetAccount)가 존재하지 않으면 안된다.자신 계좌(sourceAccount)가 존재하지 않으면 안된다.자신 계좌(sourceAccount)와상대방 계좌(targetAccount)가 동일하면 안된다.돈의 수량(transferMoney)은 0보다 커야한다.자신 계좌(sourceAccount)의입출금 이력(transactionHisotry)에는출금 기록(WITHDRAW)을 추가한다.상대방 계좌(targetAccount)의입출금 이력(transactionHisotry)에는입금 기록(DEPOSIT)을 추가한다.계좌
계좌 번호(AccountNumber),생성 일자 정보(createDate),잔액 정보(balance),송금 이력(transferHistories),입출금 이력(transactionHisotry)를 포함한다.입출금 이력(transactionHisotry)에는계좌 번호(AccountNumber),입출금 타입(type),돈의 수량(Money),입출금 일자(transactionDate)가 포함된다.입출금 이력(transactionHisotry)으로잔액 정보(balance)를 계산한다.계좌 번호(AccountNumber)는 10자리로 구성되어있다.잔액 정보(balance)는 0 이상이어야 한다.송금 이력(transferHistories)에는송금한 계좌(sourceAccountNumber),송금받은 계좌(targetAccountNumber),송금한 돈의 수량(transferMoney),송금한 일자(transferDate)가 포함된다.돈(Money)
금액 정보(amount)가 포함된다.클래스 다이어그램
classDiagram class Withdraw { - Account targetAccount - Money withdrawMoney - Date withdrawDate } class Deposit { - Account targetAccount - Money depositMoney - Date depositDate } class Transfer { - Account sourceAccount - Account targetAccount - money transferMoney - Date transferDate } class Account { - AccountNumber number - Money balance - List~TransferHistory~ transferHistories - Date createdDate } class AccountNumber { - String number } class TransferHistory { - AccountNumber sourceAccountNumber - AccountNumber targetAccountNumber - Money transferMoney - TransferDate transferDate } class Money { - int amount } Withdraw *-- Account Withdraw *-- Money Deposit *-- Account Deposit *-- Money Account *-- AccountNumber Account *-- Money Account *-- TransferHistory Transfer *-- Money Transfer *-- Account TransferHistory *-- Money TransferHistory *-- AccountNumbererd
erDiagram transfer_history { id long pk source_account_number varchar(200) target_account_number varchar(200) transfer_money int trasfer_date date } account { id long pk account_number varchar(200) created_date date } account_transaction { id long pk account_id long fk type enum "WITHDRAW, DEPOSIT" money int transaction_date date } account ||--o{ transfer_history: has account ||--o{ account_transaction: contains