Open antikhonov opened 9 years ago
Did the following. Added field "commited" to the Transaction class with default value of true. If the entity is fetched from the database, it is always true. If not, the constructor sets it to false.
Created test case for update. Transaction can be updated, but account balance id not. Need to deal with it.
Was mistaken. Update looks good. Current logic:
Changed logic a little bit. getBalance method now returns the sum of initial amount and the balance
Now to deal with tags. Tags are passed as a string and needs to be parsed. Tags that are not found must be created.
Unlike other entities, the transactions affect other entities: accounts. Thus a decision needs to be made how to handle this logic. This needs to be done either in the Transaction class itslef or in the TransactionEntity class which actually acts as the transaction manager. The latter is preferred IMO.
Add basic functionality to the Transaction and TransactionEntity classes.