TEAM41CS2340 / BuzzFunds

Spring 2014 CS 2340 Team 41 Group Project
0 stars 1 forks source link

DB Account object update #4

Closed aschenoni closed 10 years ago

aschenoni commented 10 years ago

The new DB Object needs to look like this:

{
        "name": "testuser-samplechecking",
        "type": "checking",
        "balance": "+420.69",
        "interest": "1.499",
        "history": [
                {
                        "id": "2addf89192a87395",
                        "name": "Account Created",
                        "category": "special",
                        "type": "d",
                        "amount": "420.69",
                        "insDate": "2014-02-14",
                        "effDate": "2014-02-14"
                }
        ]
}
aschenoni commented 10 years ago

@mischif @OzuYatamutsu Have you guys been using the balance object in the java code? I removed any reference to the balance field to make the account update using only information from the transaction list in M7. This is a much better way of doing things as it saves the server from having to compute a new balance for each account for each user on a regular basis. Therefore, I recommend the balance field be completely removed, due to the chance of inconsistency as well as the fact that it is computationally taxing on the server. What do you guys think? The new DB object would look like this:

{
        "name": "testuser-samplechecking",
        "type": "checking",
        "interest": "1.499",
        "history": [
                {
                        "id": "2addf89192a87395",
                        "name": "Account Created",
                        "category": "special",
                        "type": "d",
                        "amount": "420.69",
                        "insDate": "2014-02-14",
                        "effDate": "2014-02-14"
                }
        ]
}
mischif commented 10 years ago

I can live with this. I'll update code later tonight.