Created
April 2, 2018 16:52
-
-
Save FermiDirak/e40129b9dd24e3fec8164ddd1363e6f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cash Register API | |
database: | |
Items Table: | |
* id INT (index) | |
* price MONEY | |
* name STRING (natural language index) | |
* SKU INT | |
* PPU MONEY | |
* Taxable BOOL | |
Transactions Table: | |
* id INT (index) | |
* timestamp TIME | |
* open BOOL | |
TransactionItemsJunction Table: | |
* id INT | |
* transactionId INT (index) | |
* itemId INT | |
/setUp: Allows a cashier to initialize register with price list | |
/initialize @money @salesTax | |
Allows the cashier to initialize register with given money amount and sales tax amount | |
/balance Gets the amount of balance in the register | |
/transact Creates a new transaction | |
/transactionAddItem @transactionId @itemId Adds item id to the current transaction | |
/viewTransaction @transactionId Views the transactions from id as well as subtotal | |
/closeTransaction @transactionId @money | |
Amount of money recieved by customer. Change is calculated for the user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment