-- Adminer 4.8.1 MySQL 5.5.5-10.4.24-MariaDB dump

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

SET NAMES utf8mb4;

DROP TABLE IF EXISTS `category_request`;
CREATE TABLE `category_request` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_request_id` int(11) DEFAULT NULL,
  `cat_id` int(11) DEFAULT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `item_request_id` (`item_request_id`),
  KEY `category_id` (`cat_id`),
  CONSTRAINT `category_request_ibfk_1` FOREIGN KEY (`item_request_id`) REFERENCES `item_request` (`id`) ON DELETE CASCADE,
  CONSTRAINT `category_request_ibfk_2` FOREIGN KEY (`item_request_id`) REFERENCES `item_request` (`id`) ON DELETE CASCADE,
  CONSTRAINT `category_request_ibfk_3` FOREIGN KEY (`cat_id`) REFERENCES `category` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `category_request` (`id`, `item_request_id`, `cat_id`, `created`, `modified`) VALUES
(1,	1,	3,	'0000-00-00 00:00:00',	'2022-08-12 06:45:09'),
(2,	1,	4,	'0000-00-00 00:00:00',	'2022-08-12 06:45:18'),
(3,	1,	5,	'0000-00-00 00:00:00',	'2022-08-12 06:45:26'),
(4,	4,	21,	'0000-00-00 00:00:00',	'2022-08-12 11:37:22'),
(5,	4,	22,	'2022-08-12 17:07:40',	'2022-08-12 11:37:40'),
(6,	4,	23,	'2022-08-12 17:07:53',	'2022-08-12 11:37:53'),
(8,	4,	27,	'2022-08-12 17:08:34',	'2022-08-12 11:38:34');

DROP TABLE IF EXISTS `item_request`;
CREATE TABLE `item_request` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `brand_id` int(11) DEFAULT NULL,
  `price` varchar(20) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `message` longtext DEFAULT NULL,
  `status` tinyint(2) DEFAULT 0 COMMENT '0 => pending1 => approved 2 => declined',
  `created_by` int(11) DEFAULT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` datetime DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `brand_id` (`brand_id`),
  CONSTRAINT `item_request_ibfk_1` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `item_request` (`id`, `name`, `brand_id`, `price`, `image`, `message`, `status`, `created_by`, `created`, `deleted_at`, `updated_at`, `modified`) VALUES
(1,	'Chocolate',	1,	'190',	'/uploads/category/16599639302162-51364.jpg',	'fdsdfgsdffd',	0,	202,	'2022-08-12 17:09:42',	NULL,	'2022-08-12 11:39:42',	'2022-08-12 11:39:42'),
(2,	'Cream',	1,	'190',	'/uploads/category/16599639302162-51364.jpg	',	'fdsdfgsdffd',	1,	202,	'2022-08-12 17:09:38',	NULL,	'2022-08-12 11:39:38',	'2022-08-12 11:39:38'),
(4,	'Chai',	1,	'184',	'/uploads/category/16599639302162-51364.jpg',	'sdfsfydsuftysdusdf',	0,	202,	'2022-08-12 17:11:32',	NULL,	'2022-08-12 11:41:32',	'2022-08-12 11:41:32');

-- 2022-08-13 05:08:19
