/*
 Navicat Premium Dump SQL

 Source Server         : 共享平台商城系统开发
 Source Server Type    : MySQL
 Source Server Version : 50644 (5.6.44-log)
 Source Host           : 47.112.222.163:63306
 Source Schema         : nn2025112501

 Target Server Type    : MySQL
 Target Server Version : 50644 (5.6.44-log)
 File Encoding         : 65001

 Date: 13/12/2025 00:57:10
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for lev_users
-- ----------------------------
DROP TABLE IF EXISTS `lev_users`;
CREATE TABLE `lev_users`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_user_role
-- ----------------------------
DROP TABLE IF EXISTS `lev_user_role`;
CREATE TABLE `lev_user_role`  (
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '人员ID',
  `role_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色ID',
  INDEX `admin_id`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '人员角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_user
-- ----------------------------
DROP TABLE IF EXISTS `lev_user`;
CREATE TABLE `lev_user`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '绑定商户用户ID',
  `realname` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '真实姓名',
  `nickname` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '昵称',
  `gender` tinyint(3) UNSIGNED NOT NULL DEFAULT 3 COMMENT '性别:1男 2女 3保密',
  `avatar` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '头像',
  `mobile` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '手机号码',
  `email` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '邮箱地址',
  `birthday` date NULL DEFAULT NULL COMMENT '出生日期',
  `dept_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '部门ID',
  `level_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '职级ID',
  `position_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '岗位ID',
  `province_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '省份ID',
  `city_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '市区ID',
  `district_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '区县ID',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '详细地址',
  `city_name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '所属城市',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '登录用户名',
  `password` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '登录密码',
  `salt` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '盐加密',
  `intro` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '个人简介',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1正常 2禁用',
  `note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '显示顺序',
  `login_num` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录次数',
  `login_ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '最近登录IP',
  `login_time` datetime NULL DEFAULT NULL COMMENT '最近登录时间',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `realname`(`realname`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 78 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '后台用户管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_stores_categorys
-- ----------------------------
DROP TABLE IF EXISTS `lev_stores_categorys`;
CREATE TABLE `lev_stores_categorys`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称',
  `pid` int(10) NULL DEFAULT 0 COMMENT '上级ID：默认一级',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序：倒序',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商家行业分类表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for lev_stores
-- ----------------------------
DROP TABLE IF EXISTS `lev_stores`;
CREATE TABLE `lev_stores`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '店铺名称',
  `real_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '姓名',
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '电话',
  `address` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所在地址',
  `category_id` int(10) NOT NULL DEFAULT 0 COMMENT '所属行业分类ID',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `business_license` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '营业执照',
  `other_photo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '其他证件照',
  `order_count` int(10) NOT NULL DEFAULT 0 COMMENT '累计订单销量',
  `order_total` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '累计销售额',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `confirm_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '审核备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-已审核（营业中），2-待审核，3-审核失败',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `phone`(`phone`) USING BTREE,
  INDEX `real_name`(`real_name`) USING BTREE,
  INDEX `category_id`(`category_id`) USING BTREE,
  INDEX `order_count`(`order_count`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 71 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '入驻商家店铺表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_social_circles
-- ----------------------------
DROP TABLE IF EXISTS `lev_social_circles`;
CREATE TABLE `lev_social_circles`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '应用名称',
  `link_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '平台类型：1-web（需要域名授权）,2-小程序',
  `link_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '链接地址：web链接地址/小程序页面地址',
  `app_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `logo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '应用LOGO',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` int(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` int(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `link_type`(`link_type`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '生活圈推荐应用表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `lev_role_menu`;
CREATE TABLE `lev_role_menu`  (
  `role_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色ID',
  `menu_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '菜单ID',
  INDEX `role_id`(`menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色菜单关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_role
-- ----------------------------
DROP TABLE IF EXISTS `lev_role`;
CREATE TABLE `lev_role`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色名称',
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色标签',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1正常 2禁用',
  `note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '排序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_payment_logs
-- ----------------------------
DROP TABLE IF EXISTS `lev_payment_logs`;
CREATE TABLE `lev_payment_logs`  (
  `payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '订单号（组合支付购物车结算为订单payment_no）',
  `money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '付款金额',
  `trade_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '交易单号',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '交易结果备注',
  `create_time` int(11) NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-待支付，2-已支付，3-支付失败',
  `mark` tinyint(1) NULL DEFAULT NULL COMMENT '删除：0-是',
  PRIMARY KEY (`payment_id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `trade_no`(`trade_no`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_pay_orders
-- ----------------------------
DROP TABLE IF EXISTS `lev_pay_orders`;
CREATE TABLE `lev_pay_orders`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '单号',
  `total` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '金额',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '缴费类型：1-话费，2-电费，3-燃气',
  `discount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '折扣',
  `pay_total` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '实付金额',
  `account` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '充值号码（手机号、电费户、qq号等）',
  `transaction_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '交易单号',
  `meal_id` int(10) NOT NULL DEFAULT 0 COMMENT '充值套餐ID',
  `product_id` int(10) NOT NULL DEFAULT 0 COMMENT '实际产品ID',
  `out_trade_num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '缴费平台商户订单号',
  `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注说明',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-待付款，2-已付款，3-充值中，4充值成功，5-充值失败，6-已退款',
  `mark` tinyint(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `transaction_id`(`transaction_id`) USING BTREE,
  INDEX `out_trade_num`(`out_trade_num`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `product_id`(`product_id`) USING BTREE,
  INDEX `meal_id`(`meal_id`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 51 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '充值缴费订单表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_pay_meals
-- ----------------------------
DROP TABLE IF EXISTS `lev_pay_meals`;
CREATE TABLE `lev_pay_meals`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `product_id` int(10) NOT NULL DEFAULT 0 COMMENT '充值产品ID（接口平台后台获取对应类型下产品ID，如：50元话费-1105，100元电费-1040，100元燃气-1458）',
  `money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '缴费金额',
  `discount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '折扣0-100%，0-无折扣',
  `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '充值类型：1-话费充值，2-电费充值，3-燃气充值',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序倒序',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `product_id`(`product_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '缴费充值套餐表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_orders_goods
-- ----------------------------
DROP TABLE IF EXISTS `lev_orders_goods`;
CREATE TABLE `lev_orders_goods`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(10) NULL DEFAULT 0 COMMENT '订单ID',
  `goods_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '货物名称',
  `category_id` int(10) NULL DEFAULT 0 COMMENT '商品分类',
  `store_id` int(10) NULL DEFAULT 0 COMMENT '所属店铺ID：0-平台',
  `price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '默认单价',
  `stock` int(11) NULL DEFAULT 0 COMMENT '总库存',
  `unit` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '默认单规格单位',
  `weight` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '默认单规格重量KG',
  `thumb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '封面图',
  `sku_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '规格类型：1-单规格，2-多规格',
  `sku_id` int(10) NOT NULL DEFAULT 0 COMMENT 'SKU规格ID,0-单规格',
  `create_time` int(11) NULL DEFAULT 0,
  `update_time` int(11) NULL DEFAULT 0,
  `confirm_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '审核备注：商家端显示',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '发布状态：1-发布，2-待发布，3-待审核，4-审核失败',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `goods_id`(`id`) USING BTREE,
  INDEX `goods_name`(`goods_name`(191)) USING BTREE,
  INDEX `car_type`(`category_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 98 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '货物商品表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_orders
-- ----------------------------
DROP TABLE IF EXISTS `lev_orders`;
CREATE TABLE `lev_orders`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '单号',
  `user_id` int(11) NULL DEFAULT 0 COMMENT '用户ID',
  `store_id` int(10) NOT NULL DEFAULT 0 COMMENT '店铺ID',
  `total` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '订单金额',
  `pay_total` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '实付金额',
  `transaction_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '交易单号',
  `receiver_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '收货人姓名',
  `receiver_area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '收货人所在区域（省市区）',
  `receiver_address` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '收货人详细地址',
  `delivery_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '快递单号',
  `delivery_company` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '快递公司',
  `delivery_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '快递公司编号',
  `bonus` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '商家结算佣金金额',
  `after_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '售后类型：1-售后，2-退款',
  `after_realname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '售后联系人姓名',
  `after_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '售后联系电话',
  `after_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '售后备注说明',
  `refund_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '退款审核备注',
  `refund_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '退款状态：0-无，1-已退款，2-已审核，3-待审核，4-审核驳回',
  `create_time` int(11) NULL DEFAULT 0,
  `update_time` int(11) NULL DEFAULT 0,
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-待付款，2-已付款，3-已发货，4-确认收货（已完成）',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_id`(`id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `create_time`(`create_time`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城订单表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_notice
-- ----------------------------
DROP TABLE IF EXISTS `lev_notice`;
CREATE TABLE `lev_notice`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '通知ID',
  `title` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '通知标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '通知内容',
  `source` tinyint(1) NULL DEFAULT NULL COMMENT '来源：1内部通知 2外部新闻',
  `is_top` tinyint(3) UNSIGNED NULL DEFAULT 2 COMMENT '是否置顶：1是 2否',
  `browse` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '阅读量',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 COMMENT '状态：1已发布 2待发布',
  `create_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_title`(`title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '通知公告表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_migrations
-- ----------------------------
DROP TABLE IF EXISTS `lev_migrations`;
CREATE TABLE `lev_migrations`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_message
-- ----------------------------
DROP TABLE IF EXISTS `lev_message`;
CREATE TABLE `lev_message`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '消息标题',
  `type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '消息类型：1-客服消息，2-抢单消息，3-缴纳保证金消息',
  `msg_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '消息内容类型：1-文字，2-图片，3-文章列表，4-JSON数据',
  `description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '描述',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消息内容',
  `from_uid` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '来源用户ID',
  `to_uid` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '接收用户ID',
  `chat_key` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '对话组key(聊天类型，发送接收用户ID)',
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '关联订单号',
  `create_time` int(11) NOT NULL DEFAULT 0,
  `update_time` int(11) NOT NULL DEFAULT 0,
  `is_read` tinyint(1) NOT NULL DEFAULT 2 COMMENT '是否已读：1-是，2-否',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-已发送，2-待发送，3-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `to_uid`(`to_uid`) USING BTREE,
  INDEX `from_uid`(`from_uid`) USING BTREE,
  INDEX `is_read`(`is_read`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `msg_type`(`msg_type`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `chat_key`(`chat_key`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '客服聊天消息记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_menu
-- ----------------------------
DROP TABLE IF EXISTS `lev_menu`;
CREATE TABLE `lev_menu`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级ID',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '菜单标题',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '图标',
  `path` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '菜单路径',
  `component` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '菜单组件',
  `target` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '目标',
  `permission` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '权限标识',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型：0菜单 1节点',
  `status` tinyint(3) UNSIGNED NULL DEFAULT 1 COMMENT '是否显示：1显示 2不显示',
  `note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(5) UNSIGNED NULL DEFAULT 125 COMMENT '显示顺序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_pid`(`pid`) USING BTREE,
  INDEX `index_name`(`title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 381 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统菜单表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for lev_member_level
-- ----------------------------
DROP TABLE IF EXISTS `lev_member_level`;
CREATE TABLE `lev_member_level`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '级别名称',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '显示顺序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员级别表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_member_banks
-- ----------------------------
DROP TABLE IF EXISTS `lev_member_banks`;
CREATE TABLE `lev_member_banks`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '账户类型：1-支付宝，2-银行卡',
  `realname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '真实姓名',
  `account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '账户：支付宝/银行卡号',
  `account_remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '账户备注：开户行/支行',
  `create_time` int(11) NOT NULL,
  `update_time` int(11) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户收款账户表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_member_address
-- ----------------------------
DROP TABLE IF EXISTS `lev_member_address`;
CREATE TABLE `lev_member_address`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户',
  `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
  `realname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '姓名',
  `province` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '省',
  `city` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '市',
  `district` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '区',
  `address` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
  `codes` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '地址编号',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `is_default` tinyint(1) NOT NULL DEFAULT 2 COMMENT '是否默认',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `mark` tinyint(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户收货地址' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_member
-- ----------------------------
DROP TABLE IF EXISTS `lev_member`;
CREATE TABLE `lev_member`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `openid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户唯一标识',
  `mobile` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '手机号',
  `user_type` tinyint(1) NULL DEFAULT 2 COMMENT '账号类型：1-用户',
  `password` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '密码',
  `member_level` smallint(6) NULL DEFAULT 0 COMMENT '会员等级',
  `realname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '真实姓名',
  `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户昵称',
  `gender` tinyint(3) UNSIGNED NULL DEFAULT 3 COMMENT '性别（1男 2女 3未知）',
  `avatar` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户头像',
  `birthday` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '出生日期',
  `balance` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '账户余额',
  `parent_id` int(10) NOT NULL DEFAULT 0 COMMENT '推荐人ID',
  `parents` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '所有上级推荐人ID',
  `province_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '户籍省份编号',
  `city_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '户籍城市编号',
  `district_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '户籍区/县编号',
  `intro` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '个人简介',
  `signature` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '个性签名',
  `device` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '设备类型：1苹果 2安卓 3WAP站 4PC站 5后台添加',
  `device_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '推送的别名',
  `push_alias` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '推送的别名',
  `app_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'UUID',
  `source` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '来源：1、APP注册；2、后台添加；',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-正常，2-冻结（不可登录）',
  `app_version` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '客户端版本号',
  `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '我的推广码',
  `login_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上次登录时间',
  `login_ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '最近登录IP',
  `login_region` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '上次登录地点',
  `login_count` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录总次数',
  `create_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '审核人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `mobile`(`mobile`) USING BTREE,
  INDEX `user_type`(`user_type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1004 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for lev_link
-- ----------------------------
DROP TABLE IF EXISTS `lev_link`;
CREATE TABLE `lev_link`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '友链名称',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '类型：1友情链接 2合作伙伴',
  `url` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '友链地址',
  `item_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '站点ID',
  `cate_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '栏目ID',
  `platform` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '平台：1PC站 2WAP站 3微信小程序 4APP应用',
  `form` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '友链形式：1文字链接 2图片链接',
  `image` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '友链图片',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1在用 2停用',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '显示顺序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '友链管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_jobs_categorys
-- ----------------------------
DROP TABLE IF EXISTS `lev_jobs_categorys`;
CREATE TABLE `lev_jobs_categorys`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称',
  `pid` int(10) NULL DEFAULT 0 COMMENT '上级ID：默认一级',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序：倒序',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '招聘职位分类表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for lev_jobs
-- ----------------------------
DROP TABLE IF EXISTS `lev_jobs`;
CREATE TABLE `lev_jobs`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `category_id` int(10) NOT NULL DEFAULT 0 COMMENT '分类ID',
  `job_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '具体职位名称',
  `job_title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '招聘标题',
  `salary` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '具体薪资或范围：范围用-或～间隔',
  `recruiter` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '招聘人姓名',
  `recruiter_position` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '招聘人职位',
  `recruiter_phone` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '招聘人联系电话',
  `company` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '招聘公司名称',
  `logo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '招聘公司logo',
  `company_desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '招聘公司介绍',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '职位详情介绍',
  `num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '招聘人数或人数范围',
  `tags` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '其他要求标签：经验、学历等，多个|分隔',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-发布，2-待发布',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `job_name`(`job_name`) USING BTREE,
  INDEX `job_title`(`job_title`(191)) USING BTREE,
  INDEX `recruiter`(`recruiter`) USING BTREE,
  INDEX `company`(`company`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE,
  INDEX `category_id`(`category_id`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '招聘信息表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_goods_skus
-- ----------------------------
DROP TABLE IF EXISTS `lev_goods_skus`;
CREATE TABLE `lev_goods_skus`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id',
  `sku_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '规格名称',
  `price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '价格',
  `stock` int(10) NOT NULL DEFAULT 0 COMMENT '库存',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品多规格数据表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_goods_categorys
-- ----------------------------
DROP TABLE IF EXISTS `lev_goods_categorys`;
CREATE TABLE `lev_goods_categorys`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称',
  `pid` int(10) NULL DEFAULT 0 COMMENT '上级ID：默认一级',
  `icon` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '图标',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序：倒序',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商品分类表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for lev_goods
-- ----------------------------
DROP TABLE IF EXISTS `lev_goods`;
CREATE TABLE `lev_goods`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goods_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '货物名称',
  `category_id` int(10) NULL DEFAULT 0 COMMENT '商品分类',
  `store_id` int(10) NULL DEFAULT 0 COMMENT '所属店铺ID：0-平台',
  `price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '默认单价',
  `stock` int(11) NULL DEFAULT 0 COMMENT '总库存',
  `sku_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '规格类型：1-单规格（直接单位和默认价格）2-多规格（一级规格数据，多价格）',
  `unit` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '默认单规格单位',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `weight` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '默认单规格重量KG',
  `thumb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '封面图',
  `albums` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '相册',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '商品详情',
  `create_time` int(11) NULL DEFAULT 0,
  `update_time` int(11) NULL DEFAULT 0,
  `confirm_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '审核备注：商家端显示',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '发布状态：1-发布，2-待发布，3-待审核，4-审核失败',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `goods_name`(`goods_name`(191)) USING BTREE,
  INDEX `car_type`(`category_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `id`(`id`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 108 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '货物商品表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_config_group
-- ----------------------------
DROP TABLE IF EXISTS `lev_config_group`;
CREATE TABLE `lev_config_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组名称',
  `sort` tinyint(4) NOT NULL COMMENT '排序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '配置分组表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_config
-- ----------------------------
DROP TABLE IF EXISTS `lev_config`;
CREATE TABLE `lev_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置标题',
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置编码',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置值',
  `options` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置项',
  `config_group_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '配置分组ID',
  `type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '配置类型',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1正常 2停用',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
  `note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置说明',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_title`(`title`) USING BTREE,
  INDEX `index_code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 97 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '配置表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_complaint
-- ----------------------------
DROP TABLE IF EXISTS `lev_complaint`;
CREATE TABLE `lev_complaint`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '联系电话',
  `realname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '姓名',
  `content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '反馈内容',
  `albums` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `create_time` int(10) NOT NULL,
  `update_time` int(10) NOT NULL,
  `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '处理备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-待处理，2-已处理',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '投诉建议记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_city
-- ----------------------------
DROP TABLE IF EXISTS `lev_city`;
CREATE TABLE `lev_city`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '编号',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级编号',
  `level` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '城市级别：1省 2市 3区',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '城市名称',
  `citycode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '城市编号（区号）',
  `p_adcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '父级地理编号',
  `adcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '地理编号',
  `lng` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '城市坐标中心点经度（* 1e6）：如果是中国，此值是 1e7',
  `lat` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '城市坐标中心点纬度（* 1e6）',
  `sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 125 COMMENT '排序号',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标记',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_name`(`name`) USING BTREE COMMENT '城市名称'
) ENGINE = InnoDB AUTO_INCREMENT = 3215 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '行政区划表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_carts
-- ----------------------------
DROP TABLE IF EXISTS `lev_carts`;
CREATE TABLE `lev_carts`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户',
  `goods_id` int(10) NOT NULL DEFAULT 0 COMMENT '商品ID',
  `store_id` int(10) NOT NULL DEFAULT 0 COMMENT '商户店铺ID',
  `sku_id` int(11) NOT NULL DEFAULT 0 COMMENT '规格ID，0-单规格',
  `num` int(10) NOT NULL DEFAULT 0 COMMENT '数量',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `goods_id`(`goods_id`) USING BTREE,
  INDEX `store_id`(`store_id`) USING BTREE,
  INDEX `sku_id`(`sku_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '购物车记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_balance_logs
-- ----------------------------
DROP TABLE IF EXISTS `lev_balance_logs`;
CREATE TABLE `lev_balance_logs`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '订单ID',
  `order_no` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单号',
  `user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户ID',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '类型：1-充值，2-提现',
  `account_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '账户类型：1-会员账户，2-代理账户，3-商户账户',
  `realname` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '提现姓名',
  `money` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '充值/提现金额',
  `actual_money` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实际到账金额',
  `pay_type` tinyint(1) NOT NULL DEFAULT 10 COMMENT '付款方式：10-微信，20-支付宝，50-银行卡',
  `pay_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 10 COMMENT '支付状态(10待支付 20已支付)',
  `pay_at` timestamp NOT NULL COMMENT '付款时间',
  `pay_img` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '打款凭证',
  `transaction_id` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付交易号',
  `account` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '提现账号(支付宝账号/微信/银行卡号)',
  `account_remark` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '账号备注：支行/开户行',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '日期',
  `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `confirm_remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：-1-已取消，1-待审核，2-已审核/到账，3-审核失败',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充值/提现记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_article_cates
-- ----------------------------
DROP TABLE IF EXISTS `lev_article_cates`;
CREATE TABLE `lev_article_cates`  (
  `cate_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称',
  `type` tinyint(1) NULL DEFAULT 2 COMMENT '类别：1-文章，2-客服回复',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`cate_id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文章分类表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_article
-- ----------------------------
DROP TABLE IF EXISTS `lev_article`;
CREATE TABLE `lev_article`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `title` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文章标题',
  `cover` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '首张图片编号',
  `tags` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文章标签',
  `cate_id` int(11) NULL DEFAULT 0 COMMENT '分类ID',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '类型：1-充值协议，2-注册协议',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序：倒序',
  `view_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '浏览次数',
  `description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '文章描述',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '内容',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 COMMENT '状态：1-发布，2-待发布',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `title`(`title`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `cate_id`(`cate_id`) USING BTREE,
  INDEX `description`(`description`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文章管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_agents
-- ----------------------------
DROP TABLE IF EXISTS `lev_agents`;
CREATE TABLE `lev_agents`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `real_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '姓名',
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
  `balance` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '账户余额（分销佣金）',
  `income` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '累计分销收入',
  `withdraw_total` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '累计收入提现',
  `order_count` int(10) NOT NULL DEFAULT 0 COMMENT '分销订单数',
  `idcard` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '身份证',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `confirm_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '审核备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-已审核，2-待审核，3-驳回，4-冻结（无法进入代理端）',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代理入驻表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_ad
-- ----------------------------
DROP TABLE IF EXISTS `lev_ad`;
CREATE TABLE `lev_ad`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '广告标题',
  `position` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告位置',
  `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '广告图片',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告格式：1图片 2文字 3视频 4推荐',
  `description` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '广告描述',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '广告内容',
  `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '广告链接',
  `width` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告宽度',
  `height` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告高度',
  `start_time` int(10) UNSIGNED NOT NULL COMMENT '开始时间',
  `end_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '结束时间',
  `view_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告点击次数',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1在用 2停用',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '排序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `title`(`title`) USING BTREE,
  INDEX `ad_sort_id`(`position`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '广告管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_action_log_2025_12
-- ----------------------------
DROP TABLE IF EXISTS `lev_action_log_2025_12`;
CREATE TABLE `lev_action_log_2025_12`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作人用户名',
  `method` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求类型',
  `module` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模型',
  `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作方法',
  `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作页面',
  `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求参数(JSON格式)',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志标题',
  `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作类型：1-后台 2-APP',
  `content` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
  `ip` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'IP地址',
  `user_agent` varchar(360) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'User-Agent',
  `create_user` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统行为日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_action_log_2025_07
-- ----------------------------
DROP TABLE IF EXISTS `lev_action_log_2025_07`;
CREATE TABLE `lev_action_log_2025_07`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作人用户名',
  `method` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求类型',
  `module` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模型',
  `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作方法',
  `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作页面',
  `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求参数(JSON格式)',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志标题',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作类型：1-后台 2-APP',
  `content` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
  `ip` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'IP地址',
  `user_agent` varchar(360) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'User-Agent',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统行为日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_account_logs
-- ----------------------------
DROP TABLE IF EXISTS `lev_account_logs`;
CREATE TABLE `lev_account_logs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `source_order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '关联订单号',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '交易类型：1-商城消费，2-充值缴费，3-商城退款，4-佣金提现，5-提现驳回，6-平台入款',
  `money` decimal(12, 4) NOT NULL DEFAULT 0.0000 COMMENT '金额',
  `before_money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '更改前金额',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `create_time` int(11) NOT NULL DEFAULT 0,
  `update_time` int(11) NOT NULL DEFAULT 0,
  `remark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-已完成，2-待处理，3-失败/取消',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否有效：1-是，0-否',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `create_time`(`create_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 89 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '账户明细表' ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;
