CREATE TABLE Checks (
ID serial primary key,
Amount int,
DateDeposited DATE,
Description varchar(255),
Picture varchar(255),
Reoccuring BOOLEAN
);
CREATE TABLE CheckTerm (
ID serial primary key,
CheckID int references CHECKS(ID),
Twenty int,
Thirty int,
Fifty int
);
CREATE TABLE TermTransactions (
ID serial primary key,
CheckTermID int references CheckTerm(ID),
TransactionDate DATE,
Account varchar (255),
Transaction int,
Description varchar(255),
Photo varchar(255)
);
-
Check
- User adds payment
- Amount
- Picture
- Description
- Reoccuring (true / false)
- Generated Automatically
- ID
- Date Deposited
-
CheckTerm
-
For the current status of check amount
-
Check is added computer calculates
- 20% of initial check
- 30% of initial check
- 50% of initial check
-
Transactions
-
Adjustment is made to (Twenty / Thirty / Fifty)
1. User adds transaction
1. Amount
2. Description
3. Photo
4. Account => 20 / 30 / 50
2. Generated Automatically
1. ID
2. CheckTermID
-
Check
- User adds check
- User deletes check
-
CheckTerm
- Computer adds term
- Computer modifies when user inputs transaction
- Computer fetches CheckTerm
-
Transactions
- User adds transaction
- User fetches transactions
- User deletes transactions
-
Photo on check
-
User adds transaction
- Transaction is posted to DB
- get checkterm amount
- subtract transaction from appropriate checkterm ammount and modify the checkterm.
Period | Total Income | Total Spent | Total Saved
------------- | ------------- |
March | 3000.00 | 1200.00 | 2800.00
TransactionID| Amount | Description | Photo
------------- | ------------- |
122 | 30.00 | Groceries | Photo
123 | 20.00 | Gas | Photo
124 | 100.00 | Insurance | Photo
Twenty | Thirty| Fifty | Remaining
------------- | ------------- |
600.00 | 54.23 | 100.10 | 754.23