Skip to content
Permalink
ea189a713f
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
191 lines (156 sloc) 5.36 KB
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 19, 2022 at 03:02 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.3
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 */;
--
-- Database: `computerforyou`
--
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE `orders` (
`id` int(11) NOT NULL,
`customerid` int(11) NOT NULL DEFAULT 1,
`customername` varchar(255) NOT NULL DEFAULT 'john smith',
`total_price` double NOT NULL,
`status` int(11) NOT NULL DEFAULT 0,
`payment_status` tinyint(1) NOT NULL DEFAULT 1,
`deletestatus` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `orders`
--
INSERT INTO `orders` (`id`, `customerid`, `customername`, `total_price`, `status`, `payment_status`, `deletestatus`) VALUES
(1, 1, 'john smith', 230, 1, 0, 0),
(2, 3, 'willium', 185, 0, 0, 0);
-- --------------------------------------------------------
--
-- Table structure for table `order_details`
--
CREATE TABLE `order_details` (
`id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`product_name` varchar(255) NOT NULL DEFAULT 'Product Name',
`quantity` int(11) NOT NULL,
`sub_total` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `order_details`
--
INSERT INTO `order_details` (`id`, `product_id`, `product_name`, `quantity`, `sub_total`) VALUES
(1, 1, 'Product 1', 2, 90),
(2, 2, 'Product 2', 3, 135),
(3, 1, 'Product 1', 1, 45),
(4, 2, 'Product 2', 3, 135);
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL DEFAULT 'Product ',
`price` float NOT NULL DEFAULT 45,
`description` longtext NOT NULL DEFAULT 'Product Description',
`quantity` int(11) NOT NULL DEFAULT 100,
`image` longtext NOT NULL DEFAULT 'default.png',
`deletestatus` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`id`, `name`, `price`, `description`, `quantity`, `image`, `deletestatus`) VALUES
(1, 'Product 1', 45, 'Product Description 1', 1050, 'default.png', 0),
(2, 'Product 2', 45, 'Product Description 2', 765, 'image_2.png', 0),
(3, 'product 3', 125, 'Product Description pro item 3', 0, 'default.png', 1),
(4, 'product 4', 455, 'Product Description pro item 4', 0, 'default.png', 1),
(5, 'product 50', 850, 'Product Description pro item 50', 0, 'default.png', 1),
(6, 'Product 6', 120, 'Product Description pro item 6', 0, 'default.png', 1),
(7, 'product 70', 1500, 'Product Description pro item 70', 0, 'image_5.png', 0),
(8, 'Product 8', 290, 'Product Description pro item 8', 0, 'default.png', 1),
(9, 'test item name 10', 1200, 'test description test description 10', 0, 'image_4.png', 1),
(10, 'test item name 100', 1300, 'test description test description 100', 0, 'image_5.png', 1),
(11, 'test item name 20', 1250, 'test description test description 20', 0, 'image_3.png', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`role` int(11) NOT NULL DEFAULT 1,
`deletestatus` tinyint(1) NOT NULL DEFAULT 0,
`approvestatus` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `username`, `password`, `role`, `deletestatus`, `approvestatus`) VALUES
(1, 'john smith', 'customer1@gmail.com', 'test1234', 1, 0, 1),
(2, 'admin', 'admin@gmail.com', 'test1234', 100, 0, 1),
(3, 'willium', 'customer2@gmail.com', 'test123', 1, 0, 1),
(4, 'customer 3', 'custosmer33@gmail.com', 'test1234', 1, 0, 1),
(5, 'customer 6', 'customfer90@gmail.com', 'test1234', 1, 0, 1);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `order_details`
--
ALTER TABLE `order_details`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `order_details`
--
ALTER TABLE `order_details`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
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 */;