forked from KBTG-Kampus-ClassNest-SE-Java/workshopb2-group-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CREATE TABLE IF NOT EXISTS cart_item ( | ||
id SERIAL PRIMARY KEY, | ||
username VARCHAR(255) NOT NULL, | ||
sku VARCHAR(255) NOT NULL default '', | ||
name VARCHAR(255) NOT NULL default '', | ||
price DECIMAL(10, 2) default 0.00, | ||
quantity INT NOT NULL default 0, | ||
discount DECIMAL(10, 2) default 0.00, | ||
promotion_codes VARCHAR(255) NOT NULL default '', -- comma-separated list of promotion codes | ||
UNIQUE (username, sku) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TABLE IF NOT EXISTS product ( | ||
id SERIAL PRIMARY KEY, | ||
username VARCHAR(255) NOT NULL, | ||
discount DECIMAL(10, 2) NOT NULL, | ||
total_discount INT NOT NULL, | ||
promotionCodes VARCHAR(255), | ||
subtotal DECIMAL(10, 2) NOT NULL , | ||
grandTotal DECIMAL(10, 2) NOT NULL , | ||
|
||
); |