- Index
GET '/api/v1/store/products/'
- Show
GET '/api/v1/store/products/:pid'
- Create : Authentication Added
POST '/api/v1/store/products/'
- Delete
DELETE '/api/v1/store/products/:pid'
- Index: including Authentication
GET '/api/v1/store/users'
- Show
GET '/api/v1/store/users/:uid'
- Create
POST '/api/v1/store/users/'
- Delete
DELETE '/api/v1/store/users/:uid'
- Sign In
GET '/api/v1/store/users/login'
All Routes include Authentication
- Index
GET '/api/v1/store/orders/'
- Show
GET '/api/v1/store/orders/:oid'
- Create
POST '/api/v1/store/orders/'
- Delete
DELETE '/api/v1/store/orders/:oid'
- Current Orders by User
GET '/api/v1/store/orders/users/:uid'
TABLE Products ( id SERIAL NOT NULL, name VARCHAR(100) NOT NULL, price INTEGER NOT NULL, category VARCHAR(100) NULL );
TABLE Users( id SERIAL NOT NULL, username VARCHAR(30) NOT NULL, firstname VARCHAR(20) NOT NULL, lastname VARCHAR(20) NOT NULL, password VARCHAR NOT NULL );
TABLE Orders ( id SERIAL NOT NULL, user_id INTEGER NOT NULL, status VARCHAR(20) NOT NULL, date DATE NOT NULL );
TABLE order_product ( id SERIAL NOT NULL, order_id INTEGER NOT NULL, prod_id INTEGER NOT NULL, quantity INTEGER NOT NULL );