-
Notifications
You must be signed in to change notification settings - Fork 1
Schema
nancyma713 edited this page Apr 20, 2020
·
1 revision
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
username |
string | not null, indexed, unique |
first_name |
string | not null |
last_name |
string | not null |
zipcode |
integer | not null |
budget |
integer | not null |
password_digest |
string | not null |
session_token |
string | not null, indexed, unique |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
Purchasewill be subtracted frombudget
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
boba_item_id |
integer | not null, foreign key |
store_id |
integer | not null, foreign key |
price |
integer | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- belongs to a
BobaItem - belongs to a
Store
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null |
zipcode |
integer | not null, primary key |
owner_id |
integer | not null, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- belongs to a
user, throughowner_id
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
boba_item_id |
integer | not null |
user_id |
integer | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- belongs to a
BobaItem - belongs to a
User
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
boba_item_id |
integer | not null |
user_id |
integer | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- belongs to a
BobaItem - belongs to a
User