Skip to content
This repository was archived by the owner on Jun 5, 2023. It is now read-only.

Database

SARUXSARU edited this page May 31, 2023 · 11 revisions

OUR DATABASE FORMAT

  • Our database is based on NoSQL database type and it's made in use Google Firestore.
  • It consist of three collections: event, expense and summary

EVENT COLLECTION

  • The event collection is consisting from documents with unique id
  • Each document contain fields:
  1. add_date : date of creating event
  2. creator : id of creator
  3. description : description of event
  4. name : name of event
  5. summary : id of summary of event when it's closed ( default null )
  6. array of expenses : array in which each index hold id of some expense
  7. array of users : array in which each index hold id of event member

EXPENSE COLLECTION

  • The expense collection is consisting from documents with unique id
  • Each document contain fields:
  1. add_date : date of creating expense
  2. cash : value of expense
  3. creator : id of expense creator
  4. description : description of expense
  5. name : name of expense
  6. type : type of expense (food/entertaiment etc. )
  7. map of users : map in which each index hold id and value which member should pay for the expens

SUMMARY COLLECTION

  • The summary collection is consisting from documents with unique id
  • Each document contain fields:
  1. map of receivables : map in which each index hold id and value of which member must to pay to other member how much money
Clone this wiki locally