Simple API for inventory online shop using go language. This repository codebase implement 3 tier architecture and dependency injection.
- golang
- sqlite
- dep (optionaly)
To run this application locally, simply type make run. Application will serve at http://localhost:8080. It will also generate binary files on root directory.
Vendor files generated using dep package manager, if you want to re-generate this file, simple run dep ensure -v --vendor-only.
This app already run on my VPS. You can access directly at here.
API Documentation can be accessed at here.
Product is model that represent Catatan Jumlah Barang. These field respectively represent each column (in excel) that shown below :
- name represent Nama Item
- sku represent SKU
- stock represent Jumlah Sekarang
Purchase is model that represent Catatan Barang Masuk. These field respectively represent each column (in excel) that shown below :
- quantity_order represent Jumlah Pemesanan
- quantity_accepted represent Jumlah Diterima
- description represent Catatan
- invoice_number represent Nomer Kuitansi
- cost represent Harga Beli
- date represent Waktu
Orders is model that represent Catatan Barang Keluar. These field respectively represent each column (in excel) that shown below :
- quantity represent Jumlah Keluar
- description represent Catatan
- date represent Waktu
- price represent Harga Jual
For remaining column that doesn't mention at here, has been calculated by field that shown on picture above. It means that column doesn't have original value. That's why these column not be created as a schema.