From ff594657b01cfbcea17530c14d5754cfce335458 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 14 Apr 2025 22:31:24 +0200 Subject: [PATCH] - deleted unnecessary files - created a new script to fill the databse with random testdata - improved the script to create the databse --- database/db_scripts/create_db.sql | 174 ------ database/db_scripts/delete_db.sql | 23 - database/db_scripts/fill_products.sql | 30 - database/db_scripts/fill_users.sql | 15 - database/db_scripts/webshop_structure.sql | 146 +++++ database/db_scripts/webshop_test-data.sql | 643 ++++++++++++++++++++++ 6 files changed, 789 insertions(+), 242 deletions(-) delete mode 100644 database/db_scripts/create_db.sql delete mode 100644 database/db_scripts/delete_db.sql delete mode 100644 database/db_scripts/fill_products.sql delete mode 100644 database/db_scripts/fill_users.sql create mode 100644 database/db_scripts/webshop_structure.sql create mode 100644 database/db_scripts/webshop_test-data.sql diff --git a/database/db_scripts/create_db.sql b/database/db_scripts/create_db.sql deleted file mode 100644 index 164043d..0000000 --- a/database/db_scripts/create_db.sql +++ /dev/null @@ -1,174 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `webshop` - CHARACTER SET utf8 COLLATE utf8_general_ci; -USE `webshop`; - -CREATE TABLE `discount` -( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `name` VARCHAR(255) NOT NULL, - `description` TEXT NOT NULL, - `discount_percent` DECIMAL(8, 2) NOT NULL, - `deleted_at` INT(8) NOT NULL, - `modified_at` INT(8) NOT NULL, - `created_at` INT(8) NOT NULL, - `active` BOOLEAN NOT NULL -); -CREATE TABLE `user_address` -( - `address_line1` VARCHAR(255) NOT NULL, - `city` VARCHAR(255) NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `country` VARCHAR(2) NOT NULL, - `user_id` INT UNSIGNED NOT NULL, - `mobile` VARCHAR(255) NOT NULL, - `postal_code` INT NOT NULL, - `address_line2` VARCHAR(255) NOT NULL, - `telephone` VARCHAR(255) NOT NULL -); -ALTER TABLE - `user_address` - ADD UNIQUE `user_address_mobile_unique` (`mobile`); -ALTER TABLE - `user_address` - ADD UNIQUE `user_address_telephone_unique` (`telephone`); -CREATE TABLE `product_inventory` -( - `created_at` INT(8) NOT NULL, - `modified_at` INT(8) NOT NULL, - `quantity` INT NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `deleted_at` INT(8) NOT NULL -); -CREATE TABLE `payment_details` -( - `order_id` INT NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `status` VARCHAR(255) NOT NULL, - `provider` VARCHAR(255) NOT NULL, - `modified_at` INT(8) NOT NULL, - `amount` INT NOT NULL, - `created_at` INT(8) NOT NULL -); -CREATE TABLE `order_details` -( - `payment_id` INT UNSIGNED NOT NULL, - `total` DECIMAL(8, 2) NOT NULL, - `modified_at` INT(8) NOT NULL, - `created_at` INT(8) NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `user_id` INT UNSIGNED NOT NULL -); -CREATE TABLE `order_items` -( - `modified_at` INT(8) NOT NULL, - `user_id` BIGINT NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `quantity` INT NOT NULL, - `order_id` INT UNSIGNED NOT NULL, - `created_at` INT(8) NOT NULL, - `product_id` INT UNSIGNED NOT NULL -); -CREATE TABLE `user_payment` -( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `provider` VARCHAR(255) NOT NULL, - `account_no` VARCHAR(255) NOT NULL, - `expiry` DATE NOT NULL, - `payment_type` VARCHAR(255) NOT NULL, - `user_id` INT UNSIGNED NOT NULL -); -CREATE TABLE `product` -( - `category_id` INT UNSIGNED NOT NULL, - `model` VARCHAR(255) NOT NULL, - `color` VARCHAR(255) NOT NULL, - `engine` VARCHAR(255) NOT NULL, - `description` TEXT NOT NULL, - `make` VARCHAR(255) NOT NULL, - `inventory_id` INT UNSIGNED NOT NULL, - `discount_id` INT UNSIGNED NOT NULL, - `created_at` INT(8) NOT NULL, - `name` VARCHAR(255) NOT NULL, - `deleted_at` INT(8) NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `modified_at` INT(8) NOT NULL, - `price` DECIMAL(8, 2) NOT NULL -); -CREATE TABLE `product_category` -( - `created_at` INT(8) NOT NULL, - `name` VARCHAR(255) NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `modified_at` INT(8) NOT NULL, - `desc` TEXT NOT NULL, - `deleted_at` INT(8) NOT NULL -); -CREATE TABLE `user` -( - `is_active` BOOLEAN NOT NULL DEFAULT '1', - `lower_name` VARCHAR(255) NOT NULL, - `email` VARCHAR(255) NOT NULL DEFAULT 'NONE', - `passwd_hash_algo` VARCHAR(255) NOT NULL DEFAULT 'NONE', - `modified_at` INT(8) NOT NULL DEFAULT '0', - `is_admin` BOOLEAN NOT NULL DEFAULT '0', - `name` VARCHAR(255) NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `created_at` INT(8) NOT NULL DEFAULT '0', - `passwd` VARCHAR(255) NOT NULL DEFAULT 'NONE' -); -ALTER TABLE - `user` - ADD UNIQUE `user_email_unique` (`email`); -CREATE TABLE `shopping_session` -( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `created_at` INT(8) NOT NULL, - `user_id` INT UNSIGNED NOT NULL, - `modified_at` INT(8) NOT NULL, - `total` DECIMAL(8, 2) NOT NULL -); -CREATE TABLE `cart_item` -( - `product_id` INT UNSIGNED NOT NULL, - `session_id` INT UNSIGNED NOT NULL, - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `created_at` INT(8) NOT NULL, - `modified_at` INT(8) NOT NULL, - `quantity` INT NOT NULL -); -ALTER TABLE - `product` - ADD CONSTRAINT `product_inventory_id_foreign` FOREIGN KEY (`inventory_id`) REFERENCES `product_inventory` (`id`); -ALTER TABLE - `order_items` - ADD CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `order_details` (`id`); -ALTER TABLE - `product` - ADD CONSTRAINT `product_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `product_category` (`id`); -ALTER TABLE - `order_details` - ADD CONSTRAINT `order_details_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE - `cart_item` - ADD CONSTRAINT `cart_item_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); -ALTER TABLE - `order_items` - ADD CONSTRAINT `order_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); -ALTER TABLE - `user_address` - ADD CONSTRAINT `user_address_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE - `order_details` - ADD CONSTRAINT `order_details_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payment_details` (`id`); -ALTER TABLE - `product` - ADD CONSTRAINT `product_discount_id_foreign` FOREIGN KEY (`discount_id`) REFERENCES `discount` (`id`); -ALTER TABLE - `user_payment` - ADD CONSTRAINT `user_payment_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE - `shopping_session` - ADD CONSTRAINT `shopping_session_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE - `cart_item` - ADD CONSTRAINT `cart_item_session_id_foreign` FOREIGN KEY (`session_id`) REFERENCES `shopping_session` (`id`); \ No newline at end of file diff --git a/database/db_scripts/delete_db.sql b/database/db_scripts/delete_db.sql deleted file mode 100644 index 58f5dfd..0000000 --- a/database/db_scripts/delete_db.sql +++ /dev/null @@ -1,23 +0,0 @@ -drop table if exists cart_item; - -drop table if exists discount; - -drop table if exists oder_items; - -drop table if exists order_details; - -drop table if exists payment_details; - -drop table if exists product; - -drop table if exists product_category; - -drop table if exists product_inventory; - -drop table if exists shopping_session; - -drop table if exists user; - -drop table if exists user_address; - -drop table if exists user_payment; \ No newline at end of file diff --git a/database/db_scripts/fill_products.sql b/database/db_scripts/fill_products.sql deleted file mode 100644 index 757f560..0000000 --- a/database/db_scripts/fill_products.sql +++ /dev/null @@ -1,30 +0,0 @@ -INSERT INTO webshop.product_inventory (id) VALUE (1); - -INSERT INTO webshop.product (model, color, engine, description, make, - discount_id, created_at, name, - deleted_at, modified_at, price, inventory_id, category_id) - VALUES --- Example row 1 -('Model X', 'Red', 'V8', 'A powerful red car', 'Tesla', - FLOOR(1 + RAND() * 5), UNIX_TIMESTAMP(), 'Red Thunder', - 1, UNIX_TIMESTAMP(), ROUND(50000 + (RAND() * 50000), 2), id, 1), - --- Example row 2 -('Civic', 'Blue', 'I4', 'Efficient and reliable', 'Honda', - FLOOR(1 + RAND() * 5), UNIX_TIMESTAMP(), 'Blue Breeze', - 1, UNIX_TIMESTAMP(), ROUND(20000 + (RAND() * 15000), 2), id, 1), - --- Example row 3 -('Mustang', 'Black', 'V6', 'A sleek muscle car', 'Ford', - FLOOR(1 + RAND() * 5), UNIX_TIMESTAMP(), 'Black Panther', - 1, UNIX_TIMESTAMP(), ROUND(30000 + (RAND() * 20000), 2), id, 1), - --- Example row 4 -('Camry', 'White', 'Hybrid', 'Eco-friendly and spacious', 'Toyota', - FLOOR(1 + RAND() * 5), UNIX_TIMESTAMP(), 'White Cloud', - 1, UNIX_TIMESTAMP(), ROUND(25000 + (RAND() * 10000), 2), id, 1), - --- Example row 5 -('A4', 'Gray', 'V6 Turbo', 'Luxury and performance', 'Audi', - FLOOR(1 + RAND() * 5), UNIX_TIMESTAMP(), 'Gray Ghost', - 1, UNIX_TIMESTAMP(), ROUND(40000 + (RAND() * 30000), 2), id, 1); \ No newline at end of file diff --git a/database/db_scripts/fill_users.sql b/database/db_scripts/fill_users.sql deleted file mode 100644 index d21e23b..0000000 --- a/database/db_scripts/fill_users.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE - DEFINER = root@localhost procedure prepare_data() -BEGIN - DECLARE i INT DEFAULT 1; - DECLARE emailString CHAR(16) DEFAULT 'test'; - DECLARE readyEmailString CHAR(32); - - WHILE i < 100 - DO - SET readyEmailString = CONCAT(emailString, CAST(i AS CHAR(16)), '@test.de'); - INSERT INTO webshop.user(is_active, name, lower_name, email) - VALUES ('1', 'harry', 'potter', readyEmailString); - SET i = i + 1; - END WHILE; -END; \ No newline at end of file diff --git a/database/db_scripts/webshop_structure.sql b/database/db_scripts/webshop_structure.sql new file mode 100644 index 0000000..dc5ef4a --- /dev/null +++ b/database/db_scripts/webshop_structure.sql @@ -0,0 +1,146 @@ +DROP DATABASE IF EXISTS webshop; +CREATE DATABASE IF NOT EXISTS `webshop` + CHARACTER SET utf8 COLLATE utf8_general_ci; + +USE `webshop`; + +CREATE TABLE `user` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL, + `lower_name` VARCHAR(255) NOT NULL, + `email` VARCHAR(255) NOT NULL DEFAULT 'NONE', + `passwd` VARCHAR(255) NOT NULL DEFAULT 'NONE', + `passwd_hash_algo` VARCHAR(255) NOT NULL DEFAULT 'NONE', + `is_admin` BOOLEAN NOT NULL DEFAULT '0' +); +ALTER TABLE + `user` + ADD UNIQUE `user_email_unique` (`email`); +CREATE TABLE `user_address` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `address_line1` VARCHAR(255) NOT NULL, + `address_line2` VARCHAR(255) NOT NULL, + `city` VARCHAR(255) NOT NULL, + `postal_code` INT NOT NULL, + `country` VARCHAR(2) NOT NULL, + `telephone` VARCHAR(255) NOT NULL +); +ALTER TABLE + `user_address` + ADD UNIQUE `user_address_telephone_unique` (`telephone`); +CREATE TABLE `user_payment` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `payment_type` VARCHAR(255) NOT NULL, + `provider` VARCHAR(255) NOT NULL, + `account_no` VARCHAR(255) NOT NULL, + `expiry` DATE NOT NULL +); +CREATE TABLE `shopping_session` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `total` DECIMAL(8, 2) NOT NULL +); +CREATE TABLE `cart_item` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `session_id` INT UNSIGNED NOT NULL, + `product_id` INT UNSIGNED NOT NULL, + `quantity` INT NOT NULL +); +CREATE TABLE `payment_details` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `order_id` INT NOT NULL, + `amount` INT NOT NULL, + `provider` VARCHAR(255) NOT NULL, + `status` VARCHAR(255) NOT NULL +); +CREATE TABLE `product` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL, + `make` VARCHAR(255) NOT NULL, + `model` VARCHAR(255) NOT NULL, + `description` TEXT NOT NULL, + `category_id` INT UNSIGNED NOT NULL, + `price` DECIMAL(8, 2) NOT NULL, + `discount_id` INT UNSIGNED NOT NULL, + `created_at` DATE NOT NULL +); +CREATE TABLE `discount` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL, + `description` TEXT NOT NULL, + `discount_percent` DECIMAL(8, 2) NOT NULL, + `active` BOOLEAN NOT NULL +); +CREATE TABLE `order_items` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `order_id` INT UNSIGNED NOT NULL, + `product_id` INT UNSIGNED NOT NULL, + `quantity` INT NOT NULL, + `user_id` BIGINT NOT NULL +); +CREATE TABLE `product_category` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL +); +CREATE TABLE `order_details` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `user_id` INT UNSIGNED NOT NULL, + `total` DECIMAL(8, 2) NOT NULL, + `payment_id` INT UNSIGNED NOT NULL +); +CREATE TABLE `product_pictures` +( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `product_id` INT UNSIGNED NOT NULL, + `picture_base64` TEXT NOT NULL, + `is_primary` BOOLEAN NOT NULL +); +ALTER TABLE + `product_pictures` + ADD CONSTRAINT `product_pictures_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); +ALTER TABLE + `user_payment` + ADD CONSTRAINT `user_payment_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `order_details` + ADD CONSTRAINT `order_details_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payment_details` (`id`); +ALTER TABLE + `order_details` + ADD CONSTRAINT `order_details_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `order_items` + ADD CONSTRAINT `order_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); +ALTER TABLE + `product` + ADD CONSTRAINT `product_discount_id_foreign` FOREIGN KEY (`discount_id`) REFERENCES `discount` (`id`); +ALTER TABLE + `shopping_session` + ADD CONSTRAINT `shopping_session_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `product` + ADD CONSTRAINT `product_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `product_category` (`id`); +ALTER TABLE + `user_address` + ADD CONSTRAINT `user_address_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); +ALTER TABLE + `order_items` + ADD CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `order_details` (`id`); +ALTER TABLE + `cart_item` + ADD CONSTRAINT `cart_item_session_id_foreign` FOREIGN KEY (`session_id`) REFERENCES `shopping_session` (`id`); +ALTER TABLE + `cart_item` + ADD CONSTRAINT `cart_item_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`); \ No newline at end of file diff --git a/database/db_scripts/webshop_test-data.sql b/database/db_scripts/webshop_test-data.sql new file mode 100644 index 0000000..2e4bd83 --- /dev/null +++ b/database/db_scripts/webshop_test-data.sql @@ -0,0 +1,643 @@ +USE webshop; + +-- Product Categories +INSERT INTO product_category (id, name) +VALUES (1, 'Electronics'); +INSERT INTO product_category (id, name) +VALUES (2, 'Home Appliances'); +INSERT INTO product_category (id, name) +VALUES (3, 'Clothing'); +INSERT INTO product_category (id, name) +VALUES (4, 'Sports'); +INSERT INTO product_category (id, name) +VALUES (5, 'Books'); + +-- Discounts +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (1, 'Spring Sale', 'Description for Spring Sale', 15, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (2, 'Black Friday', 'Description for Black Friday', 40, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (3, 'New User', 'Description for New User', 10, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (4, 'Clearance', 'Description for Clearance', 25, TRUE); +INSERT INTO discount (id, name, description, discount_percent, active) +VALUES (5, 'Holiday Deal', 'Description for Holiday Deal', 20, TRUE); + +-- Users +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (1, 'User1', LOWER('User1'), 'user1@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (2, 'User2', LOWER('User2'), 'user2@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (3, 'User3', LOWER('User3'), 'user3@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (4, 'User4', LOWER('User4'), 'user4@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (5, 'User5', LOWER('User5'), 'user5@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (6, 'User6', LOWER('User6'), 'user6@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (7, 'User7', LOWER('User7'), 'user7@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (8, 'User8', LOWER('User8'), 'user8@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (9, 'User9', LOWER('User9'), 'user9@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (10, 'User10', LOWER('User10'), 'user10@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (11, 'User11', LOWER('User11'), 'user11@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (12, 'User12', LOWER('User12'), 'user12@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (13, 'User13', LOWER('User13'), 'user13@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (14, 'User14', LOWER('User14'), 'user14@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (15, 'User15', LOWER('User15'), 'user15@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (16, 'User16', LOWER('User16'), 'user16@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (17, 'User17', LOWER('User17'), 'user17@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (18, 'User18', LOWER('User18'), 'user18@example.com', 'password123', 'bcrypt', FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (19, 'User19', LOWER('User19'), 'user19@example.com', 'password123', 'bcrypt',FALSE); +INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin) +VALUES (20, 'User20', LOWER('User20'), 'user20@example.com', 'password123', 'bcrypt', FALSE); + +-- User Addresses +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (1, '123 Main St', 'Apt 1', 'Berlin', 10001, 'DE', '1234567891'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (2, '123 Main St', 'Apt 2', 'Toronto', 10002, 'DE', '1234567892'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (3, '123 Main St', 'Apt 3', 'New York', 10003, 'GB', '1234567893'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (4, '123 Main St', 'Apt 4', 'Paris', 10004, 'DE', '1234567894'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (5, '123 Main St', 'Apt 5', 'Paris', 10005, 'FR', '1234567895'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (6, '123 Main St', 'Apt 6', 'New York', 10006, 'DE', '1234567896'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (7, '123 Main St', 'Apt 7', 'Berlin', 10007, 'FR', '1234567897'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (8, '123 Main St', 'Apt 8', 'Paris', 10008, 'US', '1234567898'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (9, '123 Main St', 'Apt 9', 'London', 10009, 'FR', '1234567899'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (10, '123 Main St', 'Apt 10', 'Paris', 10010, 'CA', '12345678910'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (11, '123 Main St', 'Apt 11', 'London', 10011, 'DE', '12345678911'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (12, '123 Main St', 'Apt 12', 'London', 10012, 'US', '12345678912'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (13, '123 Main St', 'Apt 13', 'Toronto', 10013, 'US', '12345678913'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (14, '123 Main St', 'Apt 14', 'Toronto', 10014, 'CA', '12345678914'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (15, '123 Main St', 'Apt 15', 'Paris', 10015, 'CA', '12345678915'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (16, '123 Main St', 'Apt 16', 'London', 10016, 'US', '12345678916'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (17, '123 Main St', 'Apt 17', 'New York', 10017, 'CA', '12345678917'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (18, '123 Main St', 'Apt 18', 'Berlin', 10018, 'GB', '12345678918'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (19, '123 Main St', 'Apt 19', 'Berlin', 10019, 'DE', '12345678919'); +INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone) +VALUES (20, '123 Main St', 'Apt 20', 'Berlin', 10020, 'GB', '12345678920'); + +-- User Payments +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (1, 'Credit Card', 'Stripe', 'ACCNO0001', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (2, 'Debit Card', 'Visa', 'ACCNO0002', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (3, 'PayPal', 'Stripe', 'ACCNO0003', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (4, 'PayPal', 'Visa', 'ACCNO0004', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (5, 'Debit Card', 'MasterCard', 'ACCNO0005', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (6, 'Credit Card', 'Visa', 'ACCNO0006', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (7, 'Debit Card', 'Stripe', 'ACCNO0007', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (8, 'PayPal', 'Stripe', 'ACCNO0008', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (9, 'Credit Card', 'MasterCard', 'ACCNO0009', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (10, 'PayPal', 'Stripe', 'ACCNO0010', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (11, 'PayPal', 'Visa', 'ACCNO0011', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (12, 'Debit Card', 'PayPal', 'ACCNO0012', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (13, 'PayPal', 'PayPal', 'ACCNO0013', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (14, 'PayPal', 'MasterCard', 'ACCNO0014', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (15, 'Credit Card', 'PayPal', 'ACCNO0015', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (16, 'Debit Card', 'Visa', 'ACCNO0016', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (17, 'Credit Card', 'PayPal', 'ACCNO0017', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (18, 'Debit Card', 'MasterCard', 'ACCNO0018', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (19, 'Debit Card', 'PayPal', 'ACCNO0019', '2026-12-31'); +INSERT INTO user_payment (user_id, payment_type, provider, account_no, expiry) +VALUES (20, 'PayPal', 'Stripe', 'ACCNO0020', '2026-12-31'); + +-- Products +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (1, 'Product1', 'BrandA', 'Model1', 'Description for Product1', 5, 318.94, 2, '2024-06-16'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (2, 'Product2', 'BrandC', 'Model2', 'Description for Product2', 5, 521.19, 5, '2025-03-05'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (3, 'Product3', 'BrandB', 'Model3', 'Description for Product3', 2, 230.04, 2, '2024-08-12'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (4, 'Product4', 'BrandC', 'Model4', 'Description for Product4', 1, 147.85, 4, '2025-03-02'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (5, 'Product5', 'BrandA', 'Model5', 'Description for Product5', 4, 520.02, 3, '2024-09-08'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (6, 'Product6', 'BrandC', 'Model6', 'Description for Product6', 4, 146.06, 5, '2024-07-08'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (7, 'Product7', 'BrandC', 'Model7', 'Description for Product7', 1, 862.11, 3, '2025-03-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (8, 'Product8', 'BrandC', 'Model8', 'Description for Product8', 1, 313.82, 2, '2024-10-17'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (9, 'Product9', 'BrandA', 'Model9', 'Description for Product9', 2, 491.74, 2, '2025-01-17'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (10, 'Product10', 'BrandB', 'Model10', 'Description for Product10', 3, 182.49, 3, '2025-01-02'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (11, 'Product11', 'BrandB', 'Model11', 'Description for Product11', 4, 907.39, 3, '2025-01-29'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (12, 'Product12', 'BrandB', 'Model12', 'Description for Product12', 2, 962.56, 2, '2024-07-01'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (13, 'Product13', 'BrandC', 'Model13', 'Description for Product13', 5, 933.24, 5, '2024-05-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (14, 'Product14', 'BrandB', 'Model14', 'Description for Product14', 2, 474.63, 1, '2024-11-26'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (15, 'Product15', 'BrandC', 'Model15', 'Description for Product15', 5, 112.99, 1, '2024-07-14'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (16, 'Product16', 'BrandA', 'Model16', 'Description for Product16', 5, 92.21, 5, '2024-06-21'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (17, 'Product17', 'BrandB', 'Model17', 'Description for Product17', 1, 30.15, 4, '2024-10-04'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (18, 'Product18', 'BrandA', 'Model18', 'Description for Product18', 2, 169.85, 1, '2024-11-07'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (19, 'Product19', 'BrandB', 'Model19', 'Description for Product19', 5, 559.7, 1, '2024-09-12'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (20, 'Product20', 'BrandB', 'Model20', 'Description for Product20', 1, 617.8, 4, '2024-04-26'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (21, 'Product21', 'BrandB', 'Model21', 'Description for Product21', 1, 353.15, 4, '2024-04-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (22, 'Product22', 'BrandA', 'Model22', 'Description for Product22', 4, 827.72, 1, '2024-04-17'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (23, 'Product23', 'BrandB', 'Model23', 'Description for Product23', 4, 24.71, 2, '2025-03-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (24, 'Product24', 'BrandB', 'Model24', 'Description for Product24', 1, 452.61, 1, '2024-07-06'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (25, 'Product25', 'BrandA', 'Model25', 'Description for Product25', 3, 245.66, 2, '2024-05-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (26, 'Product26', 'BrandA', 'Model26', 'Description for Product26', 4, 741.09, 2, '2024-12-23'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (27, 'Product27', 'BrandB', 'Model27', 'Description for Product27', 2, 549.64, 2, '2025-01-28'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (28, 'Product28', 'BrandC', 'Model28', 'Description for Product28', 3, 93.43, 2, '2024-07-15'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (29, 'Product29', 'BrandC', 'Model29', 'Description for Product29', 1, 610.66, 1, '2024-08-07'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (30, 'Product30', 'BrandC', 'Model30', 'Description for Product30', 4, 537.6, 3, '2024-06-24'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (31, 'Product31', 'BrandB', 'Model31', 'Description for Product31', 4, 377.7, 1, '2024-06-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (32, 'Product32', 'BrandA', 'Model32', 'Description for Product32', 4, 353.25, 2, '2024-09-20'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (33, 'Product33', 'BrandB', 'Model33', 'Description for Product33', 4, 550.94, 3, '2024-08-02'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (34, 'Product34', 'BrandA', 'Model34', 'Description for Product34', 1, 692.25, 4, '2024-04-16'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (35, 'Product35', 'BrandB', 'Model35', 'Description for Product35', 4, 249.37, 3, '2024-05-10'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (36, 'Product36', 'BrandC', 'Model36', 'Description for Product36', 4, 418.07, 1, '2024-08-18'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (37, 'Product37', 'BrandC', 'Model37', 'Description for Product37', 1, 455.82, 4, '2024-04-27'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (38, 'Product38', 'BrandA', 'Model38', 'Description for Product38', 4, 664.72, 1, '2024-12-28'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (39, 'Product39', 'BrandB', 'Model39', 'Description for Product39', 3, 80.6, 1, '2024-10-18'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (40, 'Product40', 'BrandA', 'Model40', 'Description for Product40', 4, 28.12, 4, '2024-09-05'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (41, 'Product41', 'BrandA', 'Model41', 'Description for Product41', 3, 251.78, 5, '2025-02-08'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (42, 'Product42', 'BrandC', 'Model42', 'Description for Product42', 4, 144.43, 1, '2024-05-11'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (43, 'Product43', 'BrandA', 'Model43', 'Description for Product43', 5, 748.88, 3, '2025-01-04'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (44, 'Product44', 'BrandB', 'Model44', 'Description for Product44', 5, 882.23, 1, '2024-08-19'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (45, 'Product45', 'BrandB', 'Model45', 'Description for Product45', 3, 899.3, 4, '2024-07-03'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (46, 'Product46', 'BrandC', 'Model46', 'Description for Product46', 4, 272.38, 4, '2024-11-11'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (47, 'Product47', 'BrandB', 'Model47', 'Description for Product47', 3, 470.78, 2, '2024-10-28'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (48, 'Product48', 'BrandC', 'Model48', 'Description for Product48', 2, 116.97, 1, '2024-09-13'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (49, 'Product49', 'BrandA', 'Model49', 'Description for Product49', 5, 30.57, 4, '2024-09-18'); +INSERT INTO product (id, name, make, model, description, category_id, price, discount_id, created_at) +VALUES (50, 'Product50', 'BrandB', 'Model50', 'Description for Product50', 2, 861.84, 4, '2024-11-26'); + +-- Product Pictures +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (1, 'mnELxugt4Ydr4FUssyH+bkSevIrNl/KBGyH8LLhxFKI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (2, 'mr6UQfVtBB6Gj7MaxDer/zNGsEeJ3DHH5JzLZmKUC+c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (3, 'yCeHteIvMo3LNNxflAknKAm3TUm6bI/+cUe4mCyp5Vs=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (4, 'A1trFKv8HmX7+WxtkRAod/QbH2xKBUr3AS0sh7OT+oI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (5, 'zdfKP/uLcgmMv1x4v+5FA2gEGK00yW2HJDHemYAxEBk=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (6, 'wFpi7y31rFU7VICwWc8ONnx2ApSFSaF1do/ozuoENTM=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (7, 'KkpNEMOR/cMQ3zv7mjdiMG8lWh6x7S6C8vQFzqN8YYk=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (8, 'VadAqdlySAPOguy/vVfGGaUzbMciyv9niqjS2peB79c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (9, 'pecXJbykN65n5BwAuGiWEiW2YRP1vxk5JUaBB7Z2QKE=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (10, 'JRkmNYuGySf+MCx+dPRj5cVMOu0AhHEUhSeKWGvsoM0=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (11, 'Tln4hU4s5Nyx5wkzA/kCn4puKxHqfrdpiEaOn+Dsj0c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (12, 'rmlebzsSR28Xl8W7HrrCetU/Xlww/m750el2QgCLrtw=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (13, 'aSXu2+PDwlE0bJ7+JgifoIRYmNFgpf4Rac1Hih3OaoQ=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (14, '0nTDMczLNN5MmLM9CecyZyNHSjAg3+hj3QIEKjEheIw=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (15, 'eKKF0BWqGh977FJNERzlZH01xvLCJLfWO507tFctImA=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (16, 'Qx0W4ZIOI3EWcdESsMm3Wp/NEfeGssKrTD4D7hH3bzs=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (17, 't70dXq30C82ca1wRo7TmG3GBEa1MrTccl6uVbOYUcf8=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (18, 'o2xac1ar86EUPNi/q+FJEqvfIjIVUTBBKCmHoMaAqKU=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (19, 'j252AyKpFxiTVlXHar/vicn1NBzUoZtMOA7V+bVSuto=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (20, 'ddoRalgx15Oq2XgG83ksnZYnr38k3bgytWyuvMwPVNc=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (21, 'iPcGIdcvwInGY3mc6wMKYyfAagIz5ZRjmfbbtg2+fDc=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (22, 'vtP3wxpUhcgg+M1BQV88MlIWbsOU0FkT/3qiDEJfjsM=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (23, 'lkMSOWhVUXQJwj8qui8OsevJp+a8drNyYY1PdsF9ofQ=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (24, 'OXZP3Y5ZNRREjBlK49W4oESBVc1CaPPPOJXi6mlH6n4=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (25, '1ODn0qkTCPxfapjkV8baMp+KuFrkbaLhTZfb9NQgUPU=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (26, 'bgz2EcoOVDRagfBNLi8aPMx3yE8TbmQryWKsT7dI35c=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (27, '5KkXTV4R2M4vbf9/1R4F1pEqt02AlU6BGcUSTzD/8PI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (28, 'ZXLkPF69pEUGz7/asGZ/n1n1yOfknrWYFv13SpvpJ9s=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (29, 'DC8UtBTDA80YqgOKxu2jNfdm4Y8JpxzuCoRiHbAiT10=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (30, 'OFm88w/1zT7DQjOVXcANhLLD6khvrF3UI7b56KmBzaU=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (31, 'DfPzNf2+gQ9fx7QGxDY2t8VL0rtizZGY8zPvzAbqMIk=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (32, 'w89sMLHYMX7IW5ykCvu4BW448GkG4/MAWt89jbkr7YI=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (33, 'syvLhg+8VIt4Gihgq+FtmPABuD3sAMTdDlyhOu85Kqo=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (34, '2fDRzCfntjtZAneqqyzr3hD6RV/0Ad/YmCwTwjNlenc=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (35, 'ygca9b8poneJF/3RS5Kr5GMfH7+kv6m0VFDDvknfwfE=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (36, 'tRriLe4gYRGOepP/Bn0kb6ChEKoOfKMxgnmxOh1sgS0=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (37, 'ir5yC2KMiX0w7fnaGNp85WrZU04Mgc59KWr0hkx6DIc=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (38, 'oNw9xNd/JfmOFAVX+sKWiLfH2ipyP/z/wW4dmaPN2qM=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (39, 'D+mT9AXixD432UIBcTQBZ9sd+d6W6MsnJaSOWom2DxA=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (40, 'QbjTL1bK2X5GE2KGpisiI9UIBboZhv+zFH2S16cl2E0=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (41, 'MrUZXSdNCy3Uiochw8wSQjMu4veozWLywvp3IlbIQwo=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (42, 'i2+PZBqElXU+yUCGWRpz/HOxy2RMbmFz+9Z/JWkOgHU=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (43, 'D73S1+s3ILVdRaXj0ow+baD0QAtBCUh6jNVyYkKx3Cs=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (44, 'gHDoV2NuiBiDGJEIWLy32zrFRQb5C0ocSIgKjYs1E84=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (45, 'ks4WUYGB7sv8hFgK+H3v72t7HXDMcArsRdtj2U9B798=', TRUE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (46, '4pX2NjrxNZCSy96Uj3yXSbcM+CZ8N0WZTKVzuEl4kls=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (47, 'lY+/60wB02mXhaMBw2vcGhkYyOHUxgw0ItOqcb+wM/Q=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (48, '/QDMi1jgaR9dDlJEKLte5Zf+aMe+7Z3BLdndbgOIDO4=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (49, 'oyYP6vIP1QfDWGJBF8DJrzrx9o44aH4tnXOGCPQfEF8=', FALSE); +INSERT INTO product_pictures (product_id, picture_base64, is_primary) +VALUES (50, 'fstdpDDpSI+KUdWR7zzqlsaHRQ82Elx396/DLJXgf6o=', TRUE); + +-- Shopping Sessions +INSERT INTO shopping_session (id, user_id, total) +VALUES (1, 1, 538.84); +INSERT INTO shopping_session (id, user_id, total) +VALUES (2, 2, 734.36); +INSERT INTO shopping_session (id, user_id, total) +VALUES (3, 3, 1680.53); +INSERT INTO shopping_session (id, user_id, total) +VALUES (4, 4, 303.57); +INSERT INTO shopping_session (id, user_id, total) +VALUES (5, 5, 1924.56); +INSERT INTO shopping_session (id, user_id, total) +VALUES (6, 6, 46.64); +INSERT INTO shopping_session (id, user_id, total) +VALUES (7, 7, 266.57); +INSERT INTO shopping_session (id, user_id, total) +VALUES (8, 8, 1503.89); +INSERT INTO shopping_session (id, user_id, total) +VALUES (9, 9, 1808.29); +INSERT INTO shopping_session (id, user_id, total) +VALUES (10, 10, 1890.97); +INSERT INTO shopping_session (id, user_id, total) +VALUES (11, 11, 30.01); +INSERT INTO shopping_session (id, user_id, total) +VALUES (12, 12, 1479.1); +INSERT INTO shopping_session (id, user_id, total) +VALUES (13, 13, 1559.22); +INSERT INTO shopping_session (id, user_id, total) +VALUES (14, 14, 1612.68); +INSERT INTO shopping_session (id, user_id, total) +VALUES (15, 15, 1905.59); +INSERT INTO shopping_session (id, user_id, total) +VALUES (16, 16, 141.6); +INSERT INTO shopping_session (id, user_id, total) +VALUES (17, 17, 496.74); +INSERT INTO shopping_session (id, user_id, total) +VALUES (18, 18, 1678.68); +INSERT INTO shopping_session (id, user_id, total) +VALUES (19, 19, 1140.02); +INSERT INTO shopping_session (id, user_id, total) +VALUES (20, 20, 872.75); + +-- Cart Items +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (1, 1, 40, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (2, 1, 26, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (3, 2, 19, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (4, 2, 23, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (5, 3, 4, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (6, 3, 6, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (7, 4, 21, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (8, 4, 26, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (9, 5, 20, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (10, 5, 3, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (11, 6, 22, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (12, 6, 1, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (13, 7, 49, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (14, 7, 45, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (15, 8, 7, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (16, 8, 20, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (17, 9, 21, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (18, 9, 13, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (19, 10, 41, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (20, 10, 21, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (21, 11, 19, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (22, 11, 36, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (23, 12, 10, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (24, 12, 38, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (25, 13, 16, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (26, 13, 2, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (27, 14, 22, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (28, 14, 44, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (29, 15, 14, 1); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (30, 15, 14, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (31, 16, 25, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (32, 16, 1, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (33, 17, 33, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (34, 17, 42, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (35, 18, 48, 4); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (36, 18, 18, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (37, 19, 21, 5); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (38, 19, 26, 2); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (39, 20, 36, 3); +INSERT INTO cart_item (id, session_id, product_id, quantity) +VALUES (40, 20, 36, 3); + +-- Orders and Payment Details +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (1, 1, 650, 'MasterCard', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (1, 1, 650, 1); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (2, 2, 241, 'MasterCard', 'Pending'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (2, 2, 241, 2); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (3, 3, 134, 'PayPal', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (3, 3, 134, 3); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (4, 4, 761, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (4, 4, 761, 4); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (5, 5, 356, 'Stripe', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (5, 5, 356, 5); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (6, 6, 187, 'Visa', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (6, 6, 187, 6); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (7, 7, 610, 'MasterCard', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (7, 7, 610, 7); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (8, 8, 457, 'PayPal', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (8, 8, 457, 8); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (9, 9, 178, 'MasterCard', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (9, 9, 178, 9); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (10, 10, 156, 'Stripe', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (10, 10, 156, 10); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (11, 11, 919, 'PayPal', 'Pending'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (11, 11, 919, 11); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (12, 12, 877, 'MasterCard', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (12, 12, 877, 12); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (13, 13, 746, 'Visa', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (13, 13, 746, 13); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (14, 14, 440, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (14, 14, 440, 14); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (15, 15, 983, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (15, 15, 983, 15); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (16, 16, 530, 'Visa', 'Failed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (16, 16, 530, 16); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (17, 17, 900, 'Visa', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (17, 17, 900, 17); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (18, 18, 338, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (18, 18, 338, 18); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (19, 19, 759, 'PayPal', 'Pending'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (19, 19, 759, 19); +INSERT INTO payment_details (id, order_id, amount, provider, status) +VALUES (20, 20, 956, 'Stripe', 'Completed'); +INSERT INTO order_details (id, user_id, total, payment_id) +VALUES (20, 20, 956, 20); + +-- Order Items +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (1, 1, 21, 3, 1); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (2, 1, 25, 2, 1); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (3, 2, 22, 2, 2); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (4, 2, 27, 1, 2); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (5, 3, 15, 2, 3); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (6, 3, 32, 2, 3); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (7, 4, 17, 3, 4); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (8, 4, 28, 1, 4); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (9, 5, 47, 1, 5); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (10, 5, 34, 3, 5); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (11, 6, 16, 3, 6); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (12, 6, 19, 1, 6); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (13, 7, 17, 2, 7); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (14, 7, 10, 1, 7); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (15, 8, 40, 3, 8); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (16, 8, 29, 2, 8); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (17, 9, 23, 1, 9); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (18, 9, 13, 3, 9); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (19, 10, 8, 1, 10); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (20, 10, 2, 3, 10); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (21, 11, 27, 1, 11); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (22, 11, 4, 1, 11); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (23, 12, 27, 1, 12); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (24, 12, 10, 2, 12); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (25, 13, 8, 2, 13); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (26, 13, 22, 2, 13); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (27, 14, 33, 1, 14); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (28, 14, 46, 2, 14); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (29, 15, 37, 1, 15); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (30, 15, 10, 2, 15); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (31, 16, 27, 3, 16); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (32, 16, 26, 2, 16); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (33, 17, 15, 2, 17); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (34, 17, 12, 3, 17); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (35, 18, 39, 2, 18); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (36, 18, 26, 1, 18); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (37, 19, 15, 1, 19); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (38, 19, 29, 1, 19); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (39, 20, 16, 3, 20); +INSERT INTO order_items (id, order_id, product_id, quantity, user_id) +VALUES (40, 20, 8, 1, 20); \ No newline at end of file