/*
 Navicat Premium Data Transfer

 Source Server         : MySQL
 Source Server Type    : MySQL
 Source Server Version : 80031 (8.0.31)
 Source Host           : localhost:3306
 Source Schema         : love-nav

 Target Server Type    : MySQL
 Target Server Version : 80031 (8.0.31)
 File Encoding         : 65001

 Date: 19/12/2023 23:40:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for ln_attachment
-- ----------------------------
DROP TABLE IF EXISTS `ln_attachment`;
CREATE TABLE `ln_attachment`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '路径',
  `suffix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '后缀',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件名',
  `size` double(10, 0) NULL DEFAULT NULL COMMENT '大小',
  `md5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'md5',
  `width` double(10, 0) NULL DEFAULT NULL COMMENT '宽',
  `height` double(10, 0) NULL DEFAULT NULL COMMENT '高',
  `storage` enum('local','online') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'local' COMMENT '保存地址 local=本地  ',
  `createtime` int NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '附件表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ln_attachment
-- ----------------------------

-- ----------------------------
-- Table structure for ln_auth
-- ----------------------------
DROP TABLE IF EXISTS `ln_auth`;
CREATE TABLE `ln_auth`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '图标',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '菜单名称',
  `route_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '菜单路由',
  `pid` int NULL DEFAULT 0 COMMENT '上级id',
  `is_menu` tinyint NULL DEFAULT 0 COMMENT '是否作为菜单展示 1是0不是',
  `weigh` int NULL DEFAULT 0 COMMENT '权重',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '后台菜单' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ln_auth
-- ----------------------------
INSERT INTO `ln_auth` VALUES (1, 'UserFilled', '用户管理', NULL, 0, 0, 100);
INSERT INTO `ln_auth` VALUES (2, '', '用户列表', 'user_list', 1, 1, 100);
INSERT INTO `ln_auth` VALUES (7, '', '资源管理', 'attachment', 15, 1, 97);
INSERT INTO `ln_auth` VALUES (15, 'Tools', '常规配置', NULL, 0, 0, 9999);
INSERT INTO `ln_auth` VALUES (16, 'Stamp', '站内设置', 'config', 0, 1, 100);
INSERT INTO `ln_auth` VALUES (21, 'Menu', '网站管理', 'weblist/weblist_list', 0, 1, 10001);
INSERT INTO `ln_auth` VALUES (22, 'HelpFilled', '分类管理', 'weblist/weblist_cate', 0, 1, 9999);
INSERT INTO `ln_auth` VALUES (23, 'PictureFilled', 'banner管理', 'banners', 0, 1, 10000);
INSERT INTO `ln_auth` VALUES (24, 'List', '公告管理', 'gonggao', 0, 1, 0);
INSERT INTO `ln_auth` VALUES (25, 'Tools', '系统设置', 'base_config', 0, 1, 8000);
INSERT INTO `ln_auth` VALUES (26, 'Upload', '导入导航', 'weblist/import_url', 0, 1, 96);
INSERT INTO `ln_auth` VALUES (27, 'Download', '导出导航', 'weblist/export_url', 0, 1, 95);

-- ----------------------------
-- Table structure for ln_banners
-- ----------------------------
DROP TABLE IF EXISTS `ln_banners`;
CREATE TABLE `ln_banners`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `img_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '图片url',
  `weigh` int NULL DEFAULT NULL COMMENT '权重',
  `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '跳转链接',
  `banner_status` tinyint NULL DEFAULT NULL COMMENT '状态（0有效/1无效）',
  `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_banners
-- ----------------------------

-- ----------------------------
-- Table structure for ln_collect_icon_list
-- ----------------------------
DROP TABLE IF EXISTS `ln_collect_icon_list`;
CREATE TABLE `ln_collect_icon_list`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `url_md5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '网址',
  `icon_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图片地址',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '图标表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ln_collect_icon_list
-- ----------------------------
INSERT INTO `ln_collect_icon_list` VALUES (1, 'e315e839dcdd9ce3cc27ee972dd96060', '/upload/icon/2023/10/15/8a7520e1b1b13da7ec25bd872d75d5aa.jpeg');

-- ----------------------------
-- Table structure for ln_comment
-- ----------------------------
DROP TABLE IF EXISTS `ln_comment`;
CREATE TABLE `ln_comment`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `url_id` int NULL DEFAULT NULL COMMENT '所属url id',
  `user_id` int NULL DEFAULT NULL COMMENT '用户id',
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '评论内容',
  `root_comment_id` int NULL DEFAULT NULL COMMENT '父评论id',
  `like_count` bigint NULL DEFAULT NULL COMMENT '点赞数',
  `comment_time` datetime NULL DEFAULT NULL COMMENT '评论时间',
  `comment_status` tinyint NULL DEFAULT NULL COMMENT '状态',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `rating` int NULL DEFAULT NULL COMMENT '用户评级',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_comment
-- ----------------------------

-- ----------------------------
-- Table structure for ln_config
-- ----------------------------
DROP TABLE IF EXISTS `ln_config`;
CREATE TABLE `ln_config`  (
  `id` int NOT NULL COMMENT 'id',
  `type` enum('string','image') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'string' COMMENT '类型',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '名称',
  `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '值',
  `updatetime` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`, `name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_config
-- ----------------------------

-- ----------------------------
-- Table structure for ln_login_logs
-- ----------------------------
DROP TABLE IF EXISTS `ln_login_logs`;
CREATE TABLE `ln_login_logs`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ip',
  `user_id` tinyint NULL DEFAULT NULL COMMENT '用户id',
  `login_time` datetime NULL DEFAULT NULL COMMENT '登录时间',
  `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地址',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_login_logs
-- ----------------------------

-- ----------------------------
-- Table structure for ln_notice
-- ----------------------------
DROP TABLE IF EXISTS `ln_notice`;
CREATE TABLE `ln_notice`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '内容',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '跳转链接',
  `notice_status` tinyint NULL DEFAULT NULL COMMENT '状态（0显示/1隐藏）',
  `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_notice
-- ----------------------------

-- ----------------------------
-- Table structure for ln_role
-- ----------------------------
DROP TABLE IF EXISTS `ln_role`;
CREATE TABLE `ln_role`  (
  `id` int NOT NULL COMMENT 'id',
  `role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '角色名称',
  `role_level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '角色等级',
  `pid` int NULL DEFAULT NULL COMMENT '上级角色',
  `menu_id` int NULL DEFAULT NULL COMMENT '菜单权限',
  `role_status` tinyint NULL DEFAULT NULL COMMENT '状态（0有效/1禁用）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_role
-- ----------------------------
INSERT INTO `ln_role` VALUES (1, '超级管理员', NULL, NULL, NULL, 0);
INSERT INTO `ln_role` VALUES (2, '普通用户', NULL, NULL, NULL, 0);

-- ----------------------------
-- Table structure for ln_url_access
-- ----------------------------
DROP TABLE IF EXISTS `ln_url_access`;
CREATE TABLE `ln_url_access`  (
  `id` int NOT NULL COMMENT 'id',
  `url_id` int NULL DEFAULT NULL COMMENT 'url id',
  `time` datetime NULL DEFAULT NULL COMMENT '日期',
  `views` bigint NULL DEFAULT NULL COMMENT '访问量',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_url_access
-- ----------------------------

-- ----------------------------
-- Table structure for ln_url_cate_list
-- ----------------------------
DROP TABLE IF EXISTS `ln_url_cate_list`;
CREATE TABLE `ln_url_cate_list`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '名称',
  `createtime` int NULL DEFAULT NULL COMMENT '创建时间',
  `url_number` bigint NULL DEFAULT 0 COMMENT 'url 数量',
  `weigh` bigint NULL DEFAULT NULL COMMENT '权重',
  `status` tinyint NULL DEFAULT 1 COMMENT '状态',
  `need_login` tinyint NULL DEFAULT 0 COMMENT '需要登录才能查看',
  `user_id` int NULL DEFAULT NULL COMMENT '用户id',
  `root_cate_id` int NULL DEFAULT NULL COMMENT '根标签',
  `ico` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图标',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ln_url_cate_list
-- ----------------------------
INSERT INTO `ln_url_cate_list` VALUES (1, '工具', NULL, 0, NULL, 1, 0, 0, 0, NULL);
INSERT INTO `ln_url_cate_list` VALUES (2, '云盘', NULL, 0, NULL, 1, 0, NULL, 1, NULL);
INSERT INTO `ln_url_cate_list` VALUES (3, '摸鱼', NULL, 0, NULL, 1, 0, NULL, 1, NULL);
INSERT INTO `ln_url_cate_list` VALUES (4, '游戏', NULL, 0, NULL, 1, 0, 0, 2, NULL);

-- ----------------------------
-- Table structure for ln_url_list
-- ----------------------------
DROP TABLE IF EXISTS `ln_url_list`;
CREATE TABLE `ln_url_list`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '网站名称',
  `icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '网站图标',
  `cate_id` int NULL DEFAULT 0 COMMENT '标签id',
  `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'url',
  `createtime` int NULL DEFAULT NULL COMMENT '创建时间',
  `views` bigint NULL DEFAULT 0 COMMENT '访问数量',
  `tags` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '标签',
  `weigh` bigint NULL DEFAULT NULL COMMENT '权重',
  `status` tinyint NULL DEFAULT 1 COMMENT '状态',
  `desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '描述',
  `need_login` tinyint NULL DEFAULT 0 COMMENT '需要登录才能查看',
  `agent_hint` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '代理提示语',
  `is_need_agent` tinyint NULL DEFAULT 0 COMMENT '是否需要代理 1需要0不需要',
  `is_ad` tinyint NULL DEFAULT 0 COMMENT '是否广告1是0不是',
  `is_top` tinyint NULL DEFAULT 0 COMMENT '是否全局置顶1是0不是',
  `is_encrypt` tinyint NULL DEFAULT NULL COMMENT '是否加密（1加密/0不加密）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ln_url_list
-- ----------------------------

-- ----------------------------
-- Table structure for ln_user
-- ----------------------------
DROP TABLE IF EXISTS `ln_user`;
CREATE TABLE `ln_user`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_login` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户登录名',
  `user_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户密码',
  `phone` bigint NULL DEFAULT NULL COMMENT '用户手机号',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户头像',
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户昵称',
  `user_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户邮箱',
  `user_status` tinyint NULL DEFAULT NULL COMMENT '用户状态（0正常/1禁用）',
  `user_registered` datetime NULL DEFAULT NULL COMMENT '用户注册时间',
  `role_id` tinyint NULL DEFAULT NULL COMMENT '角色组',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ln_user
-- ----------------------------

-- ----------------------------
-- Table structure for ln_user_meta
-- ----------------------------
DROP TABLE IF EXISTS `ln_user_meta`;
CREATE TABLE `ln_user_meta`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint NULL DEFAULT NULL,
  `meta_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `meta_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ln_user_meta
-- ----------------------------
INSERT INTO `ln_user_meta` VALUES (1, 1, 'error_login_count', '0');

SET FOREIGN_KEY_CHECKS = 1;
