Skip to content

Resource Model

Zacck Osiemo edited this page Mar 9, 2018 · 7 revisions

17/02/2018

Reports expected by user

  • Total Expenses so far
  • Current unspent balance
  • Expenses for a filter (category, location, section, type)
  • List of purchased stuff

16/02/2018

NEW ER

15/02/2018

  1. Added ER Diagram for some basic entities
  2. Work Remaining is to add Savings and Reports Entities

After going through the app with we came up with the following ER Diagram for the application this will likely be updated soon ER Diagram 15/02/2018

User

  • Can authenticate
  • Can have more than one Budget
  • Can delete budget

User Fields

Name: Name of user

  • id: key for this user
  • auth_token: federated token used by user to authenticate
  • auth_provider: federated id provider for this user
  • budgets: list of user's budgets

Money Log

  • Contains an expenses log
  • Contains at least one shopping list per section, per category
  • Contains an income log
  • Contains Budget Reports
  • A budget will usually be split into 1 or more sections
  • Contains a spending plan one that is generated from shopping list(s)

Money Log Fields

  • Name: Name of the budget
  • Period: The date/time range the budget is valid in
  • Amount in: Amount of resources this budget has been allocated
  • Amount out: Amount of resources this budget had expended
  • id: a key that identifies this budget
  • sections: number of splits for a budget
  • spending_categories: categories for spending
  • income_categories: categories of income
  • user_id: id of budget owner
  • is_active: boolean that checks whether this budget is currently in use

Log Category Summary

  • This a curated list of chunks one needs to spend on
  • Each budget contains only one of these

this is a collection of log categories

Log Category

  • This is an area for a planned chunk of expense in a budget e.g Household
  • This is generated as an application of a filter (category, location, section)

Log Category Fields

  • Name: Name of the item to be bought
  • Comments: Any comments to go with this shopping item
  • Category: Category of this planned expense
  • budget_id: id of the budget this category belongs too

Wants List

  • This will be created once and locked for a budget (once the budget has begun this will be locked)
  • Contains a list of broken down planned purchases for a budget's sections
  • Can also be a filter of a section's list by any of the other factors (location, category)
  • Budgets will contain at least one of these (each budget section gets one of this)

Wants List Item (Uses Purchase Item Schema)

  • This is an item of purchase for this budget

Wants List Item Field

  • Name: Name of item to be purchased
  • Price: Price of item to be purchased
  • Location: Location of purchase for this item
  • Category: Category that this shopping item falls under from its expense plan item
  • Type: The type of purchase that this item falls under
  • budget_id: id of the budget this want falls in
  • price: a price of an item as entered at a shop or as planned
  • status: status of this item could be want | purchase | expense | pending

Purchase List

  • Contains a list of broken down planned purchases for a budgets sections same as the wants section the key difference is this list has been balanced out with the income amount
  • Can also be a filter of a sections list by any of the other factors (location, category)
  • Budgets will contain at least one of these (each budget section gets one of this)

Purchase List Item

  • This is an item of purchase for this budget

Purchase List Item Structure

  • Name: Name of item to be purchased
  • Price: Price of item to be purchased
  • Location: Location of purchase for this item
  • Category: Category that this shopping item falls under from its expense plan item
  • Type: The type of purchase that this item falls under
  • price: the price of the item as entered at the shop or as planned
  • budget_id: budget where this is purchased in

Expense Log

  • This is an accumulated list of all expenditures that have been done in this budget
  • Budgets will contain at least one of these

Expense Log Item

  • This is any transaction that requires a credit from this budgets allocated amount

Expense Log Fields

  • Date: Date when this amount was spent
  • Name: The label of this expense
  • Cost: Amount of money spent on this
  • Type: This is the type of expenditure this should be derived from the ones set for this budget
  • Category: This is the category this expenditure falls under
  • Payment Method: This is the method of payment used for this expense
  • budget_id: id of the budget this expense belongs to

Payment Methods

A list of a users methods of payment for now just name and id later we will build this up to accounts?

Payment Method Item

  • This is an item in the options of payment methods in a budget

Payment Method Fields

  • name: name of this method
  • id: id of this method
  • money_log: id of the money log this method belongs to

Income Log

  • This is an accumulated list of amounts of money allocated to this budget
  • Each budget will have at least one of these

Income Log Item

  • This is every instance where this budget has gotten money allocated to it

Income Log Item Structure

  • Name: the label for the income
  • Amount: Amount allocated
  • Type: Type of income
  • Date: Date available
  • Comments: Any Comments
  • id: Id of income item
  • money_log_id: id of the budget this income log belongs to

Savings Log

  • This is a list of all the savings items added to this budget

Savings log Item Structure

  • Name: Name of item
  • Amount: Amount allocated
  • Category: Category Saved for (could be a new one or linked to budget categories
  • budget_id: the key of the budget this item is being added to
  • id: a key that identifies a log item

Reports / Stats

Every budget will contain a summaries section in this section one can have convenience summaries

  • All subtotals in the application (sections, categories, types, locations, item)
  • Account balances these are to be calculated from the income and actual_price totals
  • Savings total
  • Wants totals
  • Purchase list totals
  • Expenses totals