Database Schema - GeniusSniper/atoz GitHub Wiki
user
| column name |
data type |
not null, primary key |
| id |
integer |
not null, primary key |
| username |
string |
not null |
| password digest |
string |
not null |
| session token |
string |
not null |
| name |
string |
not null |
| address |
string |
not null |
| phone number |
integer |
not null |
| created_at |
datetime |
not null |
| updated_at |
datetime |
not null |
//having cart and email and address hidden and not saving in the database
responses
| column name |
data type |
not null, primary key |
| id |
integer |
not null, primary key |
| user_id |
integer |
not null |
| item_id |
integer |
not null |
| created_at |
datetime |
not null |
| updated_at |
datetime |
not null |
items
| column name |
data type |
not null, primary key |
| id |
integer |
not null, primary key |
| name |
string |
not null |
| price |
integer |
not null |
| number_left |
integer |
not null |
| description |
string |
not null |
| created_at |
datetime |
not null |
| updated_at |
datetime |
not null |
cart
| column name |
data type |
not null, primary key |
| id |
integer |
not null, primary key |
| name |
string |
not null |
| price_of_each_item |
integer |
not null |
| total price |
integer |
not null |
| user_id |
integer |
not null |
| item_id |
integer |
not null |
| created_at |
datetime |
not null |
| updated_at |
datetime |
not null |