/*
 Navicat Premium Dump SQL

 Source Server         : 开发库（本地）
 Source Server Type    : MySQL
 Source Server Version : 80404 (8.4.4)
 Source Host           : localhost:3310
 Source Schema         : nl_mall

 Target Server Type    : MySQL
 Target Server Version : 80404 (8.4.4)
 File Encoding         : 65001

 Date: 19/05/2025 08:30:20
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for nl_admin
-- ----------------------------
DROP TABLE IF EXISTS `nl_admin`;
CREATE TABLE `nl_admin`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `open_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'OpenID，后期整合萧康服务中心会用到',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像',
  `nick_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '昵称',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
  `phone` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户手机',
  `email` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户邮箱',
  `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '业务员推广码',
  `role_id` int NOT NULL DEFAULT 0 COMMENT '角色',
  `province_id` int NOT NULL DEFAULT 0 COMMENT '省',
  `city_id` int NOT NULL DEFAULT 0 COMMENT '市',
  `reg_ip` bigint NOT NULL DEFAULT 0 COMMENT '注册IP',
  `last_login_time` int NOT NULL DEFAULT 0 COMMENT '最后登录时间',
  `ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '最后登录IP',
  `ip_table` json NOT NULL COMMENT '常用登录IP地址列表',
  `operation_password` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '操作密码',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint NOT NULL DEFAULT 1 COMMENT '用户状态 0正常 1禁用',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间',
  `deleted_at` int NOT NULL DEFAULT 0 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 nl_admin
-- ----------------------------
INSERT INTO `nl_admin` VALUES (1, 'nl_28686ad68682180e26836c721a52', '', '超管', '$2y$12$sMgspfujo/5qnMEFvXH2d.0hYq/7PXhkJREYHbc..4WKt5LH7M8ui', '15100000000', 'workerqi@163.com', '517117', 1, 0, 0, 0, 0, '127.0.0.1', '[\"127.0.0.1\"]', '0', '', 1, 0, 1747026536, 0);

-- ----------------------------
-- Table structure for nl_admin_notice
-- ----------------------------
DROP TABLE IF EXISTS `nl_admin_notice`;
CREATE TABLE `nl_admin_notice`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '消息标题',
  `detail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '简介',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '消息内容',
  `type` int NOT NULL DEFAULT 0 COMMENT '消息类型',
  `user_id` int NOT NULL DEFAULT 0 COMMENT '关联用户ID',
  `status` int NOT NULL DEFAULT 0 COMMENT '状态 0：未读 1：已读',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间',
  `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '管理员消息列表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nl_admin_notice
-- ----------------------------

-- ----------------------------
-- Table structure for nl_api_op_log
-- ----------------------------
DROP TABLE IF EXISTS `nl_api_op_log`;
CREATE TABLE `nl_api_op_log`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` int NOT NULL COMMENT '操作用户ID',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作路由',
  `method` tinyint(1) NOT NULL DEFAULT 0 COMMENT '请求方式 0：未知 1：GET 2：POST',
  `controller` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作的控制器',
  `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作者IP地址',
  `param` json NOT NULL COMMENT '请求携带参数',
  `result` json NOT NULL COMMENT '返回json',
  `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '操作状态 0：成功 1：失败',
  `result_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '返回状态码',
  `platform_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '平台类型 0：总后台 1：门店后台 2：小程序',
  `belong_id` int NOT NULL DEFAULT 0 COMMENT '所属平台ID',
  `user_type` int NOT NULL DEFAULT 0 COMMENT '用户类型',
  `equipment` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作系统',
  `browser` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '浏览器',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16860 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '新的后台API访问日志记录' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nl_api_op_log
-- ----------------------------

-- ----------------------------
-- Table structure for nl_code_generation
-- ----------------------------
DROP TABLE IF EXISTS `nl_code_generation`;
CREATE TABLE `nl_code_generation`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单标题',
  `file_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文件名称',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '下载链接',
  `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '生成参数',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间',
  `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码生成记录' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nl_code_generation
-- ----------------------------
INSERT INTO `nl_code_generation` VALUES (1, '产品', '产品-68245521ec6da.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/产品-68245521ec6da.zip', '{\"class_name\":\"product\",\"class_comment\":\"\\u4ea7\\u54c1\",\"sort\":1,\"icon\":\"ep:goods-filled\",\"pid\":5,\"field\":[{\"name\":\"title\",\"type\":\"varchar\",\"type_length\":\"128\",\"default\":null,\"comment\":\"\\u5546\\u54c1\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"mall_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u5546\\u5bb6ID\",\"not_null\":true,\"formShow\":false,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"user_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u4e0a\\u4f20\\u7528\\u6237ID\",\"not_null\":true,\"formShow\":false,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"introduction\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u7b80\\u4ecb\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"Textarea\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"cover\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5c01\\u9762\\u56fe\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"description\",\"type\":\"TEXT\",\"type_length\":null,\"default\":null,\"comment\":\"\\u8be6\\u7ec6\\u8bf4\\u660e\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\",\"null\":true},{\"name\":\"price\",\"type\":\"DECIMAL\",\"type_length\":\"10,2\",\"default\":\"0\",\"comment\":\"\\u4ef7\\u683c\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"classification_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u4ea7\\u54c1\\u5206\\u7c7b\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747211554, 1747211554, 0);
INSERT INTO `nl_code_generation` VALUES (2, '商品分类', '商品分类-68245705d2a02.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/商品分类-68245705d2a02.zip', '{\"class_name\":\"productClassification\",\"class_comment\":\"\\u5546\\u54c1\\u5206\\u7c7b\",\"sort\":50,\"icon\":\"carbon:data-class\",\"pid\":10,\"field\":[{\"name\":\"name\",\"type\":\"varchar\",\"type_length\":\"32\",\"default\":null,\"comment\":\"\\u5206\\u7c7b\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"cover\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5206\\u7c7b\\u56fe\\u7247\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"pid\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u7236\\u7ea7\\u5206\\u7c7b\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747212037, 1747212037, 0);
INSERT INTO `nl_code_generation` VALUES (3, '商品标签', '商品标签-68245ad6a3ba6.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/商品标签-68245ad6a3ba6.zip', '{\"class_name\":\"productLabel\",\"class_comment\":\"\\u5546\\u54c1\\u6807\\u7b7e\",\"sort\":60,\"icon\":\"fluent-emoji:label\",\"pid\":10,\"field\":[{\"name\":\"name\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u6807\\u7b7e\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747213014, 1747213014, 0);
INSERT INTO `nl_code_generation` VALUES (4, '商品图片', '商品图片-682a7abf8d587.zip', '/www/sites/nl-mall/index/nl-mall-api/storage/app/public/zip/code-generation/商品图片-682a7abf8d587.zip', '{\"class_name\":\"productImage\",\"class_comment\":\"\\u5546\\u54c1\\u56fe\\u7247\",\"sort\":100,\"icon\":\"catppuccin:image\",\"pid\":10,\"field\":[{\"name\":\"url\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5546\\u54c1\\u5730\\u5740\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"Avatar\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"product_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":\"0\",\"comment\":\"\\u5546\\u54c1ID\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747614399, 1747614399, 0);

-- ----------------------------
-- Table structure for nl_file
-- ----------------------------
DROP TABLE IF EXISTS `nl_file`;
CREATE TABLE `nl_file`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` int NOT NULL DEFAULT 0 COMMENT '用户ID',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文件地址',
  `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '文件类型 0：图片 1：视频 2：音频 3：excel 4：压缩包 ',
  `source` tinyint(1) NOT NULL DEFAULT 0 COMMENT '来源 0：后台 1：用户端',
  `created_at` int NOT NULL COMMENT '上传时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间',
  `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 87 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '文件表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nl_file
-- ----------------------------
INSERT INTO `nl_file` VALUES (84, 1, 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_0hihYRbKMo0PfGg1682459de08829.png', 0, 0, 1747212766, 0, 0);
INSERT INTO `nl_file` VALUES (85, 1, 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_r9HVNOq19s5aFZKz682459e9cde8c.png', 0, 0, 1747212777, 0, 0);
INSERT INTO `nl_file` VALUES (86, 1, 'http://127.0.0.1:18010/storage/spa/image/20250519/cc_upload_61k5vKIw1Tdt0cD8682a78a699ada.jpg', 0, 0, 1747613862, 0, 0);

-- ----------------------------
-- Table structure for nl_menu
-- ----------------------------
DROP TABLE IF EXISTS `nl_menu`;
CREATE TABLE `nl_menu`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单标题',
  `icon` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单图标',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '页面Name，全局唯一',
  `path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '访问路由',
  `component` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '组件路径需要去掉 views/ 和 .vue',
  `redirect` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '父级菜单重定向的子集菜单',
  `keep_alive` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否开启页面缓存 0：开启 1：关闭',
  `hide_in_menu` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否将页面展示在菜单栏 0：展示 1：隐藏',
  `affix_tab` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否为置顶页 0：是 1：否',
  `badge` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单的徽标',
  `badge_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用于配置页面的徽标类型，0：dot 小红点 1：normal 文本',
  `badge_variants` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用于配置页面的徽标颜色 \r\n0：default 1：destructive 2：primary 3：success 4： warning',
  `iframe_src` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '内嵌的页面路径',
  `pid` int NOT NULL DEFAULT 0 COMMENT '父级菜单id',
  `sort` int NOT NULL DEFAULT 0 COMMENT '排序',
  `query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '默认查询参数',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间',
  `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '菜单表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nl_menu
-- ----------------------------
INSERT INTO `nl_menu` VALUES (1, '概览', 'twemoji:house-with-garden', 'Dashboard', '/', 'BasicLayout', '', 0, 0, 1, '', 0, 0, '', 0, -1, '', 1734485082, 1734486088, 0);
INSERT INTO `nl_menu` VALUES (2, '分析页', 'lucide:area-chart', 'Analytics', '/analytics', '/dashboard/analytics/index', '', 1, 0, 0, '', 0, 0, '', 1, 0, '', 1734485206, 1734485814, 0);
INSERT INTO `nl_menu` VALUES (3, '工作台', 'carbon:workspace', 'Workspace', '/workspace', '/dashboard/workspace/index', '', 1, 0, 1, '', 0, 0, '', 1, 0, '', 1734486030, 0, 0);
INSERT INTO `nl_menu` VALUES (4, '关于', 'lucide:copyright', 'About', '/about', '/_core/about/index.vue', '', 1, 0, 1, '', 0, 0, '', 0, 999999999, '', 0, 0, 0);
INSERT INTO `nl_menu` VALUES (5, '基础管理', 'logos:openjs-foundation-icon', 'System', '/system', 'BasicLayout', '', 0, 0, 1, '', 0, 0, '', 0, 1000, '', 1734486082, 1735117933, 0);
INSERT INTO `nl_menu` VALUES (6, '管理员管理', 'grommet-icons:user-admin', 'SystemUser', '/system/user', '/system/admin/index', '', 1, 0, 1, '', 0, 0, '', 5, 0, '', 1734486178, 0, 0);
INSERT INTO `nl_menu` VALUES (7, '角色管理', 'carbon:user-role', 'SystemRole', '/system/role', '/system/role/index', '', 1, 0, 1, '', 0, 0, '', 5, 1, '', 1734486291, 1734489429, 0);
INSERT INTO `nl_menu` VALUES (8, '菜单管理', 'line-md:menu', 'SystemMenu', '/system/menu', '/system/menu/index', '', 1, 0, 1, '', 0, 0, '', 5, 2, '', 1734486345, 0, 0);
INSERT INTO `nl_menu` VALUES (9, '代码生成', 'fluent-color:code-20', 'CodeGeneration', '/code-generation', '/code-generation/index', '', 1, 0, 1, '', 0, 0, '', 0, 99999999, '', 1734486345, 0, 0);
INSERT INTO `nl_menu` VALUES (10, '商品中心', 'ep:goods-filled', 'ProductCenter', '/product-center', 'BasicLayout', '', 1, 0, 1, '', 0, 0, '', 0, 30, '', 1734486345, 0, 0);
INSERT INTO `nl_menu` VALUES (11, '产品', 'ep:goods-filled', 'Product', '/product', '/my-gen/product/index', '', 1, 0, 1, '', 0, 0, '', 10, 1, '', 1747211554, 1747211701, 0);
INSERT INTO `nl_menu` VALUES (12, '商品分类', 'carbon:data-class', 'ProductClassification', '/product-classification', '/my-gen/product-classification/index', '', 1, 0, 1, '', 0, 0, '', 10, 50, '', 1747212037, 0, 0);
INSERT INTO `nl_menu` VALUES (13, '商品标签', 'fluent-emoji:label', 'ProductLabel', '/product-label', '/my-gen/product-label/index', '', 1, 0, 1, '', 0, 0, '', 10, 60, '', 1747213014, 0, 0);
INSERT INTO `nl_menu` VALUES (14, '商品图片', 'catppuccin:image', 'ProductImage', '/product-image', '/my-gen/product-image/index', '', 1, 0, 1, '', 0, 0, '', 10, 100, '', 1747614399, 0, 0);

-- ----------------------------
-- Table structure for nl_product
-- ----------------------------
DROP TABLE IF EXISTS `nl_product`;
CREATE TABLE `nl_product`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品名称',
  `mall_id` int NOT NULL DEFAULT 0 COMMENT '商家ID',
  `user_id` int NOT NULL DEFAULT 0 COMMENT '上传用户ID',
  `introduction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '简介',
  `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '封面图',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '详细说明',
  `price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '价格',
  `classification_id` int NOT NULL DEFAULT 0 COMMENT '产品分类',
  `quantity_sold` int NOT NULL DEFAULT 0 COMMENT '已售数量',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0：正常 1：禁用',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间',
  `deleted_at` int NOT NULL DEFAULT 0 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 nl_product
-- ----------------------------

-- ----------------------------
-- Table structure for nl_product_classification
-- ----------------------------
DROP TABLE IF EXISTS `nl_product_classification`;
CREATE TABLE `nl_product_classification`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类名称',
  `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类图片',
  `pid` int NOT NULL DEFAULT 0 COMMENT '父级分类',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0：正常 1：禁用',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间',
  `deleted_at` int NOT NULL DEFAULT 0 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 nl_product_classification
-- ----------------------------
INSERT INTO `nl_product_classification` VALUES (1, '服装鞋帽箱包类', 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_r9HVNOq19s5aFZKz682459e9cde8c.png', 0, 0, 1747212820, 0, 0);

-- ----------------------------
-- Table structure for nl_product_image
-- ----------------------------
DROP TABLE IF EXISTS `nl_product_image`;
CREATE TABLE `nl_product_image`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品地址',
  `product_id` int NOT NULL DEFAULT 0 COMMENT '商品ID',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0：正常 1：禁用',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间',
  `deleted_at` int NOT NULL DEFAULT 0 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 nl_product_image
-- ----------------------------

-- ----------------------------
-- Table structure for nl_product_label
-- ----------------------------
DROP TABLE IF EXISTS `nl_product_label`;
CREATE TABLE `nl_product_label`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '标签名称',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0：正常 1：禁用',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间',
  `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '商品标签表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of nl_product_label
-- ----------------------------
INSERT INTO `nl_product_label` VALUES (1, '包邮', 0, 1747213158, 0, 0);
INSERT INTO `nl_product_label` VALUES (2, '7天无理由退货', 0, 1747213167, 0, 0);
INSERT INTO `nl_product_label` VALUES (3, '绝对正版', 0, 1747213198, 0, 0);

-- ----------------------------
-- Table structure for nl_role
-- ----------------------------
DROP TABLE IF EXISTS `nl_role`;
CREATE TABLE `nl_role`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色名称',
  `value` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色值',
  `pid` int NOT NULL DEFAULT 0 COMMENT '上级角色',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '角色说明',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间',
  `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nl_role
-- ----------------------------
INSERT INTO `nl_role` VALUES (1, '超级管理员', 'admin', 0, '', 0, 0, 0);
INSERT INTO `nl_role` VALUES (2, '后台工作人员', 'admin user', 0, '负责ToB的工作和用户投诉', 1747210408, 0, 0);
INSERT INTO `nl_role` VALUES (3, '商家', 'merchant', 0, '入住的商家', 1747210437, 0, 0);
INSERT INTO `nl_role` VALUES (4, '商家客服', 'Merchant customer service', 0, '负责商家的客服工作', 1747210525, 0, 0);
INSERT INTO `nl_role` VALUES (5, '商家运营', 'Merchant operation', 0, '负责整体店铺的运营和管理，包括制定店铺的经营策略、规划商品品类、设定价格策略、策划营销活动等，以提升店铺的销售额和利润，同时还要分析销售数据，了解消费者行为和市场趋势，以便及时调整运营策略。', 1747210567, 0, 0);

-- ----------------------------
-- Table structure for nl_role_menu_relations
-- ----------------------------
DROP TABLE IF EXISTS `nl_role_menu_relations`;
CREATE TABLE `nl_role_menu_relations`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `role_id` int NOT NULL DEFAULT 0 COMMENT '角色ID',
  `menu_id` int NOT NULL DEFAULT 0 COMMENT '菜单ID',
  `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色权限绑定表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nl_role_menu_relations
-- ----------------------------
INSERT INTO `nl_role_menu_relations` VALUES (1, 1, 1, 1747033198);
INSERT INTO `nl_role_menu_relations` VALUES (2, 1, 2, 1747033198);
INSERT INTO `nl_role_menu_relations` VALUES (3, 1, 3, 1747033198);
INSERT INTO `nl_role_menu_relations` VALUES (4, 1, 4, 1747033198);
INSERT INTO `nl_role_menu_relations` VALUES (5, 1, 5, 1747033198);
INSERT INTO `nl_role_menu_relations` VALUES (6, 1, 6, 1747033198);
INSERT INTO `nl_role_menu_relations` VALUES (7, 1, 7, 1747033198);
INSERT INTO `nl_role_menu_relations` VALUES (8, 1, 8, 1747033198);

SET FOREIGN_KEY_CHECKS = 1;
