-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `bas`
--

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

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
  `admin_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`admin_id`) VALUES
(1),
(2);

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

--
-- Table structure for table `items`
--

CREATE TABLE `items` (
  `items_id` int(11) NOT NULL,
  `itemCode` text NOT NULL,
  `items_name` text NOT NULL,
  `items_info` text NOT NULL,
  `category` text NOT NULL,
  `price` int(30) NOT NULL,
  `size_items` varchar(30) NOT NULL,
  `sub_category` text NOT NULL,
  `image` longblob NOT NULL,
  `created` datetime NOT NULL,
  `buyer_id` int(11) NOT NULL,
  `status` text NOT NULL,
  `image1` longblob NOT NULL,
  `image2` longblob NOT NULL,
  `image3` longblob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `items`
--

INSERT INTO `items` (`items_id`, `itemCode`, `items_name`, `items_info`, `category`, `price`, `size_items`, `sub_category`, `image`, `created`, `buyer_id`, `status`, `image1`, `image2`, `image3`) VALUES
(70, 'supreme cap.48', 'supreme cap', 'new', 'Clothes', 400, 'New', 'Mens Clothing', 0x[BLOB], '2018-05-14 08:59:22', 48, 'AVAILABLE', '', '', '');
INSERT INTO `items` (`items_id`, `itemCode`, `items_name`, `items_info`, `category`, `price`, `size_items`, `sub_category`, `image`, `created`, `buyer_id`, `status`, `image1`, `image2`, `image3`) VALUES
(71, 'Lomo.48', 'Lomo', 'New', 'Electronics', 200, 'New', 'Cameras', 0x[BLOB], '2018-05-14 08:59:52', 48, 'AVAILABLE', '', '', ''),
(73, 'Adidas Shirt.49', 'Adidas Shirt', 'Made in USA', 'Clothes', 200, 'New', 'Mens Clothing', 0x[BLOB], '2018-05-14 09:56:51', 49, 'AVAILABLE', '', '', ''),
(74, 'Adidas NMD.49', 'Adidas NMD', 'Size UK 9', 'Clothes', 300, 'New', 'Mens Shoes', 0x[BLOB], '2018-05-14 09:57:24', 49, 'AVAILABLE', '', '', '');
INSERT INTO `items` (`items_id`, `itemCode`, `items_name`, `items_info`, `category`, `price`, `size_items`, `sub_category`, `image`, `created`, `buyer_id`, `status`, `image1`, `image2`, `image3`) VALUES
(76, 'Iphone 7.47', 'Iphone 7', 'Warranty 7 months', 'Electronics', 2900, 'Used', 'Mobile Phone', 0x[BLOB], '2018-05-15 06:37:47', 47, 'AVAILABLE', '', '', '');
INSERT INTO `items` (`items_id`, `itemCode`, `items_name`, `items_info`, `category`, `price`, `size_items`, `sub_category`, `image`, `created`, `buyer_id`, `status`, `image1`, `image2`, `image3`) VALUES
(77, 'Hawai Shirt.47', 'Hawai Shirt', 'Size M', 'Clothes', 100, 'New', 'Mens Clothing', 0x[BLOB], '2018-05-15 06:39:49', 47, 'SOLD', '', '', '');
INSERT INTO `items` (`items_id`, `itemCode`, `items_name`, `items_info`, `category`, `price`, `size_items`, `sub_category`, `image`, `created`, `buyer_id`, `status`, `image1`, `image2`, `image3`) VALUES
(78, 'Supreme Red Cap.47', 'Supreme Red Cap', 'New', 'Clothes', 400, 'New', 'Mens Clothing', 0x[BLOB], '2018-05-20 21:39:26', 47, 'AVAILABLE', '', '', '');

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

--
-- Table structure for table `report`
--

CREATE TABLE `report` (
  `report_id` int(11) NOT NULL,
  `status_report` text NOT NULL,
  `buyer_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `admin_id` int(11) DEFAULT NULL,
  `log_report` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `report`
--

INSERT INTO `report` (`report_id`, `status_report`, `buyer_id`, `seller_id`, `admin_id`, `log_report`) VALUES
(6, 'Selling Counterfeit Item', 46, 43, NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
  ADD PRIMARY KEY (`admin_id`);

--
-- Indexes for table `items`
--
ALTER TABLE `items`
  ADD PRIMARY KEY (`items_id`);

--
-- Indexes for table `report`
--
ALTER TABLE `report`
  ADD PRIMARY KEY (`report_id`),
  ADD KEY `seller_id` (`buyer_id`),
  ADD KEY `admin_id` (`admin_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
  MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `items`
--
ALTER TABLE `items`
  MODIFY `items_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=79;

--
-- AUTO_INCREMENT for table `report`
--
ALTER TABLE `report`
  MODIFY `report_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `report`
--
ALTER TABLE `report`
  ADD CONSTRAINT `admin_id` FOREIGN KEY (`admin_id`) REFERENCES `admin` (`admin_id`),
  ADD CONSTRAINT `buyer_id` FOREIGN KEY (`buyer_id`) REFERENCES `buyer` (`buyer_id`),
  ADD CONSTRAINT `seller_id` FOREIGN KEY (`buyer_id`) REFERENCES `buyer` (`buyer_id`);
COMMIT;

