/*
Navicat MySQL Data Transfer

Source Server         : localhost_3306
Source Server Version : 50519
Source Host           : localhost:3306
Source Database       : bookstore

Target Server Type    : MYSQL
Target Server Version : 50519
File Encoding         : 65001

Date: 2023-07-02 19:58:07
*/


-- ----------------------------
-- Table structure for `author`
-- ----------------------------
CREATE TABLE `author` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(500) DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `user_reg_id` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_author_user1_idx` (`user_id`),
  CONSTRAINT `fk_author_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of author
-- ----------------------------
INSERT INTO `author` VALUES ('1', 'C Perera', '1', null, '0', null);
INSERT INTO `author` VALUES ('2', 'Test User authur', '1', '2023-06-07 19:46:54', '1', '35');
INSERT INTO `author` VALUES ('3', 'Anil Bandara', '1', null, '0', null);
INSERT INTO `author` VALUES ('4', 'Angelo broos drama', '1', null, '0', null);
INSERT INTO `author` VALUES ('5', 'Samatha Jo', '1', null, '0', null);
INSERT INTO `author` VALUES ('6', 'Martin Wickramasinghe', '1', null, '0', null);
INSERT INTO `author` VALUES ('7', 'Anil K Senadeera', '1', null, '0', null);
INSERT INTO `author` VALUES ('8', 'aaa1', '2', '2023-04-29 23:37:36', '1', null);
INSERT INTO `author` VALUES ('9', 'wwr11', '2', '2023-05-02 10:15:11', '35', null);
INSERT INTO `author` VALUES ('10', 'Test Auth', '1', '2023-06-07 19:46:14', '1', '36');

-- ----------------------------
-- Table structure for `banners`
-- ----------------------------
CREATE TABLE `banners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create` datetime DEFAULT NULL,
  `number` int(11) DEFAULT NULL,
  `name` mediumtext,
  `url` longtext,
  `lastupdate` datetime DEFAULT NULL,
  `clicks` int(11) DEFAULT NULL COMMENT 'total clicks\n',
  `status` varchar(5) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `pages_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_banners_user1_idx` (`user_id`),
  KEY `fk_banners_pages1_idx` (`pages_id`),
  CONSTRAINT `fk_banners_pages1` FOREIGN KEY (`pages_id`) REFERENCES `pages` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_banners_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of banners
-- ----------------------------
INSERT INTO `banners` VALUES ('1', '2023-04-06 11:26:00', '1', 'test', 'images/banner/1681231483.jpg', '2023-04-11 22:14:43', null, '2', '1', '1');
INSERT INTO `banners` VALUES ('2', '2023-04-11 21:25:43', '2', 'test 1', 'images/banner/1681228543.jpg', '2023-04-11 21:25:43', null, '2', '1', '1');
INSERT INTO `banners` VALUES ('3', '2023-04-19 11:45:11', '2', 'Test event', 'images/banner/1681884911.jpg', '2023-04-19 11:45:11', null, '2', '1', '1');
INSERT INTO `banners` VALUES ('4', '2023-04-21 21:38:44', '1', 'Arts', 'images/banner/1682881963.png', '2023-05-01 00:42:43', null, '1', '1', '1');
INSERT INTO `banners` VALUES ('5', '2023-05-01 00:41:56', '2', 'test2', 'images/banner/1682881916.jpg', '2023-05-01 00:41:56', null, '1', '1', '1');
INSERT INTO `banners` VALUES ('6', '2023-05-01 00:44:59', '3', 'tst36', 'images/banner/1682882099.jpg', '2023-05-01 11:40:17', null, '1', '1', '1');
INSERT INTO `banners` VALUES ('7', '2023-05-02 10:10:11', '4', 'dsd dff', 'images/banner/1683002552.jpg', '2023-05-02 10:12:32', null, '1', '35', '1');
INSERT INTO `banners` VALUES ('8', '2023-06-05 22:22:42', '5', 'ff', 'images/banner/1685983962.png', '2023-06-06 10:03:38', null, '2', '1', '1');
INSERT INTO `banners` VALUES ('9', '2023-06-06 20:07:48', '5', 'sadsad', 'images/banner/1686062268.png', '2023-06-06 20:07:48', null, '1', '1', '1');

-- ----------------------------
-- Table structure for `banner_clicks`
-- ----------------------------
CREATE TABLE `banner_clicks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `count` int(11) DEFAULT NULL,
  `lastupdate` int(11) DEFAULT NULL,
  `banners_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_banner_clicks_banners1_idx` (`banners_id`),
  KEY `fk_banner_clicks_user2_idx` (`user_id`),
  CONSTRAINT `fk_banner_clicks_banners1` FOREIGN KEY (`banners_id`) REFERENCES `banners` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_banner_clicks_user2` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of banner_clicks
-- ----------------------------

-- ----------------------------
-- Table structure for `book`
-- ----------------------------
CREATE TABLE `book` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` longtext,
  `description` longtext,
  `book_url` longtext,
  `book_url_name` longtext COMMENT 'book file real name',
  `book_img` longtext,
  `book_sample_url` longtext,
  `book_sample_url_name` longtext COMMENT 'sample file real name',
  `pbacklink` longtext,
  `pbacklink_details` mediumtext,
  `isbn` varchar(100) DEFAULT NULL,
  `publishd_date` varchar(45) DEFAULT NULL,
  `language` varchar(45) DEFAULT NULL,
  `page_count` int(11) DEFAULT NULL,
  `rating` double DEFAULT '0',
  `price` double DEFAULT '0',
  `old_price` double DEFAULT '0',
  `clicks` int(11) DEFAULT '0',
  `created` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `publisher_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_book_publisher1_idx` (`publisher_id`),
  KEY `fk_book_user1_idx` (`user_id`),
  CONSTRAINT `fk_book_publisher1` FOREIGN KEY (`publisher_id`) REFERENCES `publisher` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_book_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of book
-- ----------------------------
INSERT INTO `book` VALUES ('1', 'Madol Doova', 'Madol Doova Sinhala: මඩොල් දූව is a children\'s novel and coming-of-age story written by Sri Lankan writer Martin Wickramasinghe and first published in 1947. The book recounts the misadventures of Upali Giniwella and his friends on the Southern coast of Sri Lanka during the 1890s.', null, null, 'https://cdn11.bigcommerce.com/s-ocfb74260x/images/stencil/1280x1280/products/403/436/MAT-KSB-00390-Madol_Doova_Sinhala__28859.1574598150.jpg', null, null, null, null, '65512277', null, 'Sinhala', '450', '2.4', '650', '750', null, '2023-03-06 07:14:16', '1', null, '5', '1');
INSERT INTO `book` VALUES ('2', 'Grade 10 English ', 'Study & Master English Grade 10 has been especially developed by an experienced author team according to the Curriculum and Assessment Policy Statement (CAPS). Includes: * an expanded contents page, showing how CAPS is covered each week * listening, speaking, reading, writing, and language activities that cover all the skills required by CAPS', null, null, 'https://m.media-amazon.com/images/I/41cXWF5BpsL.jpg', null, null, null, null, '954544', '10/08/1990', 'Sinhala', '320', '1.5', '820.5', '920', null, '2023-03-22 07:22:31', '1', null, '2', '1');
INSERT INTO `book` VALUES ('3', 'Music Book', 'Music Book,Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, ', null, null, 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/children%27s-colorful-kindle-music-book-cover-design-template-5b493779c372b453ec29341f60e079d7_screen.jpg', null, null, null, null, '7844', null, 'English', '850', '1', '1520', '1850', null, '2023-03-20 12:48:00', '1', null, '2', '1');
INSERT INTO `book` VALUES ('4', 'Tin Tin', 'Tin Tin Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, ', null, null, 'https://www.sarasavi.lk//storage/product/120415/FmVQ0XJffj8T9lur5XpOvK668TisP6aFHDYf3upl.jpg', null, null, null, null, '84454', null, 'English', '1200', '0', '3520', '4200', null, '2023-03-10 12:49:30', '1', null, '4', '1');
INSERT INTO `book` VALUES ('5', 'Medical Science', 'Medical Science Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,', null, null, 'images/book/cover_page/1688210807.jpg', null, null, '', null, '89897454sds', null, 'English', '4500', '3', '9845', '0', null, '2023-03-07 12:51:06', '1', '2023-07-01 16:56:47', '3', '1');
INSERT INTO `book` VALUES ('6', 'Information Technology', 'IT Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, ', null, null, 'https://m.media-amazon.com/images/I/51vb7WS9HNL.jpg', null, null, null, null, '823478454sdsd', null, 'Sinhala', '2875', '0', '3150', '0', null, '2023-03-01 12:53:11', '1', null, '1', '1');
INSERT INTO `book` VALUES ('7', 'Thriller', 'Thriller Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, ', null, null, 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/thriller-suspense-book-cover-design-template-1438d47348d378a3f26d2c78a2b48a54_screen.jpg', null, null, null, null, '25659898', null, 'English', '3000', '3.5', '4800', '0', null, '2023-03-13 12:54:12', '1', null, '3', '1');
INSERT INTO `book` VALUES ('8', 'Trees', 'Trees Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, ', null, null, 'https://d28hgpri8am2if.cloudfront.net/book_images/onix/cvr9781534475175/trees-9781534475175_hr.jpg', null, null, null, null, '54889865', null, 'English', '500', '4.5', '6850', '8900', null, '2023-03-08 12:59:06', '1', null, '1', '1');
INSERT INTO `book` VALUES ('9', 'Master Guide Grade 11', 'Master Guide Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, ', null, null, 'https://bookstudio.lk/wp-content/uploads/2022/01/Master-Guide-Grade-11-Mathematics-2-English-Medium.jpg', null, null, null, null, '787545454', null, 'Sinhala', '1600', '2.5', '4250', '6100', null, '2023-03-20 13:00:05', '1', null, '1', '1');
INSERT INTO `book` VALUES ('10', 'Earth', 'Erath Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, ', null, null, 'https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/1dc22871045781.5ef7864ea0a89.jpg', null, null, null, null, '565877878', null, 'English ', '2880', '0', '5100', '6500', null, '2023-03-13 13:00:58', '1', null, '2', '1');
INSERT INTO `book` VALUES ('11', 'sdsdfsdf', 'dsvxvfew', '1681170546.epub', null, '1681170546.jpg', null, null, null, null, '123456', '10/08/1990', 'English', '963', '0', '500', '650', null, null, '2', null, '3', '1');
INSERT INTO `book` VALUES ('12', 'Test Book', 'test', '1681230535.epub', null, '1681230535.jpg', null, null, null, null, null, '10/08/1990', 'English', '850', '0', '500', '630', '0', '2023-04-11 21:58:55', '2', null, '3', '1');
INSERT INTO `book` VALUES ('13', 'I am Malala', 'One year ago I left my home for school and never returned. I was shot by a Taliban bullet and was flown out of Pakistan unconscious. Some people say I will never return home but I believe firmly in my heart that I will. To be torn from the country that you love is not something to wish on anyone.', 'book/books/1681277910.epub', null, 'images/book/cover_page/1681277910.png', null, null, null, null, '854213544', '10/08/1990', 'English', '850', '0', '1500', '2500', '0', '2023-04-12 11:08:30', '1', null, '2', '1');
INSERT INTO `book` VALUES ('14', 'Living in the Light', 'Not long ago, I revised and updated my first book, Creative Visualization, and ever since that time, I’ve been feeling that I’d like to do the same for Living in the Light. The basic message of the book seems to be as timely and relevant as ever. Over the years since I wrote it, however, my understanding has developed and (hopefully) deepened through my own life experience and my work 1', 'book/books/1681278210.epub', null, 'images/book/cover_page/1681278210.png', null, null, null, null, '54845484', '20/05/1999', 'English', '845', '2', '1985', '0', '0', '2023-04-12 11:13:30', '1', null, '3', '1');
INSERT INTO `book` VALUES ('15', 'Non Title Book', 'years ago, and happens to be one of the to include masturbation, coitus interrup-best documented. This is because the two tus, and sexual abuse in childhood. He doctors involved – a surgeon and a phys-was attracted to Fliess’s idea of nasal ician – corresponded at length about it, reflex neurosis, and curious about how and the physician’s letters have been pre-these might apply to mental disorders.', 'book/books/1688029757.epub', 'The-Thirty-Nine-Steps.epub', 'images/book/cover_page/1681278374.jpg', null, null, '', null, null, '0506', 'Tamil', '256', '0', '855', '0', '0', '2023-04-12 11:16:14', '1', '2023-06-29 14:39:17', '5', '1');
INSERT INTO `book` VALUES ('16', 'Test You Book', 'Test You Book Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting', 'book/books/1681278564.epub', null, 'images/book/cover_page/1681278564.jpg', null, null, null, null, '9421122', '09/07/2005', 'Tamil', '866', '2.5', '520', '0', '0', '2023-04-12 11:19:24', '1', null, '1', '1');
INSERT INTO `book` VALUES ('17', 'ප්‍රජාවක සෞඛ්‍යkය ඉහළ නැංවීමට ගොඩනැගුනු සෞඛ්‍යය ප්‍රවර්ධන මෙවලම් සහ සංකල්ප | Prajawaka Sukkiya', 'ප්‍රජාවක සෞඛ්‍යය ඉහළ නැංවීමට ගොඩනැගනු සෞඛ්‍යය ප්‍රවර්ධන මෙවලම් සහ සංකල්ප | Prajawaka Sukkiya', 'book/books/1688028612.epub', 'The-Thirty-Nine-Steps.epub', 'images/book/cover_page/1682238710.jpg', 'images/book/sample_book/1686243399.pdf', 'Batch-File-Programming.pdf', 'https://en.wikipedia.org/wiki/Book', null, '2131234324', '0806', 'Tamil', '963', '0', '875', '966', '0', '2023-04-23 14:01:50', '1', '2023-07-01 18:37:09', '3', '1');
INSERT INTO `book` VALUES ('18', 'tewer', 'saczceffd', 'book/books/1682660095.epub', null, 'images/book/cover_page/1682660095.png', null, null, 'www.', null, '23213213', '01/02/2005', 'English', '524', '0', '500', '650', '0', '2023-04-28 11:04:55', '2', null, '3', '1');
INSERT INTO `book` VALUES ('19', 'salsa Drama', 'sadsad', 'book/books/1682660207.epub', null, 'images/book/cover_page/1682660207.png', null, null, 'ssdsad', null, null, '01/01/2005', 'Sinhala', '22', '0', '322', '1112', '0', '2023-04-28 11:06:47', '1', '2023-05-07 22:05:24', '3', '1');
INSERT INTO `book` VALUES ('20', 'sdsad book add', 'asdsad weeks', 'book/books/1682833208.epub', null, 'images/book/cover_page/1682833208.png', null, null, 'wwww', null, '235656546', '01/01/2005', 'Tamil', '333', '0', '222', '1111', '0', '2023-04-28 11:31:15', '1', '2023-04-30 11:10:08', '2', '33');
INSERT INTO `book` VALUES ('21', 'ABG Grand one two', 'test data 11', 'book/books/1682833312.epub', null, 'images/book/cover_page/1682833312.jpg', 'book/sample_book/1686236379.pdf', 'Batch-File-Programming.pdf', 'http://your-domain.com/storage/filename', null, '847410011', '05/05/2019', 'Sinhala', '220', '0', '4000', '5500', '0', '2023-04-30 11:11:53', '1', '2023-06-08 20:29:39', '4', '1');
INSERT INTO `book` VALUES ('22', 'Test 44', 'test', 'book/books/1685071757.epub', null, 'images/book/cover_page/1685071757.jpg', 'images/book/sample_book/1686282202.pdf', 'i-am-malala-pdf-book-by-malala-downloaded-4m-pakistanifun.commalala-yousafzai-christina-lamb.pdf', 'https://www.google.com/search?q=book+cover+design&sxsrf=APwXEdeEH58W760N8C901UxhSiVU82X3Pw:1685070968125&source=lnms&tbm=isch&sa=X&ved=2ahUKEwilxOfDgpL_AhXu8DgGHRGoDucQ_AUoAXoECAEQAw&biw=1366&bih=671&dpr=1#imgrc=KP6beNfHDRloWM', null, '454545464', '15/12/2015', 'English', '255', '0', '2500', '2750', '0', '2023-05-26 08:59:17', '1', '2023-06-09 09:13:22', '2', '1');
INSERT INTO `book` VALUES ('23', 'මගේ පාසල|Mage pasala', 'sdsdsdsadsad', 'book/books/1686905086.epub', 'iammalla.epub', 'images/book/cover_page/1686905086.jpg', 'images/book/sample_book/1686905086.pdf', 'programm-language.pdf', 'https://www.google.com/search?sxsrf=APwXEddgxItzbLD098Yo9ANVcYQeucP70w:1686904483021&q=cover+page+design&tbm=isch&sa=X&ved=2ahUKEwjIyevzsMf_AhUb4jgGHSF7AGUQ0pQJegQIDBAB&biw=1366&bih=671&dpr=1#imgrc=ypTjlnqiDzJdkM', null, '', null, 'Sinhala', null, '0', '500', '800', '0', '2023-06-16 14:14:46', '1', '2023-06-22 13:58:30', '4', '1');
INSERT INTO `book` VALUES ('24', 'Book Story', 'sadasd', 'book/books/1687007386.epub', 'willett2008 (1).epub', 'images/book/cover_page/1687007386.jpg', 'images/book/sample_book/1687007386.pdf', 'Batch-File-Programming.pdf', '', null, '', '2000', 'English', null, '0', '560', '0', '0', '2023-06-17 18:39:46', '1', '2023-06-23 21:33:24', '2', '1');

-- ----------------------------
-- Table structure for `book_category`
-- ----------------------------
CREATE TABLE `book_category` (
  `category_id` int(11) NOT NULL,
  `book_id` int(11) NOT NULL,
  PRIMARY KEY (`category_id`,`book_id`),
  KEY `fk_book_category_book1_idx` (`book_id`),
  KEY `fk_book_category_category1_idx` (`category_id`),
  CONSTRAINT `fk_book_category_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_book_category_category1` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of book_category
-- ----------------------------
INSERT INTO `book_category` VALUES ('4', '1');
INSERT INTO `book_category` VALUES ('6', '1');
INSERT INTO `book_category` VALUES ('9', '1');
INSERT INTO `book_category` VALUES ('1', '2');
INSERT INTO `book_category` VALUES ('2', '2');
INSERT INTO `book_category` VALUES ('7', '2');
INSERT INTO `book_category` VALUES ('1', '3');
INSERT INTO `book_category` VALUES ('10', '3');
INSERT INTO `book_category` VALUES ('4', '4');
INSERT INTO `book_category` VALUES ('13', '4');
INSERT INTO `book_category` VALUES ('1', '5');
INSERT INTO `book_category` VALUES ('3', '5');
INSERT INTO `book_category` VALUES ('7', '5');
INSERT INTO `book_category` VALUES ('1', '6');
INSERT INTO `book_category` VALUES ('2', '6');
INSERT INTO `book_category` VALUES ('6', '6');
INSERT INTO `book_category` VALUES ('12', '6');
INSERT INTO `book_category` VALUES ('4', '7');
INSERT INTO `book_category` VALUES ('13', '7');
INSERT INTO `book_category` VALUES ('9', '8');
INSERT INTO `book_category` VALUES ('1', '9');
INSERT INTO `book_category` VALUES ('7', '9');
INSERT INTO `book_category` VALUES ('1', '10');
INSERT INTO `book_category` VALUES ('2', '11');
INSERT INTO `book_category` VALUES ('3', '12');
INSERT INTO `book_category` VALUES ('6', '12');
INSERT INTO `book_category` VALUES ('4', '13');
INSERT INTO `book_category` VALUES ('6', '13');
INSERT INTO `book_category` VALUES ('6', '14');
INSERT INTO `book_category` VALUES ('10', '14');
INSERT INTO `book_category` VALUES ('13', '14');
INSERT INTO `book_category` VALUES ('8', '15');
INSERT INTO `book_category` VALUES ('13', '15');
INSERT INTO `book_category` VALUES ('15', '15');
INSERT INTO `book_category` VALUES ('1', '16');
INSERT INTO `book_category` VALUES ('4', '16');
INSERT INTO `book_category` VALUES ('10', '16');
INSERT INTO `book_category` VALUES ('11', '16');
INSERT INTO `book_category` VALUES ('16', '16');
INSERT INTO `book_category` VALUES ('4', '17');
INSERT INTO `book_category` VALUES ('13', '17');
INSERT INTO `book_category` VALUES ('16', '17');
INSERT INTO `book_category` VALUES ('4', '18');
INSERT INTO `book_category` VALUES ('2', '19');
INSERT INTO `book_category` VALUES ('5', '20');
INSERT INTO `book_category` VALUES ('3', '21');
INSERT INTO `book_category` VALUES ('5', '21');
INSERT INTO `book_category` VALUES ('2', '22');
INSERT INTO `book_category` VALUES ('5', '22');
INSERT INTO `book_category` VALUES ('1', '23');
INSERT INTO `book_category` VALUES ('2', '23');
INSERT INTO `book_category` VALUES ('5', '24');

-- ----------------------------
-- Table structure for `book_clicks`
-- ----------------------------
CREATE TABLE `book_clicks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `count` int(11) DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `book_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_book_clicks_book1_idx` (`book_id`),
  KEY `fk_book_clicks_user1_idx` (`user_id`),
  CONSTRAINT `fk_book_clicks_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_book_clicks_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of book_clicks
-- ----------------------------

-- ----------------------------
-- Table structure for `book_genre`
-- ----------------------------
CREATE TABLE `book_genre` (
  `book_id` int(11) NOT NULL,
  `genre_id` int(11) NOT NULL,
  PRIMARY KEY (`book_id`,`genre_id`),
  KEY `fk_book_genre_book1_idx` (`book_id`),
  KEY `fk_book_genre_genre1_idx` (`genre_id`),
  CONSTRAINT `fk_book_genre_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_book_genre_genre1` FOREIGN KEY (`genre_id`) REFERENCES `genre` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of book_genre
-- ----------------------------
INSERT INTO `book_genre` VALUES ('1', '2');
INSERT INTO `book_genre` VALUES ('1', '3');
INSERT INTO `book_genre` VALUES ('2', '5');
INSERT INTO `book_genre` VALUES ('3', '5');
INSERT INTO `book_genre` VALUES ('4', '1');
INSERT INTO `book_genre` VALUES ('4', '2');
INSERT INTO `book_genre` VALUES ('4', '12');
INSERT INTO `book_genre` VALUES ('5', '5');
INSERT INTO `book_genre` VALUES ('6', '5');
INSERT INTO `book_genre` VALUES ('7', '1');
INSERT INTO `book_genre` VALUES ('7', '13');
INSERT INTO `book_genre` VALUES ('7', '15');
INSERT INTO `book_genre` VALUES ('8', '5');
INSERT INTO `book_genre` VALUES ('8', '12');
INSERT INTO `book_genre` VALUES ('8', '18');
INSERT INTO `book_genre` VALUES ('10', '5');
INSERT INTO `book_genre` VALUES ('10', '9');
INSERT INTO `book_genre` VALUES ('15', '1');
INSERT INTO `book_genre` VALUES ('16', '3');
INSERT INTO `book_genre` VALUES ('17', '5');
INSERT INTO `book_genre` VALUES ('18', '2');
INSERT INTO `book_genre` VALUES ('19', '5');
INSERT INTO `book_genre` VALUES ('20', '2');
INSERT INTO `book_genre` VALUES ('21', '3');
INSERT INTO `book_genre` VALUES ('21', '5');
INSERT INTO `book_genre` VALUES ('22', '2');
INSERT INTO `book_genre` VALUES ('23', '5');
INSERT INTO `book_genre` VALUES ('24', '6');

-- ----------------------------
-- Table structure for `book_has_author`
-- ----------------------------
CREATE TABLE `book_has_author` (
  `book_id` int(11) NOT NULL,
  `author_id` int(11) NOT NULL,
  PRIMARY KEY (`book_id`,`author_id`),
  KEY `fk_book_has_author_book1_idx` (`book_id`),
  KEY `fk_book_has_author_author1_idx` (`author_id`),
  CONSTRAINT `fk_book_has_author_author1` FOREIGN KEY (`author_id`) REFERENCES `author` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_book_has_author_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of book_has_author
-- ----------------------------
INSERT INTO `book_has_author` VALUES ('1', '5');
INSERT INTO `book_has_author` VALUES ('2', '2');
INSERT INTO `book_has_author` VALUES ('2', '3');
INSERT INTO `book_has_author` VALUES ('3', '2');
INSERT INTO `book_has_author` VALUES ('3', '4');
INSERT INTO `book_has_author` VALUES ('4', '4');
INSERT INTO `book_has_author` VALUES ('5', '5');
INSERT INTO `book_has_author` VALUES ('6', '1');
INSERT INTO `book_has_author` VALUES ('7', '5');
INSERT INTO `book_has_author` VALUES ('11', '3');
INSERT INTO `book_has_author` VALUES ('12', '5');
INSERT INTO `book_has_author` VALUES ('13', '5');
INSERT INTO `book_has_author` VALUES ('14', '4');
INSERT INTO `book_has_author` VALUES ('14', '5');
INSERT INTO `book_has_author` VALUES ('15', '1');
INSERT INTO `book_has_author` VALUES ('16', '1');
INSERT INTO `book_has_author` VALUES ('17', '4');
INSERT INTO `book_has_author` VALUES ('17', '6');
INSERT INTO `book_has_author` VALUES ('18', '4');
INSERT INTO `book_has_author` VALUES ('19', '3');
INSERT INTO `book_has_author` VALUES ('20', '3');
INSERT INTO `book_has_author` VALUES ('21', '1');
INSERT INTO `book_has_author` VALUES ('21', '7');
INSERT INTO `book_has_author` VALUES ('22', '3');
INSERT INTO `book_has_author` VALUES ('23', '2');
INSERT INTO `book_has_author` VALUES ('24', '7');

-- ----------------------------
-- Table structure for `cart`
-- ----------------------------
CREATE TABLE `cart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `total` double DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_cart_user1_idx` (`user_id`),
  CONSTRAINT `fk_cart_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=237 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cart
-- ----------------------------
INSERT INTO `cart` VALUES ('48', '2023-04-13 10:21:07', null, null, '3', '26');
INSERT INTO `cart` VALUES ('84', '2023-04-25 00:33:01', null, null, '3', '26');
INSERT INTO `cart` VALUES ('124', '2023-04-27 22:21:19', null, null, '3', '2');
INSERT INTO `cart` VALUES ('199', '2023-04-30 23:04:52', null, null, '3', '26');
INSERT INTO `cart` VALUES ('228', '2023-06-22 14:18:01', null, null, '1', '26');
INSERT INTO `cart` VALUES ('232', '2023-07-01 18:22:32', null, null, '3', '2');
INSERT INTO `cart` VALUES ('236', '2023-07-02 18:21:51', null, null, '1', '2');

-- ----------------------------
-- Table structure for `cart_items`
-- ----------------------------
CREATE TABLE `cart_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `book_id` int(11) NOT NULL,
  `cart_id` int(11) NOT NULL,
  `discounts_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_cart_items_cart1_idx` (`cart_id`),
  KEY `fk_cart_items_book1_idx` (`book_id`),
  KEY `fk_cart_items_discounts1_idx` (`discounts_id`),
  CONSTRAINT `fk_cart_items_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_cart_items_cart1` FOREIGN KEY (`cart_id`) REFERENCES `cart` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_cart_items_discounts1` FOREIGN KEY (`discounts_id`) REFERENCES `discount` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=326 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cart_items
-- ----------------------------
INSERT INTO `cart_items` VALUES ('92', '2023-04-25 00:33:01', '3', '17', '84', null);
INSERT INTO `cart_items` VALUES ('111', '2023-04-27 22:21:19', '3', '15', '124', null);
INSERT INTO `cart_items` VALUES ('282', '2023-04-30 23:04:52', '3', '2', '199', null);
INSERT INTO `cart_items` VALUES ('283', '2023-04-30 23:04:52', '3', '3', '199', null);
INSERT INTO `cart_items` VALUES ('284', '2023-04-30 23:04:52', '3', '5', '199', null);
INSERT INTO `cart_items` VALUES ('285', '2023-04-30 23:04:52', '3', '10', '199', null);
INSERT INTO `cart_items` VALUES ('316', '2023-06-22 14:18:01', '1', '16', '228', null);
INSERT INTO `cart_items` VALUES ('317', '2023-06-22 14:18:01', '1', '6', '228', null);
INSERT INTO `cart_items` VALUES ('322', '2023-07-01 18:22:32', '3', '17', '232', null);
INSERT INTO `cart_items` VALUES ('323', '2023-07-01 18:22:32', '3', '23', '232', null);
INSERT INTO `cart_items` VALUES ('325', '2023-07-02 18:21:51', '1', '16', '236', null);

-- ----------------------------
-- Table structure for `category`
-- ----------------------------
CREATE TABLE `category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(500) DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_category_user1_idx` (`user_id`),
  CONSTRAINT `fk_category_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES ('1', 'Educational', '1', null, '0');
INSERT INTO `category` VALUES ('2', 'Teachers Guide', '1', null, '0');
INSERT INTO `category` VALUES ('3', 'Medical Books', '1', null, '0');
INSERT INTO `category` VALUES ('4', 'Novels', '1', null, '0');
INSERT INTO `category` VALUES ('5', 'Travel', '1', null, '0');
INSERT INTO `category` VALUES ('6', 'Megazine', '1', null, '0');
INSERT INTO `category` VALUES ('7', 'Work Book', '1', null, '0');
INSERT INTO `category` VALUES ('8', 'Experiment', '1', null, '0');
INSERT INTO `category` VALUES ('9', 'News', '1', null, '0');
INSERT INTO `category` VALUES ('10', 'Arts', '1', null, '0');
INSERT INTO `category` VALUES ('11', 'Design', '1', null, '0');
INSERT INTO `category` VALUES ('12', 'Technology', '1', null, '0');
INSERT INTO `category` VALUES ('13', 'Short Stories', '1', null, '0');
INSERT INTO `category` VALUES ('14', 'test', '1', null, '0');
INSERT INTO `category` VALUES ('15', 'Gaming', '1', null, '0');
INSERT INTO `category` VALUES ('16', '18+', '1', null, '0');
INSERT INTO `category` VALUES ('17', 'Leesa1', '1', '2023-06-19 13:07:57', '1');
INSERT INTO `category` VALUES ('18', 'Ghost 1', '2', '2023-04-29 23:36:46', '1');
INSERT INTO `category` VALUES ('19', 'aab', '2', '2023-05-01 17:36:36', '1');
INSERT INTO `category` VALUES ('20', 'aass', '2', '2023-05-02 10:14:28', '35');

-- ----------------------------
-- Table structure for `discount`
-- ----------------------------
CREATE TABLE `discount` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `value` double DEFAULT NULL COMMENT 'discount from %',
  `status` varchar(5) DEFAULT NULL,
  `discount_reg_id` int(11) NOT NULL,
  `book_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_discounts_discount_reg1_idx` (`discount_reg_id`),
  KEY `fk_discounts_book1_idx` (`book_id`),
  CONSTRAINT `fk_discounts_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_discounts_discount_reg1` FOREIGN KEY (`discount_reg_id`) REFERENCES `discount_reg` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of discount
-- ----------------------------

-- ----------------------------
-- Table structure for `discount_reg`
-- ----------------------------
CREATE TABLE `discount_reg` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `create` datetime DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_discount_reg_user1_idx` (`user_id`),
  CONSTRAINT `fk_discount_reg_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of discount_reg
-- ----------------------------

-- ----------------------------
-- Table structure for `events`
-- ----------------------------
CREATE TABLE `events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` mediumtext,
  `web_link` longtext,
  `description` longtext,
  `url` longtext,
  `create` datetime DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_events_user1_idx` (`user_id`),
  CONSTRAINT `fk_events_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of events
-- ----------------------------
INSERT INTO `events` VALUES ('1', 'Test event', 'https://search.brave.com/search?q=abc&source=desktop', 'test decrpitn', 'images/events/1680761110.jpg', '2023-04-06 11:35:10', '2023-04-06 11:35:10', '1', '1');
INSERT INTO `events` VALUES ('2', 'test', 'sdsad', 'sdasdasd', 'images/events/1681082910.jpg', '2023-04-10 04:58:30', '2023-04-10 04:58:30', '2', '1');
INSERT INTO `events` VALUES ('3', 'welcome 1 ae', 'https://search.brave.com/search?q=abc&source=desktop', 'zdzdvcv', 'images/events/1681170290.jpg', '2023-04-11 05:14:50', '2023-04-11 05:14:50', '2', '1');
INSERT INTO `events` VALUES ('4', 'Test event 1', 'https://search.brave.com/search?q=abc&source=desktop', 'asdas', 'images/events/1681231663.jpg', '2023-04-11 05:20:31', '2023-04-11 22:17:43', '1', '1');
INSERT INTO `events` VALUES ('5', 'hgfhgfjg', 'https://search.brave.com/search?q=abc&source=desktop', 'nvjhgkjbkj', 'images/events/1681231275.jpg', '2023-04-11 22:11:15', '2023-04-11 22:11:15', '2', '1');
INSERT INTO `events` VALUES ('6', 'Event Kurunegala', 'https://search.brave.com/search?q=abc&source=desktop', 'jhgygy', 'images/events/1681231348.jpg', '2023-04-11 22:12:28', '2023-04-12 08:33:58', '2', '1');
INSERT INTO `events` VALUES ('7', 'Event 3', 'https://search.brave.com/search?q=abc&source=desktop', 'asdasdascxvxv', 'images/events/1682094490.png', '2023-04-21 21:58:10', '2023-04-21 21:58:10', '2', '1');
INSERT INTO `events` VALUES ('8', 'sassa faf111', 'wwwwfff111', 'asdadww sadadc asd 11', 'images/events/1683002799.jpg', '2023-05-02 10:16:20', '2023-05-02 10:16:39', '1', '35');

-- ----------------------------
-- Table structure for `f_a_q`
-- ----------------------------
CREATE TABLE `f_a_q` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `quiz` longtext,
  `answer` longtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of f_a_q
-- ----------------------------
INSERT INTO `f_a_q` VALUES ('1', 'What is the payment method?', 'Card/Carsh payemnt add');
INSERT INTO `f_a_q` VALUES ('2', 'Can i read books using this app?', 'Yes, you can read a book using this app');
INSERT INTO `f_a_q` VALUES ('3', 'What are FAQ questions?', 'A frequently asked questions (FAQ) list is often used in articles, websites, email lists, and online forums where common questions tend to recur, for example through posts or queries by new users related to common knowledge gaps. The purpose of a FAQ is generally to provide information on frequent questions or concerns; however, the format is a useful means of organizing information, and text consisting of questions and their answers may thus be called a FAQ regardless of whether the questions are actually frequently asked');

-- ----------------------------
-- Table structure for `genre`
-- ----------------------------
CREATE TABLE `genre` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(500) DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_genre_user1_idx` (`user_id`),
  CONSTRAINT `fk_genre_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of genre
-- ----------------------------
INSERT INTO `genre` VALUES ('1', 'Action', null, '1', '0');
INSERT INTO `genre` VALUES ('2', 'Drama', null, '1', '0');
INSERT INTO `genre` VALUES ('3', 'Adult', null, '1', '0');
INSERT INTO `genre` VALUES ('4', 'Horror', null, '1', '0');
INSERT INTO `genre` VALUES ('5', 'Documentry', null, '1', '0');
INSERT INTO `genre` VALUES ('6', 'Romance', null, '1', '0');
INSERT INTO `genre` VALUES ('7', 'War', null, '1', '0');
INSERT INTO `genre` VALUES ('8', 'Comedy', null, '1', '0');
INSERT INTO `genre` VALUES ('9', 'Sci-Fi', null, '1', '0');
INSERT INTO `genre` VALUES ('10', 'Musical', null, '1', '0');
INSERT INTO `genre` VALUES ('11', 'Crime', null, '1', '0');
INSERT INTO `genre` VALUES ('12', 'Western', null, '2', '0');
INSERT INTO `genre` VALUES ('13', 'Mystery', null, '1', '0');
INSERT INTO `genre` VALUES ('14', 'Fantacy', null, '1', '0');
INSERT INTO `genre` VALUES ('15', 'Thriller', null, '1', '0');
INSERT INTO `genre` VALUES ('16', 'Adventure', null, '1', '0');
INSERT INTO `genre` VALUES ('17', 'Sport', null, '1', '0');
INSERT INTO `genre` VALUES ('18', 'Folk', '2023-06-19 13:08:21', '1', '1');
INSERT INTO `genre` VALUES ('19', 'YEs 1', '2023-04-29 23:37:12', '2', '1');
INSERT INTO `genre` VALUES ('20', 'aww', '2023-05-02 10:14:52', '2', '35');

-- ----------------------------
-- Table structure for `home_page`
-- ----------------------------
CREATE TABLE `home_page` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `type` varchar(45) DEFAULT NULL,
  `order_num` int(11) DEFAULT NULL COMMENT 'order num - there is 5 sections that is 1,2,3,4,5 order num set field',
  `lastlog` datetime DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_home_page_user1_idx` (`user_id`),
  CONSTRAINT `fk_home_page_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of home_page
-- ----------------------------
INSERT INTO `home_page` VALUES ('1', 'Educational', 'Category', '1', '2023-04-21 21:35:56', '1');
INSERT INTO `home_page` VALUES ('2', 'Arts', 'Category', '2', '2023-06-18 21:51:47', '1');
INSERT INTO `home_page` VALUES ('3', 'Novels', 'Category', '3', '2023-06-13 15:29:19', '1');
INSERT INTO `home_page` VALUES ('4', 'Teachers Guide', 'Category', '4', '2023-04-22 13:16:35', '1');
INSERT INTO `home_page` VALUES ('5', 'Megazine', 'Category', '5', '2023-06-18 21:51:33', '1');

-- ----------------------------
-- Table structure for `home_page_books`
-- ----------------------------
CREATE TABLE `home_page_books` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `home_page_id` int(11) NOT NULL,
  `book_id` int(11) NOT NULL,
  `status` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_home_page_books_book1_idx` (`book_id`),
  KEY `fk_home_page_books_home_page1_idx` (`home_page_id`),
  CONSTRAINT `fk_home_page_books_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_home_page_books_home_page1` FOREIGN KEY (`home_page_id`) REFERENCES `home_page` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of home_page_books
-- ----------------------------
INSERT INTO `home_page_books` VALUES ('5', '5', '19', null);
INSERT INTO `home_page_books` VALUES ('6', '5', '17', null);
INSERT INTO `home_page_books` VALUES ('7', '5', '1', null);
INSERT INTO `home_page_books` VALUES ('9', '5', '16', null);

-- ----------------------------
-- Table structure for `migrations`
-- ----------------------------
CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES ('1', '2019_12_14_000001_create_personal_access_tokens_table', '1');

-- ----------------------------
-- Table structure for `pages`
-- ----------------------------
CREATE TABLE `pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(45) DEFAULT NULL COMMENT 'web or mobile page',
  `name` varchar(45) DEFAULT NULL,
  `link` longtext,
  `status` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of pages
-- ----------------------------
INSERT INTO `pages` VALUES ('1', 'WEB', 'Dashboard', null, '1');
INSERT INTO `pages` VALUES ('2', 'WEB', 'Banner', null, '1');
INSERT INTO `pages` VALUES ('3', 'WEB', 'Welcome Page', null, '1');
INSERT INTO `pages` VALUES ('4', 'WEB', 'Home Page', null, '1');
INSERT INTO `pages` VALUES ('5', 'WEB', 'Category', null, '1');
INSERT INTO `pages` VALUES ('6', 'WEB', 'Genre', null, '1');
INSERT INTO `pages` VALUES ('7', 'WEB', 'Authors', null, '1');
INSERT INTO `pages` VALUES ('8', 'WEB', 'Publisher', null, '1');
INSERT INTO `pages` VALUES ('9', 'WEB', 'Events', null, '1');
INSERT INTO `pages` VALUES ('10', 'WEB', 'Book', null, '1');
INSERT INTO `pages` VALUES ('11', 'WEB', 'Reports', null, '1');
INSERT INTO `pages` VALUES ('12', 'WEB', 'User', null, '1');
INSERT INTO `pages` VALUES ('13', 'WEB', 'FAQ', null, '1');
INSERT INTO `pages` VALUES ('14', 'WEB', 'Book - Review', null, '1');
INSERT INTO `pages` VALUES ('15', 'WEB', 'User - Access', null, '1');

-- ----------------------------
-- Table structure for `payment`
-- ----------------------------
CREATE TABLE `payment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cardtype` varchar(45) DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `cart_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_payment_cart1_idx` (`cart_id`),
  CONSTRAINT `fk_payment_cart1` FOREIGN KEY (`cart_id`) REFERENCES `cart` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for `previllage`
-- ----------------------------
CREATE TABLE `previllage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ability` int(11) DEFAULT NULL,
  `add` int(11) DEFAULT NULL,
  `update` int(11) DEFAULT NULL,
  `delete` int(11) DEFAULT NULL,
  `search` int(11) DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `pages_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `usertype_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_previllage_pages1_idx` (`pages_id`),
  KEY `fk_previllage_usertype1_idx` (`usertype_id`),
  KEY `fk_previllage_user1_idx` (`user_id`),
  CONSTRAINT `fk_previllage_pages1` FOREIGN KEY (`pages_id`) REFERENCES `pages` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_previllage_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_previllage_usertype1` FOREIGN KEY (`usertype_id`) REFERENCES `usertype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1400 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of previllage
-- ----------------------------
INSERT INTO `previllage` VALUES ('365', '1', '0', '0', '0', '0', '1', '1', null, '4');
INSERT INTO `previllage` VALUES ('366', '1', '1', '1', '1', '1', '1', '2', null, '4');
INSERT INTO `previllage` VALUES ('367', '1', '1', '1', '1', '1', '1', '3', null, '4');
INSERT INTO `previllage` VALUES ('368', '1', '1', '1', '1', '1', '1', '4', null, '4');
INSERT INTO `previllage` VALUES ('369', '1', '1', '1', '1', '1', '1', '5', null, '4');
INSERT INTO `previllage` VALUES ('370', '1', '1', '1', '1', '1', '1', '6', null, '4');
INSERT INTO `previllage` VALUES ('371', '1', '1', '1', '1', '1', '1', '7', null, '4');
INSERT INTO `previllage` VALUES ('372', '1', '1', '1', '1', '1', '1', '8', null, '4');
INSERT INTO `previllage` VALUES ('373', '1', '1', '1', '1', '1', '1', '9', null, '4');
INSERT INTO `previllage` VALUES ('374', '1', '1', '1', '1', '1', '1', '10', null, '4');
INSERT INTO `previllage` VALUES ('375', '1', '1', '1', '1', '1', '1', '11', null, '4');
INSERT INTO `previllage` VALUES ('376', '1', '1', '1', '1', '1', '1', '12', null, '4');
INSERT INTO `previllage` VALUES ('377', '1', '1', '1', '1', '1', '1', '13', null, '4');
INSERT INTO `previllage` VALUES ('378', '1', '0', '0', '1', '0', '1', '14', null, '4');
INSERT INTO `previllage` VALUES ('379', '1', '0', '0', '1', '0', '1', '15', null, '4');
INSERT INTO `previllage` VALUES ('1295', '0', '0', '0', '0', '0', '1', '1', null, '2');
INSERT INTO `previllage` VALUES ('1296', '1', '1', '1', '1', '0', '1', '2', null, '2');
INSERT INTO `previllage` VALUES ('1297', '1', '1', '1', '1', '0', '1', '3', null, '2');
INSERT INTO `previllage` VALUES ('1298', '1', '1', '1', '1', '0', '1', '4', null, '2');
INSERT INTO `previllage` VALUES ('1299', '1', '1', '0', '1', '0', '1', '5', null, '2');
INSERT INTO `previllage` VALUES ('1300', '1', '1', '1', '1', '0', '1', '6', null, '2');
INSERT INTO `previllage` VALUES ('1301', '1', '0', '0', '0', '0', '1', '7', null, '2');
INSERT INTO `previllage` VALUES ('1302', '1', '1', '1', '1', '0', '1', '8', null, '2');
INSERT INTO `previllage` VALUES ('1303', '1', '1', '1', '1', '0', '1', '9', null, '2');
INSERT INTO `previllage` VALUES ('1304', '1', '1', '1', '1', '1', '1', '10', null, '2');
INSERT INTO `previllage` VALUES ('1305', '1', '0', '0', '0', '1', '1', '11', null, '2');
INSERT INTO `previllage` VALUES ('1306', '1', '1', '1', '1', '1', '1', '12', null, '2');
INSERT INTO `previllage` VALUES ('1307', '1', '1', '1', '1', '0', '1', '13', null, '2');
INSERT INTO `previllage` VALUES ('1308', '1', '0', '0', '1', '1', '1', '14', null, '2');
INSERT INTO `previllage` VALUES ('1309', '1', '0', '0', '1', '0', '1', '15', null, '2');
INSERT INTO `previllage` VALUES ('1355', '1', '0', '0', '0', '0', '1', '1', null, '3');
INSERT INTO `previllage` VALUES ('1356', '0', '0', '0', '0', '0', '1', '2', null, '3');
INSERT INTO `previllage` VALUES ('1357', '0', '0', '0', '0', '0', '1', '3', null, '3');
INSERT INTO `previllage` VALUES ('1358', '0', '0', '0', '0', '0', '1', '4', null, '3');
INSERT INTO `previllage` VALUES ('1359', '0', '0', '0', '0', '0', '1', '5', null, '3');
INSERT INTO `previllage` VALUES ('1360', '0', '0', '0', '0', '0', '1', '6', null, '3');
INSERT INTO `previllage` VALUES ('1361', '0', '0', '0', '0', '0', '1', '7', null, '3');
INSERT INTO `previllage` VALUES ('1362', '0', '0', '0', '0', '0', '1', '8', null, '3');
INSERT INTO `previllage` VALUES ('1363', '0', '0', '0', '0', '0', '1', '9', null, '3');
INSERT INTO `previllage` VALUES ('1364', '1', '0', '0', '0', '1', '1', '10', null, '3');
INSERT INTO `previllage` VALUES ('1365', '1', '0', '0', '0', '1', '1', '11', null, '3');
INSERT INTO `previllage` VALUES ('1366', '0', '0', '0', '0', '0', '1', '12', null, '3');
INSERT INTO `previllage` VALUES ('1367', '0', '0', '0', '0', '0', '1', '13', null, '3');
INSERT INTO `previllage` VALUES ('1368', '1', '0', '0', '0', '1', '1', '14', null, '3');
INSERT INTO `previllage` VALUES ('1369', '0', '0', '0', '0', '0', '1', '15', null, '3');
INSERT INTO `previllage` VALUES ('1385', '1', '0', '0', '0', '0', '1', '1', null, '1');
INSERT INTO `previllage` VALUES ('1386', '1', '1', '1', '1', '0', '1', '2', null, '1');
INSERT INTO `previllage` VALUES ('1387', '1', '1', '1', '1', '0', '1', '3', null, '1');
INSERT INTO `previllage` VALUES ('1388', '1', '1', '1', '1', '0', '1', '4', null, '1');
INSERT INTO `previllage` VALUES ('1389', '1', '1', '1', '1', '0', '1', '5', null, '1');
INSERT INTO `previllage` VALUES ('1390', '1', '1', '1', '1', '0', '1', '6', null, '1');
INSERT INTO `previllage` VALUES ('1391', '1', '0', '0', '0', '0', '1', '7', null, '1');
INSERT INTO `previllage` VALUES ('1392', '1', '1', '1', '1', '0', '1', '8', null, '1');
INSERT INTO `previllage` VALUES ('1393', '1', '1', '1', '1', '0', '1', '9', null, '1');
INSERT INTO `previllage` VALUES ('1394', '1', '1', '1', '1', '1', '1', '10', null, '1');
INSERT INTO `previllage` VALUES ('1395', '1', '0', '0', '0', '1', '1', '11', null, '1');
INSERT INTO `previllage` VALUES ('1396', '1', '1', '1', '1', '1', '1', '12', null, '1');
INSERT INTO `previllage` VALUES ('1397', '1', '1', '1', '1', '0', '1', '13', null, '1');
INSERT INTO `previllage` VALUES ('1398', '1', '0', '0', '1', '1', '1', '14', null, '1');
INSERT INTO `previllage` VALUES ('1399', '1', '0', '0', '1', '0', '1', '15', null, '1');

-- ----------------------------
-- Table structure for `publisher`
-- ----------------------------
CREATE TABLE `publisher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(500) DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `lastupdate` datetime DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_publisher_user1_idx` (`user_id`),
  CONSTRAINT `fk_publisher_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of publisher
-- ----------------------------
INSERT INTO `publisher` VALUES ('1', 'Samudra Publications', '1', null, '0');
INSERT INTO `publisher` VALUES ('2', 'Gunasena Publications', '1', null, '0');
INSERT INTO `publisher` VALUES ('3', 'ABCD Publications', '1', null, '0');
INSERT INTO `publisher` VALUES ('4', 'Srasavi Publications', '1', null, '0');
INSERT INTO `publisher` VALUES ('5', 'Wasana Publications', '1', '2023-06-19 13:08:48', '1');
INSERT INTO `publisher` VALUES ('6', 'eeeett', '2', '2023-04-29 23:37:53', '1');
INSERT INTO `publisher` VALUES ('7', 'sass ba11', '2', '2023-05-02 10:15:58', '35');

-- ----------------------------
-- Table structure for `purchase`
-- ----------------------------
CREATE TABLE `purchase` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `cart_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_purchase_cart1_idx` (`cart_id`),
  CONSTRAINT `fk_purchase_cart1` FOREIGN KEY (`cart_id`) REFERENCES `cart` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of purchase
-- ----------------------------
INSERT INTO `purchase` VALUES ('10', '2023-04-13 10:21:10', '1', '48');
INSERT INTO `purchase` VALUES ('11', '2023-04-25 00:33:08', '1', '84');
INSERT INTO `purchase` VALUES ('12', '2023-04-27 22:21:38', '1', '124');
INSERT INTO `purchase` VALUES ('14', '2023-04-30 23:06:29', '1', '199');
INSERT INTO `purchase` VALUES ('15', '2023-07-01 18:23:37', '1', '232');

-- ----------------------------
-- Table structure for `purchase_details`
-- ----------------------------
CREATE TABLE `purchase_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `status` varchar(5) DEFAULT NULL,
  `purchase_id` int(11) NOT NULL,
  `book_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_purchase_details_purchase1_idx` (`purchase_id`),
  KEY `fk_purchase_details_book1_idx` (`book_id`),
  KEY `fk_purchase_details_user1_idx` (`user_id`),
  CONSTRAINT `fk_purchase_details_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_purchase_details_purchase1` FOREIGN KEY (`purchase_id`) REFERENCES `purchase` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_purchase_details_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of purchase_details
-- ----------------------------
INSERT INTO `purchase_details` VALUES ('10', '1', '10', '13', '26');
INSERT INTO `purchase_details` VALUES ('11', '1', '10', '14', '26');
INSERT INTO `purchase_details` VALUES ('12', '1', '11', '17', '26');
INSERT INTO `purchase_details` VALUES ('13', '1', '12', '15', '2');
INSERT INTO `purchase_details` VALUES ('17', '1', '14', '3', '26');
INSERT INTO `purchase_details` VALUES ('18', '1', '14', '2', '26');
INSERT INTO `purchase_details` VALUES ('19', '1', '15', '23', '2');
INSERT INTO `purchase_details` VALUES ('20', '1', '15', '17', '2');

-- ----------------------------
-- Table structure for `review`
-- ----------------------------
CREATE TABLE `review` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` longtext,
  `rating` double DEFAULT NULL,
  `face_comment` varchar(2) DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `actionuser` varchar(45) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `book_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_review_user1_idx` (`user_id`),
  KEY `fk_review_book1_idx` (`book_id`),
  CONSTRAINT `fk_review_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_review_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of review
-- ----------------------------
INSERT INTO `review` VALUES ('1', 'Nice book to read', '4', '1', '2023-03-29 19:56:04', '1', null, '26', '1');
INSERT INTO `review` VALUES ('2', 'good', '2', '2', '2023-03-28 19:56:57', '1', null, '27', '1');
INSERT INTO `review` VALUES ('3', 'no not good', '0', null, '2023-03-27 19:57:30', '1', null, '2', '1');
INSERT INTO `review` VALUES ('4', 'ok', '1', '1', '2023-03-20 05:49:36', '1', null, '5', '2');
INSERT INTO `review` VALUES ('5', 'bad test', '2', '2', '2023-03-30 19:24:50', '1', null, '26', '1');
INSERT INTO `review` VALUES ('8', 'tes', '4', '1', '2023-03-31 04:28:48', '1', null, '26', '1');
INSERT INTO `review` VALUES ('9', 'Good for Students', '2', '1', '2023-03-31 04:57:01', '1', null, '26', '9');
INSERT INTO `review` VALUES ('10', 'Good book', '3', '1', '2023-04-01 07:59:57', '1', null, '26', '5');
INSERT INTO `review` VALUES ('11', 'good', '2', '1', '2023-04-11 19:41:59', '1', null, '26', '3');
INSERT INTO `review` VALUES ('12', 'no', '0', '2', '2023-04-11 19:43:18', '1', null, '26', '3');
INSERT INTO `review` VALUES ('13', 'Good', '2', '1', '2023-04-20 19:19:57', '1', null, '26', '14');
INSERT INTO `review` VALUES ('15', null, '2', null, '2023-05-10 11:57:31', '1', null, '26', '16');
INSERT INTO `review` VALUES ('16', 'yes good', '3', null, '2023-05-10 12:00:38', '2', '1', '1', '16');
INSERT INTO `review` VALUES ('17', null, '3', null, '2023-05-10 12:02:21', '1', null, '26', '9');

-- ----------------------------
-- Table structure for `usertype`
-- ----------------------------
CREATE TABLE `usertype` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of usertype
-- ----------------------------
INSERT INTO `usertype` VALUES ('1', 'Admin', '1');
INSERT INTO `usertype` VALUES ('2', 'Moderator', '1');
INSERT INTO `usertype` VALUES ('3', 'Author', '1');
INSERT INTO `usertype` VALUES ('4', 'Customer', '1');

-- ----------------------------
-- Table structure for `verify_code`
-- ----------------------------
CREATE TABLE `verify_code` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `datetime` datetime DEFAULT NULL,
  `code` mediumtext,
  `type` varchar(45) DEFAULT 'email or sms',
  `section` varchar(100) DEFAULT 'login or childmode forgot pw',
  `status` varchar(45) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_verify_code_user1_idx` (`user_id`),
  CONSTRAINT `fk_verify_code_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of verify_code
-- ----------------------------
INSERT INTO `verify_code` VALUES ('5', '2023-05-19 12:30:02', '904032', 'contact', 'loginmode', '1', '3');
INSERT INTO `verify_code` VALUES ('11', '2023-05-19 19:43:02', '633979', 'Email', 'loginmode', '1', '4');
INSERT INTO `verify_code` VALUES ('18', '2023-05-26 18:20:08', '869012', 'contact', 'loginmode', '1', '2');
INSERT INTO `verify_code` VALUES ('25', '2023-05-26 18:54:37', '432031', 'Email', 'childmode', '1', '26');
INSERT INTO `verify_code` VALUES ('26', '2023-05-26 20:00:16', '432920', 'Email', 'loginmode', '1', null);

-- ----------------------------
-- Table structure for `welcome_page`
-- ----------------------------
CREATE TABLE `welcome_page` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `img_num` int(11) DEFAULT NULL,
  `create` datetime DEFAULT NULL,
  `name` mediumtext,
  `url` longtext,
  `status` varchar(5) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_banners_user1_idx` (`user_id`),
  CONSTRAINT `fk_banners_user10` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of welcome_page
-- ----------------------------
INSERT INTO `welcome_page` VALUES ('1', '1', '2023-04-06 11:27:01', 'welcome 1', 'images/welcome_page/1680760621.png', '2', '1');
INSERT INTO `welcome_page` VALUES ('2', '1', '2023-04-06 11:31:20', 'welcome 1', 'images/welcome_page/1681231520.png', '2', '1');
INSERT INTO `welcome_page` VALUES ('3', '2', '2023-04-11 21:29:36', 'welcome 2', 'images/welcome_page/1681228776.png', '1', '1');
INSERT INTO `welcome_page` VALUES ('4', '1', '2023-04-21 21:39:39', 'Arts', 'images/welcome_page/1682093379.jpg', '1', '1');
INSERT INTO `welcome_page` VALUES ('5', '3', '2023-05-02 10:12:58', 'dv', 'images/welcome_page/1683002578.jpg', '2', '1');
INSERT INTO `welcome_page` VALUES ('6', '3', '2023-06-06 21:29:41', 'ttes', 'images/welcome_page/1686067181.png', '1', '33');

-- ----------------------------
-- Table structure for `wishlist`
-- ----------------------------
CREATE TABLE `wishlist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime DEFAULT NULL,
  `status` varchar(5) DEFAULT NULL,
  `book_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_wishlist_book1_idx` (`book_id`),
  KEY `fk_wishlist_user1_idx` (`user_id`),
  CONSTRAINT `fk_wishlist_book1` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_wishlist_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of wishlist
-- ----------------------------
INSERT INTO `wishlist` VALUES ('1', '2023-04-03 10:27:45', '3', '2', '26');
INSERT INTO `wishlist` VALUES ('2', '2023-04-01 10:27:57', '3', '1', '26');
INSERT INTO `wishlist` VALUES ('6', '2023-04-03 13:40:38', '3', '5', '26');
INSERT INTO `wishlist` VALUES ('8', '2023-04-03 16:00:16', '3', '10', '26');
INSERT INTO `wishlist` VALUES ('9', '2023-04-03 18:48:49', '3', '3', '26');
INSERT INTO `wishlist` VALUES ('10', '2023-04-03 21:23:31', '3', '5', '26');
INSERT INTO `wishlist` VALUES ('11', '2023-04-03 21:24:37', '3', '9', '26');
INSERT INTO `wishlist` VALUES ('12', '2023-04-03 21:24:47', '3', '6', '26');
INSERT INTO `wishlist` VALUES ('13', '2023-04-03 21:29:50', '3', '5', '26');
INSERT INTO `wishlist` VALUES ('14', '2023-04-03 21:31:05', '3', '2', '26');
INSERT INTO `wishlist` VALUES ('15', '2023-04-03 21:40:04', '3', '3', '26');
INSERT INTO `wishlist` VALUES ('16', '2023-04-03 21:41:31', '3', '10', '26');
INSERT INTO `wishlist` VALUES ('17', '2023-04-03 21:42:31', '3', '1', '26');
INSERT INTO `wishlist` VALUES ('18', '2023-04-06 06:46:04', '3', '9', '26');
INSERT INTO `wishlist` VALUES ('19', '2023-04-13 07:17:55', '3', '6', '26');
INSERT INTO `wishlist` VALUES ('20', '2023-04-13 10:20:39', '3', '13', '26');
INSERT INTO `wishlist` VALUES ('21', '2023-04-13 10:20:52', '3', '14', '26');
INSERT INTO `wishlist` VALUES ('22', '2023-04-23 00:50:52', '3', '10', '26');
INSERT INTO `wishlist` VALUES ('23', '2023-04-25 14:57:52', '3', '9', '26');
INSERT INTO `wishlist` VALUES ('24', '2023-04-30 13:23:59', '3', '9', '26');
INSERT INTO `wishlist` VALUES ('25', '2023-04-30 13:27:50', '3', '10', '26');
INSERT INTO `wishlist` VALUES ('26', '2023-04-30 13:28:31', '3', '16', '26');
INSERT INTO `wishlist` VALUES ('27', '2023-04-30 13:29:55', '3', '9', '26');
INSERT INTO `wishlist` VALUES ('28', '2023-04-30 13:30:04', '3', '16', '26');
INSERT INTO `wishlist` VALUES ('29', '2023-04-30 13:31:04', '3', '5', '26');
INSERT INTO `wishlist` VALUES ('30', '2023-04-30 13:31:47', '3', '10', '26');
INSERT INTO `wishlist` VALUES ('31', '2023-04-30 13:32:02', '3', '1', '26');
INSERT INTO `wishlist` VALUES ('32', '2023-04-30 20:06:45', '3', '10', '26');
INSERT INTO `wishlist` VALUES ('33', '2023-04-30 20:07:00', '3', '5', '26');
INSERT INTO `wishlist` VALUES ('34', '2023-04-30 20:07:50', '3', '3', '26');
INSERT INTO `wishlist` VALUES ('35', '2023-04-30 20:09:37', '3', '2', '26');
INSERT INTO `wishlist` VALUES ('36', '2023-05-02 21:30:52', '1', '6', '26');
INSERT INTO `wishlist` VALUES ('37', '2023-05-24 15:05:08', '1', '16', '27');
INSERT INTO `wishlist` VALUES ('38', '2023-06-19 13:41:01', '1', '16', '26');
INSERT INTO `wishlist` VALUES ('39', '2023-07-01 16:31:15', '3', '23', '2');
INSERT INTO `wishlist` VALUES ('40', '2023-07-01 17:27:21', '3', '17', '2');
INSERT INTO `wishlist` VALUES ('41', '2023-07-01 18:29:10', '1', '16', '2');
