-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 17, 2020 at 02:25 PM
-- Server version: 10.4.14-MariaDB-1:10.4.14+maria~bionic-log
-- PHP Version: 7.4.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `webobiavi`
--

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

--
-- Table structure for table `listings_reports`
--

CREATE TABLE `listings_reports` (
  `id` int(10) UNSIGNED NOT NULL,
  `listing_id` int(10) UNSIGNED NOT NULL,
  `report_type` enum('spam','wrong-category','violation','out-of-date','fraud') COLLATE utf8mb4_unicode_ci NOT NULL,
  `report_msg` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_reported` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `listings_reports`
--

INSERT INTO `listings_reports` (`id`, `listing_id`, `report_type`, `report_msg`, `date_reported`) VALUES
(9, 131, 'wrong-category', 'qwdqwd qwwqeqwe 123 1ed', '2020-07-01 05:28:24'),
(17, 138, 'fraud', 'викат че са 100 лева пък искат 150!', '2020-07-02 17:28:24'),
(18, 133, 'out-of-date', 'asdasdasdasdasdasasd', '2020-07-03 06:41:10'),
(19, 133, 'spam', 'ggacha spami ', '2020-07-10 11:43:24'),
(20, 133, 'wrong-category', 'asdasdasdasdasasd', '2020-07-11 12:28:24'),
(21, 133, 'wrong-category', 'asdasdasdasdasdasdasd', '2020-07-12 14:28:24'),
(22, 163, 'out-of-date', 'уж продават пък няма като се обадиш ', '2020-07-13 17:35:34');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `listings_reports`
--
ALTER TABLE `listings_reports`
  ADD PRIMARY KEY (`id`),
  ADD KEY `listing_id` (`listing_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `listings_reports`
--
ALTER TABLE `listings_reports`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `listings_reports`
--
ALTER TABLE `listings_reports`
  ADD CONSTRAINT `listings_reports_ibfk_1` FOREIGN KEY (`listing_id`) REFERENCES `listings` (`listing_id`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;
