-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 23, 2024 at 08:46 AM
-- Server version: 10.6.17-MariaDB
-- PHP Version: 8.1.27

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: `aiderste_enterprenuers`
--

-- --------------------------------------------------------

--
-- Table structure for table `batch_info`
--

CREATE TABLE `batch_info` (
  `batchID` varchar(15) NOT NULL,
  `createdon` datetime NOT NULL DEFAULT current_timestamp(),
  `customerid` varchar(15) NOT NULL,
  `shopid` varchar(15) NOT NULL,
  `quantity` int(11) NOT NULL,
  `value` double NOT NULL,
  `status` varchar(25) NOT NULL,
  `deliveredon` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='     d';

-- --------------------------------------------------------

--
-- Table structure for table `comment_info`
--

CREATE TABLE `comment_info` (
  `commentid` varchar(12) NOT NULL,
  `customerid` varchar(14) NOT NULL,
  `itemid` varchar(12) NOT NULL,
  `message` varchar(180) NOT NULL,
  `datecommented` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `itemimages`
--

CREATE TABLE `itemimages` (
  `shopid` varchar(14) NOT NULL,
  `itemid` varchar(12) NOT NULL,
  `directory` varchar(100) NOT NULL,
  `imagename` varchar(55) NOT NULL,
  `posteddate` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `item_info`
--

CREATE TABLE `item_info` (
  `itemid` varchar(12) NOT NULL,
  `shopid` varchar(15) NOT NULL,
  `itemname` varchar(50) NOT NULL,
  `itemtype` varchar(50) NOT NULL,
  `itemcategory` varchar(50) NOT NULL,
  `description` text NOT NULL,
  `expiredate` date NOT NULL,
  `itemcost` double NOT NULL,
  `dateposted` datetime NOT NULL DEFAULT current_timestamp(),
  `profileimages` varchar(125) DEFAULT NULL,
  `currency` varchar(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `order_info`
--

CREATE TABLE `order_info` (
  `orderid` varchar(12) NOT NULL,
  `shopid` varchar(14) NOT NULL,
  `customerid` varchar(14) NOT NULL,
  `batchID` varchar(15) NOT NULL,
  `paymentcode` varchar(8) NOT NULL,
  `quantity` int(11) NOT NULL,
  `dateordered` datetime NOT NULL DEFAULT current_timestamp(),
  `itemid` varchar(12) NOT NULL,
  `processingstatus` varchar(75) NOT NULL,
  `tcost` double NOT NULL,
  `deliverdate` date DEFAULT NULL,
  `reception` varchar(45) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `payment_info`
--

CREATE TABLE `payment_info` (
  `paymentcode` varchar(8) NOT NULL,
  `shopid` varchar(14) NOT NULL,
  `paymentmethod` varchar(50) NOT NULL,
  `amount` double NOT NULL,
  `codestatus` varchar(15) NOT NULL,
  `dategenerated` date NOT NULL,
  `itemid` varchar(12) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rating_info`
--

CREATE TABLE `rating_info` (
  `rateid` varchar(12) NOT NULL,
  `shopid` varchar(14) NOT NULL,
  `customerid` varchar(14) NOT NULL,
  `itemid` varchar(12) NOT NULL,
  `value` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `shop_info`
--

CREATE TABLE `shop_info` (
  `shopid` varchar(15) NOT NULL,
  `ownerid` varchar(14) NOT NULL,
  `shopname` varchar(35) NOT NULL,
  `street` varchar(50) NOT NULL,
  `ward` varchar(50) NOT NULL,
  `district` varchar(50) NOT NULL,
  `region` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `phoneno` varchar(13) NOT NULL,
  `email` varchar(50) NOT NULL,
  `postAddress` varchar(50) NOT NULL,
  `category` varchar(50) NOT NULL,
  `popularmark` varchar(155) NOT NULL,
  `dateregistered` datetime NOT NULL DEFAULT current_timestamp(),
  `directory` varchar(185) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `comment_info`
--
ALTER TABLE `comment_info`
  ADD PRIMARY KEY (`commentid`);

--
-- Indexes for table `itemimages`
--
ALTER TABLE `itemimages`
  ADD PRIMARY KEY (`directory`);

--
-- Indexes for table `item_info`
--
ALTER TABLE `item_info`
  ADD PRIMARY KEY (`itemid`);

--
-- Indexes for table `order_info`
--
ALTER TABLE `order_info`
  ADD PRIMARY KEY (`orderid`);

--
-- Indexes for table `payment_info`
--
ALTER TABLE `payment_info`
  ADD PRIMARY KEY (`paymentcode`);

--
-- Indexes for table `rating_info`
--
ALTER TABLE `rating_info`
  ADD PRIMARY KEY (`rateid`);

--
-- Indexes for table `shop_info`
--
ALTER TABLE `shop_info`
  ADD PRIMARY KEY (`shopid`);
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 */;
