-- phpMyAdmin SQL Dump -- version 5.2.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 08 Sty 2023, 18:27 -- Wersja serwera: 10.4.27-MariaDB -- Wersja PHP: 8.1.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Baza danych: `ecommerceapp` -- -- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `admin` -- CREATE TABLE `admin` ( `id` int(11) NOT NULL, `name` varchar(50) NOT NULL, `email` varchar(100) NOT NULL, `password` varchar(255) NOT NULL, `is_active` enum('0','1') NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; -- -- Zrzut danych tabeli `admin` -- INSERT INTO `admin` (`id`, `name`, `email`, `password`, `is_active`) VALUES (5, 'Anu', 'Anuadmin@gmail.com', '$2y$10$qZ0OoyX8bhAVxDFM/fx8leZSZwlyq15c1C/KTnaqDLSx6eCDJ0VpC', '0'), (8, 'AnoushkaS', 'anoush@gmail.com', '$2y$10$YKSDtra7v2wH6ORYfry8Ue9t49pk1AvQvdJGuq4lDvFLEcx.kP6Mq', '0'); -- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `brands` -- CREATE TABLE `brands` ( `brand_id` int(100) NOT NULL, `brand_title` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; -- -- Zrzut danych tabeli `brands` -- INSERT INTO `brands` (`brand_id`, `brand_title`) VALUES (1, 'HP'), (2, 'Samsung'), (3, 'Apple'), (4, 'Sony'), (5, 'LG'), (6, 'OnePlus+'), (7, 'Excl'), (8, 'Aduro'), (9, 'Dr. Martens'), (10, 'Hot Toys'); -- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `cart` -- CREATE TABLE `cart` ( `id` int(10) NOT NULL, `p_id` int(10) NOT NULL, `ip_add` varchar(250) NOT NULL, `user_id` int(10) DEFAULT NULL, `qty` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; -- -- Zrzut danych tabeli `cart` -- INSERT INTO `cart` (`id`, `p_id`, `ip_add`, `user_id`, `qty`) VALUES (1, 4, '::1', 4, 1), (3, 4, '::1', 7, 2), (5, 1, '::1', -1, 1); -- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `categories` -- CREATE TABLE `categories` ( `cat_id` int(100) NOT NULL, `cat_title` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; -- -- Zrzut danych tabeli `categories` -- INSERT INTO `categories` (`cat_id`, `cat_title`) VALUES (2, 'Electronics'), (3, 'Home & Kitchen'), (4, 'Tools & Home Improvement'), (5, 'CDs & Vinyl'), (6, 'Clothings'), (12, 'Mobiles'), (13, 'Automotive Parts & Accessories'), (14, 'Toys'); -- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `orders` -- CREATE TABLE `orders` ( `order_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `qty` int(11) NOT NULL, `trx_id` varchar(255) NOT NULL, `p_status` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; -- -- Zrzut danych tabeli `orders` -- INSERT INTO `orders` (`order_id`, `user_id`, `product_id`, `qty`, `trx_id`, `p_status`) VALUES (1, 1, 1, 1, '9L434522M7706801A', 'Completed'), (2, 1, 2, 1, '9L434522M7706801A', 'Completed'), (3, 1, 3, 1, '9L434522M7706801A', 'Completed'), (4, 1, 1, 1, '8AT7125245323433N', 'Completed'); -- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `products` -- CREATE TABLE `products` ( `product_id` int(100) NOT NULL, `product_cat` int(11) NOT NULL, `product_brand` int(100) NOT NULL, `product_title` varchar(255) NOT NULL, `product_price` int(100) NOT NULL, `product_qty` int(11) NOT NULL, `product_desc` text NOT NULL, `product_image` text NOT NULL, `product_keywords` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; -- -- Zrzut danych tabeli `products` -- INSERT INTO `products` (`product_id`, `product_cat`, `product_brand`, `product_title`, `product_price`, `product_qty`, `product_desc`, `product_image`, `product_keywords`) VALUES (1, 12, 2, 'Samsung Galaxy Z Fold 2', 249999, 5, 'Last year’s Galaxy Fold was a sort of experiment in the field of foldable phones. The idea was an innovative one but the phone faced a lot of durability issues. Its launch was postponed multiple times because of Samsung’s inability to solve all the problems. Samsung will likely avoid those situations with its successor.', '1616500092_sm-zfold.jpg', 'samsung, mobile, galaxy fold'), (2, 12, 3, 'Iphone 12 Pro Max', 187000, 7, '5G goes Pro. A14 Bionic rockets past every other smartphone chip. The Pro camera system takes low-light photography to the next level — with an even bigger jump on iPhone 12 Pro Max. And Ceramic Shield delivers four times better drop performance.', '1616499931_iph12pm.jpg', 'apple, iphone'), (4, 12, 2, 'Samsung Galaxy S21 Ultra', 155000, 10, 'This is a demo', '1616492395_Samsung-Galaxy-S21-Ultra-1608287647-0-0.jpg', 'samsung, s21, s21 ultra'), (5, 12, 6, 'OnePlus 8T', 86000, 13, 'On spec-sheet, the OnePlus 8T boasts plenty of improvements from its predecessor i.e. the OnePlus 8. For instance, its 6.55-inch 1080p OLED display now comes with a faster 120Hz refresh rate. In comparison, the OnePlus 8 had a 90Hz refresh rate. This upgrade seems huge. However, users will agree that you can’t really find much of a difference between 90Hz to 120Hz on a smartphone screen.', '1616500410_OnePlus-8T-5G-Lunar-Silver-8GB-RAM-128GB-Storage-image-4.jpg', 'one plus, oneplus8'), (10, 2, 8, 'Aduro Wireless Headphones', 4100, 6, 'Amazing Bluetooth headphones sound with aptX technology. High-quality built-in microphone with Bluetooth 5.0 technology', '1616502854_hdphn.jpg', 'headphone, aduro'), (11, 6, 9, 'Dr. Martens Mens Patch', 16000, 3, 'Color: Grey/Charcoal/Dark Grey', '1616503181_Dr. Martens.jpg', 'dr martens, shoes'), (19, 6, 7, 'Mens Hoodie', 3500, 4, 'Colors: Black/White/Maroon', '1616504885_menshoodie.jpg', 'hood, hoodie'), (20, 14, 10, 'Thanos Hot Toys', 8150, 19, 'Thanos sixth scale collectible figure.', '1616506942_thanos-hottoys.jpg', 'thanos, marvel, toys, hot toys'); -- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `user_info` -- CREATE TABLE `user_info` ( `user_id` int(10) NOT NULL, `first_name` varchar(100) NOT NULL, `email` varchar(300) NOT NULL, `password` varchar(300) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; -- -- Indeksy dla zrzutów tabel -- -- -- Indeksy dla tabeli `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `email` (`email`); -- -- Indeksy dla tabeli `brands` -- ALTER TABLE `brands` ADD PRIMARY KEY (`brand_id`); -- -- Indeksy dla tabeli `cart` -- ALTER TABLE `cart` ADD PRIMARY KEY (`id`); -- -- Indeksy dla tabeli `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`cat_id`); -- -- Indeksy dla tabeli `orders` -- ALTER TABLE `orders` ADD PRIMARY KEY (`order_id`); -- -- Indeksy dla tabeli `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`product_id`), ADD KEY `fk_product_cat` (`product_cat`), ADD KEY `fk_product_brand` (`product_brand`); -- -- AUTO_INCREMENT dla zrzuconych tabel -- -- -- AUTO_INCREMENT dla tabeli `admin` -- ALTER TABLE `admin` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT dla tabeli `brands` -- ALTER TABLE `brands` MODIFY `brand_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT dla tabeli `cart` -- ALTER TABLE `cart` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT dla tabeli `categories` -- ALTER TABLE `categories` MODIFY `cat_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- AUTO_INCREMENT dla tabeli `orders` -- ALTER TABLE `orders` MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT dla tabeli `products` -- ALTER TABLE `products` MODIFY `product_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; -- -- Ograniczenia dla zrzutów tabel -- -- -- Ograniczenia dla tabeli `products` -- ALTER TABLE `products` ADD CONSTRAINT `fk_product_brand` FOREIGN KEY (`product_brand`) REFERENCES `brands` (`brand_id`), ADD CONSTRAINT `fk_product_cat` FOREIGN KEY (`product_cat`) REFERENCES `categories` (`cat_id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;