assumption
- brandId and productId always focus on existing brands and products
- price, unit price, and total price is always an integer
- the unit price is always the same as the price data in the product table
- total price is the sum of the quantity times the unit price
how to
- clone or extract data to local device
- get mysql driver, goose, and validator MySQL driver : https://github.com/go-sql-driver/mysql/ goose : https://github.com/pressly/goose validator : https://github.com/go-playground/validator
- go to main.go file and set your own database user, password, hostname, port, and database name
- run the main.go file and the project will automatically create new database if the database is not exist and run migration using goose, so you have to make sure that the mysql driver and goose are installed
- Access endpoints using postman