Model evolving
2018-04-09 11:14:04 7 举报
Model Evoving
作者其他创作
大纲/内容
聚合根
TransferService
LimitedATMAccount
+ withdraw(double amount)+ calculateInterest( )+ setLimit(double limit)
Account
CustomerInfo
演变一
Amount must be an integer
CashTransaction
Transaction
+ fromAccount+ toAccounts- amount
+ execute()
IWithdrawable
+ withdraw(double amount)
+ calculateInterest( )
After
ATMAccount
+ withdraw(double amount)+ calculateInterest( )
Apple PayTransaction
+ apply(Transaction)
To Account must support Apple Pay
BitCoinTransaction
Address
Before
Constraints:
Amount must be greater than 0
演变二
Journal
ILimitedWithdrawable
+ setLimit(double limit)
Model Evolving
OnlineAccount
0 条评论
下一页