diff --git a/kbazaar/src/main/resources/sql/data/cartItem.sql b/kbazaar/src/main/resources/sql/data/cartItem.sql new file mode 100644 index 0000000..1e6c625 --- /dev/null +++ b/kbazaar/src/main/resources/sql/data/cartItem.sql @@ -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) +); \ No newline at end of file diff --git a/kbazaar/src/main/resources/sql/schema/cart.sql b/kbazaar/src/main/resources/sql/schema/cart.sql new file mode 100644 index 0000000..85324bd --- /dev/null +++ b/kbazaar/src/main/resources/sql/schema/cart.sql @@ -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 , + +); \ No newline at end of file