/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50736 (5.7.36)
 Source Host           : localhost:3306
 Source Schema         : block-chaincopyright

 Target Server Type    : MySQL
 Target Server Version : 50736 (5.7.36)
 File Encoding         : 65001

 Date: 22/05/2025 21:39:41
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
  `real_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  `head_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `gender` tinyint(3) UNSIGNED NULL DEFAULT NULL COMMENT '性别   0：男   1：女    2：保密',
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `mobile` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
  `super_admin` tinyint(3) UNSIGNED NULL DEFAULT NULL COMMENT '超级管理员   0：否   1：是',
  `status` tinyint(4) NULL DEFAULT NULL COMMENT '状态  0：停用   1：正常',
  `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updater` bigint(20) NULL DEFAULT NULL COMMENT '更新者',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uk_username`(`username`) USING BTREE,
  INDEX `idx_create_date`(`create_date`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1067246875800000002 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统用户' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1067246875800000001, 'admin', '$2a$10$o1Pzp8hYhwmTQgH0k7dTeuEie3aRHjlnG778N./258ZF8Fd7RxFlW', '管理员', NULL, 0, 'root@renren.io', '13612345678', NULL, 1, 1, 1067246875800000001, '2024-12-03 11:54:34', 1067246875800000001, '2024-12-03 11:54:34');

-- ----------------------------
-- Table structure for sys_user_token
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_token`;
CREATE TABLE `sys_user_token`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` bigint(20) NOT NULL COMMENT '用户id',
  `token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户token',
  `expire_date` datetime NULL DEFAULT NULL COMMENT '过期时间',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_id`(`user_id`) USING BTREE,
  UNIQUE INDEX `token`(`token`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1863925300941840386 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统用户Token' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user_token
-- ----------------------------
INSERT INTO `sys_user_token` VALUES (1863925300941840385, 1067246875800000001, '853d94539b0fa16e3cea5d40b771b6ad', '2025-05-23 09:09:13', '2025-05-22 21:09:13', '2024-12-03 20:36:36');

-- ----------------------------
-- Table structure for tb_book
-- ----------------------------
DROP TABLE IF EXISTS `tb_book`;
CREATE TABLE `tb_book`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面',
  `isbn` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ISBN编号',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图书标题',
  `author` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '作者',
  `publisher` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '出版社',
  `publish_date` date NULL DEFAULT NULL COMMENT '出版日期',
  `copyright_owner` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '版权持有人',
  `copyright_start_year` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '版权起始年份',
  `copyright_end_year` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '版权到期年份',
  `edition` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '版次',
  `language` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '中文' COMMENT '语言',
  `price` decimal(10, 2) NULL DEFAULT NULL COMMENT '图书定价',
  `hex` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上链哈希值',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '电子数据文件地址',
  `user_id` bigint(20) NULL DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '已通过',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1925518111079583746 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '基于区块链的图书版权结构表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of tb_book
-- ----------------------------
INSERT INTO `tb_book` VALUES (1, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787115428028', 'Python编程：从入门到实践', 'Eric Matthes', '人民邮电出版社', '2020-06-01', 'Eric Matthes', '2020', '2030', '第2版', '中文', 79.00, '0xa1b2c3d4e5f67890abcdef1234567890abcdef12', '2025-05-22 11:46:36', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (2, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787302510402', '区块链技术指南', '肖臻', '清华大学出版社', '2018-03-01', '肖臻', '2018', '2028', '第1版', '中文', 89.00, '0x8bcf12a1d342e3a11122ff3344aa7766ddee999a', '2025-05-22 11:46:36', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (3, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787115316202', '高性能MySQL（第3版）', 'Baron Schwartz', '人民邮电出版社', '2014-05-01', 'Baron Schwartz', '2014', '2029', '第3版', '中文', 108.00, '0xcafe1234567890deadbeef001122334455667788', '2025-05-22 11:46:37', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (4, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787121355939', 'JavaScript高级程序设计（第4版）', 'Nicholas C. Zakas', '电子工业出版社', '2021-07-01', 'Nicholas C. Zakas', '2021', '2031', '第4版', '中文', 128.00, NULL, '2025-05-22 11:46:37', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (5, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787115573056', 'Vue.js项目实战', '黄轶', '人民邮电出版社', '2020-10-01', '黄轶', '2020', '2030', '第1版', '中文', 79.00, NULL, '2025-05-22 11:46:37', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (6, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787115373991', '鸟哥的Linux私房菜', '鸟哥', '人民邮电出版社', '2018-08-01', '鸟哥', '2018', '2028', '基础学习篇 第四版', '中文', 88.00, '0x123456abcdef123456abcdef7890abcd1234abcd', '2025-05-22 11:46:38', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (7, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787302472823', '数据挖掘：概念与技术', 'Jiawei Han', '清华大学出版社', '2017-09-01', 'Jiawei Han', '2017', '2027', '第3版', '中文', 99.00, NULL, '2025-05-22 11:46:38', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (8, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787115476197', 'Hadoop权威指南（第4版）', 'Tom White', '人民邮电出版社', '2019-01-01', 'Tom White', '2019', '2029', '第4版', '中文', 129.00, '0xdeadbeef00112233445566778899aabbccddeeff', '2025-05-22 11:46:39', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '已通过');
INSERT INTO `tb_book` VALUES (9, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787115480941', '深度学习', 'Ian Goodfellow', '人民邮电出版社', '2017-10-01', 'Ian Goodfellow', '2017', '2027', '第1版', '中文', 139.00, '0xabcdefabcdefabcdefabcdefabcdefabcdef1234', '2025-05-22 12:03:44', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '未审核');
INSERT INTO `tb_book` VALUES (10, 'http://localhost:18081/095a3e746b1bc652efd4203245387c5.png', '9787111612063', '人工智能：一种现代的方法（第3版）', 'Stuart Russell', '机械工业出版社', '2020-05-01', 'Stuart Russell', '2020', '2030', '第3版', '中文', 149.00, NULL, '2025-05-22 12:03:26', 'http://localhost:18081/ts017005.pdf', 1888931423629377538, '未审核');

-- ----------------------------
-- Table structure for tb_slides
-- ----------------------------
DROP TABLE IF EXISTS `tb_slides`;
CREATE TABLE `tb_slides`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '轮播名称',
  `sort` int(10) NULL DEFAULT NULL COMMENT '排序',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '图片地址',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '轮播图' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of tb_slides
-- ----------------------------
INSERT INTO `tb_slides` VALUES (3, '区块链技术保障图书版权安全', 1, '9ff5111f-317a-40f6-9129-dce55dc0ca46.jpg', '2025-02-27 04:56:21', '首页轮播');
INSERT INTO `tb_slides` VALUES (16, '《区块链与数字出版》新书首发', NULL, '9ff5111f-317a-40f6-9129-dce55dc0ca46.jpg', '2025-02-13 21:55:22', NULL);

-- ----------------------------
-- Table structure for tb_token
-- ----------------------------
DROP TABLE IF EXISTS `tb_token`;
CREATE TABLE `tb_token`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `token` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'token',
  `expire_date` datetime NULL DEFAULT NULL COMMENT '过期时间',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_id`(`user_id`) USING BTREE,
  UNIQUE INDEX `token`(`token`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1925392134131683330 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户Token' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of tb_token
-- ----------------------------
INSERT INTO `tb_token` VALUES (1863921548927258625, 1863920777825390593, '424a16be3b8e449384eb634f9744f937', '2025-02-10 14:19:37', '2025-02-10 14:19:37');
INSERT INTO `tb_token` VALUES (1888853374313553922, 1888852840605147137, 'ed407976795e4df88d56e7a00c1d5154', '2025-02-11 07:37:24', '2025-02-10 19:37:24');
INSERT INTO `tb_token` VALUES (1888931479396843521, 1888931423629377538, 'a896fbe44eac4004b49e8e4a17a5297d', '2025-05-22 21:09:08', '2025-05-22 21:09:08');
INSERT INTO `tb_token` VALUES (1925392134131683329, 1888931423629377539, 'cb7d0bc6033f4c50b2868705fd48f032', '2025-05-22 11:24:50', '2025-05-22 11:24:50');

-- ----------------------------
-- Table structure for tb_user
-- ----------------------------
DROP TABLE IF EXISTS `tb_user`;
CREATE TABLE `tb_user`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '手机号',
  `password` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
  `phone` bigint(11) NULL DEFAULT NULL COMMENT '手机号',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1888931423629377543 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of tb_user
-- ----------------------------
INSERT INTO `tb_user` VALUES (1863920777825390593, '18796357645', '50deed89a90161a0c57384bbc70a311c445b47a8af6897053e95f2201598889b', '2024-12-03 20:18:38', '12', 18796357645);
INSERT INTO `tb_user` VALUES (1888931423629377538, '123456', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', '2025-02-10 20:42:01', '阎震南', 18796357645);
INSERT INTO `tb_user` VALUES (1888931423629377539, '234567', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', '2010-07-13 07:12:50', '韦致远', 18796357645);
INSERT INTO `tb_user` VALUES (1888931423629377540, '14210238611', 'P2ISnWAS0B', '2025-01-15 05:30:28', '唐杰宏', 18796357645);
INSERT INTO `tb_user` VALUES (1888931423629377541, '7554347435', 'rI6MCEVnSg', '2004-07-25 08:33:17', '程睿', 18796357645);
INSERT INTO `tb_user` VALUES (1888931423629377542, '18281782563', 'UdghV1N4vF', '2004-12-08 21:45:46', '阎震南', 18796357645);

SET FOREIGN_KEY_CHECKS = 1;
