1 Star 0 Fork 3

张博/bookshop

forked from caoyang7/bookshop 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bookshop.sql 25.64 KB
一键复制 编辑 原始数据 按行查看 历史
caoyang7 提交于 2019-12-28 09:24 . 数据库 pipinstall uploads
/*
SQLyog v10.2
MySQL - 5.7.10-log : Database - bookshop
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`bookshop` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `bookshop`;
/*Table structure for table `auth_group` */
DROP TABLE IF EXISTS `auth_group`;
CREATE TABLE `auth_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(150) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `auth_group` */
/*Table structure for table `auth_group_permissions` */
DROP TABLE IF EXISTS `auth_group_permissions`;
CREATE TABLE `auth_group_permissions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL,
`permission_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`),
KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`),
CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `auth_group_permissions` */
/*Table structure for table `auth_permission` */
DROP TABLE IF EXISTS `auth_permission`;
CREATE TABLE `auth_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`content_type_id` int(11) NOT NULL,
`codename` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`),
CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4;
/*Data for the table `auth_permission` */
insert into `auth_permission`(`id`,`name`,`content_type_id`,`codename`) values (1,'Can add log entry',1,'add_logentry'),(2,'Can change log entry',1,'change_logentry'),(3,'Can delete log entry',1,'delete_logentry'),(4,'Can view log entry',1,'view_logentry'),(5,'Can add permission',2,'add_permission'),(6,'Can change permission',2,'change_permission'),(7,'Can delete permission',2,'delete_permission'),(8,'Can view permission',2,'view_permission'),(9,'Can add group',3,'add_group'),(10,'Can change group',3,'change_group'),(11,'Can delete group',3,'delete_group'),(12,'Can view group',3,'view_group'),(13,'Can add user',4,'add_user'),(14,'Can change user',4,'change_user'),(15,'Can delete user',4,'delete_user'),(16,'Can view user',4,'view_user'),(17,'Can add content type',5,'add_contenttype'),(18,'Can change content type',5,'change_contenttype'),(19,'Can delete content type',5,'delete_contenttype'),(20,'Can view content type',5,'view_contenttype'),(21,'Can add session',6,'add_session'),(22,'Can change session',6,'change_session'),(23,'Can delete session',6,'delete_session'),(24,'Can view session',6,'view_session'),(25,'Can add users',7,'add_users'),(26,'Can change users',7,'change_users'),(27,'Can delete users',7,'delete_users'),(28,'Can view users',7,'view_users'),(29,'Can add booktype',8,'add_booktype'),(30,'Can change booktype',8,'change_booktype'),(31,'Can delete booktype',8,'delete_booktype'),(32,'Can view booktype',8,'view_booktype'),(33,'Can add book imgs',9,'add_bookimgs'),(34,'Can change book imgs',9,'change_bookimgs'),(35,'Can delete book imgs',9,'delete_bookimgs'),(36,'Can view book imgs',9,'view_bookimgs'),(37,'Can add books',10,'add_books'),(38,'Can change books',10,'change_books'),(39,'Can delete books',10,'delete_books'),(40,'Can view books',10,'view_books'),(41,'Can add cart',11,'add_cart'),(42,'Can change cart',11,'change_cart'),(43,'Can delete cart',11,'delete_cart'),(44,'Can view cart',11,'view_cart'),(45,'Can add order',12,'add_order'),(46,'Can change order',12,'change_order'),(47,'Can delete order',12,'delete_order'),(48,'Can view order',12,'view_order'),(49,'Can add order detail',13,'add_orderdetail'),(50,'Can change order detail',13,'change_orderdetail'),(51,'Can delete order detail',13,'delete_orderdetail'),(52,'Can view order detail',13,'view_orderdetail');
/*Table structure for table `auth_user` */
DROP TABLE IF EXISTS `auth_user`;
CREATE TABLE `auth_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`password` varchar(128) NOT NULL,
`last_login` datetime(6) DEFAULT NULL,
`is_superuser` tinyint(1) NOT NULL,
`username` varchar(150) NOT NULL,
`first_name` varchar(30) NOT NULL,
`last_name` varchar(150) NOT NULL,
`email` varchar(254) NOT NULL,
`is_staff` tinyint(1) NOT NULL,
`is_active` tinyint(1) NOT NULL,
`date_joined` datetime(6) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `auth_user` */
/*Table structure for table `auth_user_groups` */
DROP TABLE IF EXISTS `auth_user_groups`;
CREATE TABLE `auth_user_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`group_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`),
KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`),
CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`),
CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `auth_user_groups` */
/*Table structure for table `auth_user_user_permissions` */
DROP TABLE IF EXISTS `auth_user_user_permissions`;
CREATE TABLE `auth_user_user_permissions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`permission_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`),
KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`),
CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `auth_user_user_permissions` */
/*Table structure for table `django_admin_log` */
DROP TABLE IF EXISTS `django_admin_log`;
CREATE TABLE `django_admin_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`action_time` datetime(6) NOT NULL,
`object_id` longtext,
`object_repr` varchar(200) NOT NULL,
`action_flag` smallint(5) unsigned NOT NULL,
`change_message` longtext NOT NULL,
`content_type_id` int(11) DEFAULT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`),
KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`),
CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `django_admin_log` */
/*Table structure for table `django_content_type` */
DROP TABLE IF EXISTS `django_content_type`;
CREATE TABLE `django_content_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_label` varchar(100) NOT NULL,
`model` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4;
/*Data for the table `django_content_type` */
insert into `django_content_type`(`id`,`app_label`,`model`) values (1,'admin','logentry'),(3,'auth','group'),(2,'auth','permission'),(4,'auth','user'),(5,'contenttypes','contenttype'),(9,'myadmin','bookimgs'),(10,'myadmin','books'),(8,'myadmin','booktype'),(11,'myadmin','cart'),(12,'myadmin','order'),(13,'myadmin','orderdetail'),(7,'myadmin','users'),(6,'sessions','session');
/*Table structure for table `django_migrations` */
DROP TABLE IF EXISTS `django_migrations`;
CREATE TABLE `django_migrations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`applied` datetime(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4;
/*Data for the table `django_migrations` */
insert into `django_migrations`(`id`,`app`,`name`,`applied`) values (1,'contenttypes','0001_initial','2019-12-09 20:51:35.202516'),(2,'auth','0001_initial','2019-12-09 20:51:35.595465'),(3,'admin','0001_initial','2019-12-09 20:51:36.745465'),(4,'admin','0002_logentry_remove_auto_add','2019-12-09 20:51:37.023754'),(5,'admin','0003_logentry_add_action_flag_choices','2019-12-09 20:51:37.037750'),(6,'contenttypes','0002_remove_content_type_name','2019-12-09 20:51:37.279106'),(7,'auth','0002_alter_permission_name_max_length','2019-12-09 20:51:37.479535'),(8,'auth','0003_alter_user_email_max_length','2019-12-09 20:51:37.511481'),(9,'auth','0004_alter_user_username_opts','2019-12-09 20:51:37.525414'),(10,'auth','0005_alter_user_last_login_null','2019-12-09 20:51:37.621155'),(11,'auth','0006_require_contenttypes_0002','2019-12-09 20:51:37.632148'),(12,'auth','0007_alter_validators_add_error_messages','2019-12-09 20:51:37.646089'),(13,'auth','0008_alter_user_username_max_length','2019-12-09 20:51:37.765781'),(14,'auth','0009_alter_user_last_name_max_length','2019-12-09 20:51:37.888440'),(15,'auth','0010_alter_group_name_max_length','2019-12-09 20:51:37.940301'),(16,'auth','0011_update_proxy_permissions','2019-12-09 20:51:37.956266'),(17,'myadmin','0001_initial','2019-12-09 20:51:38.039039'),(18,'sessions','0001_initial','2019-12-09 20:51:38.093893'),(19,'myadmin','0002_auto_20191209_2220','2019-12-09 22:20:36.152314'),(20,'myadmin','0003_delete_users','2019-12-10 00:00:12.609150'),(21,'myadmin','0004_users','2019-12-10 00:00:12.673017'),(22,'myadmin','0005_booktype','2019-12-10 14:18:54.218791'),(23,'myadmin','0006_bookimgs_books','2019-12-11 11:08:09.821783'),(24,'myadmin','0007_auto_20191211_2353','2019-12-11 23:53:12.578919'),(25,'myadmin','0008_cart','2019-12-18 19:33:28.671801'),(26,'myadmin','0009_order_orderdetail','2019-12-19 11:22:02.154782');
/*Table structure for table `django_session` */
DROP TABLE IF EXISTS `django_session`;
CREATE TABLE `django_session` (
`session_key` varchar(40) NOT NULL,
`session_data` longtext NOT NULL,
`expire_date` datetime(6) NOT NULL,
PRIMARY KEY (`session_key`),
KEY `django_session_expire_date_a5c62663` (`expire_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `django_session` */
insert into `django_session`(`session_key`,`session_data`,`expire_date`) values ('9a1jd1ji9gszvcb765osr9uqh1vwqf5j','MTQxNjI2ZmNkODFmYWVhZDM0NjRmOGIzNzk0NzUwMjA4MmU0NDRlMDp7InZlcmlmeWNvZGUiOiJQNkwzIiwiQWRtaW5Vc2VyIjp7ImlkIjo1MTYsInBob25lIjoiMTMwMjkyMDM2MDcifSwidmNvZGUiOnsicGhvbmUiOiJ0cnVlIiwidmNvZGUiOjk4MTUxfX0=','2019-12-31 11:12:51.572288'),('rf61xllsvkyhyjloxn888deju3jaarq9','NDFlOTJhYWZjYTZkNTk5MDkwODY0NGY5MjlkYzMxYmU2YmUyY2RlYzp7IlZpcFVzZXIiOnsiaWQiOjUxNywicGhvbmUiOiIxMzAyOTIwMzYwNyJ9fQ==','2020-01-02 21:24:46.643300'),('s4zyuojao65gwbqgcx5mwa3obwy98fn1','Y2YxOWZkZjc2YmM4MjdkMGQ2MjNhYzFlOGMxMmM5YWFmNzNjMzU5OTp7IlZpcFVzZXIiOnsiaWQiOjUxNywicGhvbmUiOiIxMzAyOTIwMzYwNyJ9LCJ2ZXJpZnljb2RlIjoiTTlUMCIsIkFkbWluVXNlciI6eyJpZCI6NTE3LCJwaG9uZSI6IjEzMDI5MjAzNjA3In19','2020-01-02 18:23:02.394740');
/*Table structure for table `myadmin_bookimgs` */
DROP TABLE IF EXISTS `myadmin_bookimgs`;
CREATE TABLE `myadmin_bookimgs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`img_url` varchar(100) NOT NULL,
`bookid_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `myadmin_bookimgs_bookid_id_b1db4d79_fk_myadmin_books_id` (`bookid_id`),
CONSTRAINT `myadmin_bookimgs_bookid_id_b1db4d79_fk_myadmin_books_id` FOREIGN KEY (`bookid_id`) REFERENCES `myadmin_books` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_bookimgs` */
insert into `myadmin_bookimgs`(`id`,`img_url`,`bookid_id`) values (1,'static/uploads/23997435-1_w_5.jpg',1),(3,'static/uploads/23715237-1_w_2.jpg',3),(4,'static/uploads/27908533-1_w_9.jpg',4),(5,'static/uploads/24059709-1_w_5.jpg',5),(6,'static/uploads/25573335-1_w_4.jpg',6),(7,'static/uploads/25137790-1_u_4_RDhdb1A.jpg',7);
/*Table structure for table `myadmin_books` */
DROP TABLE IF EXISTS `myadmin_books`;
CREATE TABLE `myadmin_books` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`tuijian` varchar(255) NOT NULL,
`author` varchar(50) NOT NULL,
`publisher` varchar(100) NOT NULL,
`pub_date` date NOT NULL,
`price` double NOT NULL,
`num` int(11) NOT NULL,
`ISBN` varchar(30) NOT NULL,
`context` longtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_books` */
insert into `myadmin_books`(`id`,`title`,`tuijian`,`author`,`publisher`,`pub_date`,`price`,`num`,`ISBN`,`context`) values (1,'三国演义','推荐语\r\n ','罗贯中','天地出版社','2019-12-01',9.6,50,'9787536575479','图书详情介绍\r\n '),(3,'人间词话','中国二十世纪著名的诗词美学经典,深受鲁迅、胡适、梁启超、陈寅恪、朱光潜推崇的国学大师\r\n ','王国维','北京联合出版社','2016-10-01',25.3,37,'9787550249691','《人间词话》是王国维的代表作,是中国近代*负盛名的一部词话著作。他用传统的词话形式及传统的概念、术语和思维逻辑,较为自然地融进了一些新的观念和方法,其总结的理论问题又具有相当普遍的意义,这就使它在当时新旧两代的读者中产生了重大反响,在中国近代文学批评史上具有崇高的地位。本书的理论核心是“境界”说,该书观点新颖,立论精辟,自成体系,特别是书中提出的三重境界说一直受到国内外学者的重视。\r\n '),(4,'西游记壁画','324面全彩内文,446幅高清壁画图,系统还原西游壁画取经图像,直观展示各个时期取经故事\r\n ','魏文斌','江苏凤凰美术出版社','2019-07-06',138.6,24,'9787558061295','玄奘留给我们的遗产,丰富而又影响后世。玄奘译经及佛教著述是中国佛教历史上十分重要的内容;《大唐西域记》是研究古代唐代中国与西域、中亚、印度间交通路线*为详细的记载,成为这一方面研究*直接的材料;玄奘及其传记为后来寻找发掘印度佛教遗迹提供了重要的线索,一些重要的佛教遗址据之而得以调查和发掘,并获得了重要的收获,成为研究印度与中亚佛教建筑、佛教艺术*直接的资料;玄奘西行事迹,逐渐被神话,从唐至明,不断产生了一系列不朽的文学作品,*著名的当属明代吴承恩的《西游记》,在当今,又不断根据西游记的神话,产生了各种影视作品,圣僧唐僧及其演绎的弟子们成为家喻户晓的神话人物,备受喜爱。由此而形成的各类艺术作品,从唐代开始,玄奘法师画像到取经图像再到西游记图像的一系列转化,超过了历史上任何一位高僧。玄奘取经西行所经之地、译经之处、寂灭之地,留下了大量与其有关的遗迹,从长安到瓜州到高昌等,现今大雁塔、兴教寺塔、锁阳城遗址、高昌故城、苏巴什佛寺遗址等均已成为“丝绸之路 :长安——天山廊道的路网”世界文化遗产的重要组成部分,而其中的佛教遗迹则是丝绸之路上反映中印佛教文化交流*耀眼的明珠。玄奘及其西游等的研究成果丰硕,这些又构成了新的玄奘遗产,而这种新遗产今后又会源源不断的产生。本书也正是在这种思路中产生,并希望为今后玄奘及其各种形式的研究有益。\r\n '),(5,'史记','《史记》研究界翘楚、中国《史记》研究会会长、北京《史记》研究会名誉会长张大可*《史记》白话本翻译力作,学术性与普及性相结合。\r\n ','司马迁','商务出版社','2014-12-26',105.6,28,'9787100116893','《史记》是西汉著名史学家司马迁撰写的一部纪传体史书,是中国历史上*部纪传体通史,被列为“二十四史”之首,记载了上至上古传说中的黄帝时代,下至汉武帝太初四年间共三千多年的历史。与后来的《汉书》、《后汉书》、《三国志》合称“前四史”。本书由《史记》研究界翘楚张大可先生独立翻译,本书*特色在于体例创:书前设导言,高度概括《史记》精华;本纪、世家、列传、书、表各做体例说明;单篇题解,篇中有结构段意,使白话本《史记》更贴近司马迁的原创,体现了五体结构纪传体的魅力所在,不只是机械的古今语言转换。 \r\n '),(6,'希腊人的故事','盐野七生新作,《罗马人的故事》姊妹篇。罗马人的导师,文明的领跑者。创新时代急需读懂的文明。\r\n ','盐野七生','中信出版社','2018-11-06',94.7,15,'9787508695716','《希腊人的故事》是盐野七生的封笔之作,继《罗马人的故事》之后备受大众欢迎的历史作品系列。在这部《希腊人的故事》中,作者将我们带回那个人与神共处同一片天地的传奇时代,冷静透彻地将视角集中于多元文明如何共存,场景再现般地讲述在一次次改变世界格局的决策中,性格迥异的英雄们如何引领国家走向*。从诞生到崛起,从崩溃到新生,在对诸多问题的层层剖析中,古希腊人面对的困惑成为我们今天可资借鉴的资源。\r\n '),(7,'活着','余华是我国当代著名作家,也是享誉世界的小说家,曾荣获众多国内外奖项。《活着》是其代表作,在全球广泛传播,销量逾千万册,获得了普遍好评,已成为中国乃至世界当代文学的经典。\r\n \r\n ','余华','作家出版社','2019-12-04',9.99,55,'9787506365437','《活着》是一部充满血泪的小说。余华通过一位中国农民的苦难生活 讲述了人如何去承受巨大的苦难;讲述了眼泪的丰富和宽广;讲述了*望 的不存在:讲述了人是为了活着本身而活着…… 《活着》这部小说荣获意大利格林扎纳·卡佛文学奖*高奖项(1998年 ),台湾《中国时报》10本好书奖(1994年),香港“博益”15本好书奖 (1990年);并入选香港《亚洲周刊》评选的“20世纪中文小说百年百强” ;入选中国百位批评家和文学编辑评选的“九十年代*有影响的10部作品 ”\r\n ');
/*Table structure for table `myadmin_books_typeid` */
DROP TABLE IF EXISTS `myadmin_books_typeid`;
CREATE TABLE `myadmin_books_typeid` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`books_id` int(11) NOT NULL,
`booktype_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `myadmin_books_typeid_books_id_booktype_id_60f6451f_uniq` (`books_id`,`booktype_id`),
KEY `myadmin_books_typeid_booktype_id_a8e4e7c5_fk_myadmin_booktype_id` (`booktype_id`),
CONSTRAINT `myadmin_books_typeid_books_id_9564ca90_fk_myadmin_books_id` FOREIGN KEY (`books_id`) REFERENCES `myadmin_books` (`id`),
CONSTRAINT `myadmin_books_typeid_booktype_id_a8e4e7c5_fk_myadmin_booktype_id` FOREIGN KEY (`booktype_id`) REFERENCES `myadmin_booktype` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_books_typeid` */
insert into `myadmin_books_typeid`(`id`,`books_id`,`booktype_id`) values (2,1,22),(1,1,24),(4,3,15),(5,4,18),(7,5,20),(6,5,24),(8,6,21),(9,7,15);
/*Table structure for table `myadmin_booktype` */
DROP TABLE IF EXISTS `myadmin_booktype`;
CREATE TABLE `myadmin_booktype` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`pid` int(11) NOT NULL,
`path` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_booktype` */
insert into `myadmin_booktype`(`id`,`name`,`pid`,`path`) values (14,'小说',0,'0,'),(15,'现代小说',14,'0,14,'),(16,'玄幻小说',14,'0,14,'),(17,'文艺',0,'0,'),(18,'人体艺术理论',17,'0,17,'),(19,'历史',0,'0,'),(20,'中国历史',19,'0,19,'),(21,'国际历史',19,'0,19,'),(22,'中国古典小说',14,'0,14,'),(23,'传统文化',0,'0,'),(24,'历史名著',23,'0,23,');
/*Table structure for table `myadmin_cart` */
DROP TABLE IF EXISTS `myadmin_cart`;
CREATE TABLE `myadmin_cart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) NOT NULL,
`select` int(11) NOT NULL,
`bid_id` int(11) NOT NULL,
`uid_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `myadmin_cart_bid_id_f7d4ed93_fk_myadmin_books_id` (`bid_id`),
KEY `myadmin_cart_uid_id_26f2428c_fk_myadmin_users_id` (`uid_id`),
CONSTRAINT `myadmin_cart_bid_id_f7d4ed93_fk_myadmin_books_id` FOREIGN KEY (`bid_id`) REFERENCES `myadmin_books` (`id`),
CONSTRAINT `myadmin_cart_uid_id_26f2428c_fk_myadmin_users_id` FOREIGN KEY (`uid_id`) REFERENCES `myadmin_users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_cart` */
insert into `myadmin_cart`(`id`,`num`,`select`,`bid_id`,`uid_id`) values (18,3,0,1,517);
/*Table structure for table `myadmin_order` */
DROP TABLE IF EXISTS `myadmin_order`;
CREATE TABLE `myadmin_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
`phone` varchar(11) NOT NULL,
`address` varchar(100) NOT NULL,
`totalprice` double NOT NULL,
`status` int(11) NOT NULL,
`ordertime` datetime(6) NOT NULL,
`paytime` datetime(6) DEFAULT NULL,
`uid_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `myadmin_order_uid_id_bcf75806_fk_myadmin_users_id` (`uid_id`),
CONSTRAINT `myadmin_order_uid_id_bcf75806_fk_myadmin_users_id` FOREIGN KEY (`uid_id`) REFERENCES `myadmin_users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_order` */
insert into `myadmin_order`(`id`,`name`,`phone`,`address`,`totalprice`,`status`,`ordertime`,`paytime`,`uid_id`) values (8,'曹阳','13029203607','沈阳',44.5,0,'2019-12-19 23:24:07.930159',NULL,517),(9,'曹曹','13029203607','兄弟连',163.9,1,'2019-12-20 09:18:28.643220','2019-12-20 09:18:50.000000',517),(10,'哈哈','13029203607','兄弟连',295,1,'2019-12-20 09:32:34.959632','2019-12-20 09:33:10.000000',517);
/*Table structure for table `myadmin_orderdetail` */
DROP TABLE IF EXISTS `myadmin_orderdetail`;
CREATE TABLE `myadmin_orderdetail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) NOT NULL,
`price` double NOT NULL,
`bid_id` int(11) NOT NULL,
`orderid_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `myadmin_orderdetail_bid_id_34275ede_fk_myadmin_books_id` (`bid_id`),
KEY `myadmin_orderdetail_orderid_id_70abd0b1_fk_myadmin_order_id` (`orderid_id`),
CONSTRAINT `myadmin_orderdetail_bid_id_34275ede_fk_myadmin_books_id` FOREIGN KEY (`bid_id`) REFERENCES `myadmin_books` (`id`),
CONSTRAINT `myadmin_orderdetail_orderid_id_70abd0b1_fk_myadmin_order_id` FOREIGN KEY (`orderid_id`) REFERENCES `myadmin_order` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_orderdetail` */
insert into `myadmin_orderdetail`(`id`,`num`,`price`,`bid_id`,`orderid_id`) values (10,2,9.6,1,8),(11,1,25.3,3,8),(12,1,138.6,4,9),(13,1,25.3,3,9),(14,2,94.7,6,10),(15,1,105.6,5,10);
/*Table structure for table `myadmin_users` */
DROP TABLE IF EXISTS `myadmin_users`;
CREATE TABLE `myadmin_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phone` varchar(11) NOT NULL,
`password` varchar(80) NOT NULL,
`face` varchar(100) NOT NULL,
`nickname` varchar(20) DEFAULT NULL,
`homeaddress` varchar(100) DEFAULT NULL,
`sex` varchar(1) DEFAULT NULL,
`usertype` varchar(1) DEFAULT NULL,
`registerdate` datetime(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=518 DEFAULT CHARSET=utf8mb4;
/*Data for the table `myadmin_users` */
insert into `myadmin_users`(`id`,`phone`,`password`,`face`,`nickname`,`homeaddress`,`sex`,`usertype`,`registerdate`) values (515,'13470067867','pbkdf2_sha256$150000$GLYCmLUAk0Nw$tpsZ4wA9N4NN6gYbsy9t8nK8g7Bx9vqi6CxY0auR1aA=','/static/uploads/1576165263.8804765.jpg','曹阳','辽宁沈阳','0','0','2019-12-12 16:15:05.884425'),(517,'13029203607','pbkdf2_sha256$150000$WA6bBTJQoVgQ$GYTFL97yzMOkJ7UAlCuST6G3EiItaRD7D1UOqrHsvSw=','/static/myadmin/assets/img/user07.png',NULL,NULL,NULL,NULL,'2019-12-17 11:21:29.972909');
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/zhangbo123321/bookshop.git
git@gitee.com:zhangbo123321/bookshop.git
zhangbo123321
bookshop
bookshop
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385