phpMyAdmin SQL Dump

-- phpMyAdmin SQL Dump
-- version 4.4.15.10

--
-- Host: localhost
-- Generation Time: 2022-06-06 19:04:56
-- 服务器版本: 5.5.57-log
-- PHP Version: 7.0.19

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `clean_b2c`
--

-- --------------------------------------------------------

--
-- 表的结构 `images_group`
--
-- 使用中(#1146 - Table 'clean_b2c.images_group' doesn't exist)
-- 读取数据时发生错误: (#1146 - Table 'clean_b2c.images_group' doesn't exist)

-- --------------------------------------------------------

--
-- 表的结构 `jshop_addons`
--

CREATE TABLE IF NOT EXISTS `jshop_addons` (
  `id` int(10) unsigned NOT NULL COMMENT '主键',
  `name` varchar(40) CHARACTER SET utf8 NOT NULL COMMENT '插件名或标识',
  `title` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '中文名',
  `description` text CHARACTER SET utf8 COMMENT '插件描述',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `config` text CHARACTER SET utf8 COMMENT '配置',
  `author` varchar(40) CHARACTER SET utf8 DEFAULT '' COMMENT '作者',
  `version` varchar(20) CHARACTER SET utf8 DEFAULT '' COMMENT '版本号',
  `ctime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '安装时间',
  `utime` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='插件表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_advertisement`
--

CREATE TABLE IF NOT EXISTS `jshop_advertisement` (
  `id` int(10) unsigned NOT NULL,
  `position_id` int(10) unsigned DEFAULT '0' COMMENT '广告位置id',
  `name` varchar(50) DEFAULT NULL COMMENT '广告名称',
  `img` char(32) DEFAULT NULL COMMENT '广告图片id',
  `val` varchar(255) DEFAULT NULL COMMENT '链接属性值',
  `sort` smallint(5) unsigned DEFAULT '0' COMMENT '从小到大 越小越靠前',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '添加时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '广告位置编码',
  `type` tinyint(3) unsigned DEFAULT NULL COMMENT '类型  1url  2商品  3文章'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='广告表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_advert_position`
--

CREATE TABLE IF NOT EXISTS `jshop_advert_position` (
  `id` int(11) unsigned NOT NULL,
  `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '幻灯片名称',
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '广告位置编码',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '添加时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `state` tinyint(1) unsigned DEFAULT '1' COMMENT '1 启用  2禁用',
  `sort` tinyint(3) unsigned DEFAULT '0' COMMENT '排序'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='广告位置表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_area`
--

CREATE TABLE IF NOT EXISTS `jshop_area` (
  `id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '地区ID',
  `parent_id` int(10) unsigned DEFAULT '0' COMMENT '父级ID',
  `depth` tinyint(1) unsigned DEFAULT '0' COMMENT '地区深度',
  `name` varchar(50) DEFAULT NULL COMMENT '地区名称',
  `postal_code` varchar(10) NOT NULL DEFAULT '' COMMENT '邮编',
  `sort` int(10) NOT NULL DEFAULT '100' COMMENT '地区排序'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='地区表';

--


-- --------------------------------------------------------

--
-- 表的结构 `jshop_article`
--

CREATE TABLE IF NOT EXISTS `jshop_article` (
  `id` int(11) unsigned NOT NULL,
  `title` varchar(200) DEFAULT NULL COMMENT '文章标题',
  `cover` char(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '文章封面图',
  `content` longtext COMMENT '文章内容',
  `type_id` int(11) unsigned DEFAULT NULL COMMENT '文章分类id',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '文章创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '修改时间',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '文章排序  从小到大',
  `is_pub` smallint(1) unsigned DEFAULT NULL COMMENT '1 发布  2 不发布',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '软删除位置  有时间代表删除',
  `pv` int(10) DEFAULT '0' COMMENT '访问量',
  `brief` char(100) DEFAULT NULL COMMENT '简介'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_article_type`
--

CREATE TABLE IF NOT EXISTS `jshop_article_type` (
  `id` int(11) unsigned NOT NULL,
  `pid` int(11) DEFAULT NULL COMMENT '父id',
  `type_name` varchar(32) DEFAULT NULL COMMENT '分类名称',
  `sort` smallint(5) DEFAULT '100' COMMENT '排序 '
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_backstage_notice`
--

CREATE TABLE IF NOT EXISTS `jshop_backstage_notice` (
  `id` int(11) unsigned NOT NULL,
  `title` varchar(200) DEFAULT NULL COMMENT '公告标题',
  `content` longtext COMMENT '公告内容',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '修改时间',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '文章排序  从小到大',
  `is_pub` smallint(1) unsigned DEFAULT NULL COMMENT '1 发布  2 不发布',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '软删除位置  有时间代表删除'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_balance`
--

CREATE TABLE IF NOT EXISTS `jshop_balance` (
  `id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned NOT NULL COMMENT '用户id',
  `type` smallint(2) unsigned NOT NULL COMMENT '类型',
  `money` decimal(10,2) NOT NULL COMMENT '金额',
  `balance` decimal(10,2) NOT NULL COMMENT '余额',
  `source_id` varchar(20) NOT NULL COMMENT '资源id',
  `memo` varchar(200) NOT NULL COMMENT '描述',
  `ctime` bigint(12) unsigned NOT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户余额表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bargain`
--

CREATE TABLE IF NOT EXISTS `jshop_bargain` (
  `id` int(10) NOT NULL,
  `name` varchar(200) CHARACTER SET utf8 DEFAULT '' COMMENT '活动名称',
  `intro` tinytext CHARACTER SET utf8 COMMENT '简介',
  `goods_id` int(10) DEFAULT NULL COMMENT '商品id',
  `stime` int(12) DEFAULT NULL COMMENT '开始时间',
  `etime` int(12) DEFAULT NULL COMMENT '结束时间',
  `max_goods_nums` int(10) DEFAULT '0' COMMENT '活动数量',
  `sales_num` int(10) unsigned DEFAULT '0' COMMENT '活动销量',
  `sort` smallint(10) unsigned DEFAULT '100' COMMENT '排序',
  `status` tinyint(3) unsigned DEFAULT '2' COMMENT '状态 1=开启(默认)  2=禁用',
  `start_price` decimal(20,2) DEFAULT '0.00' COMMENT '砍价起始金额',
  `end_price` decimal(20,2) DEFAULT '0.00' COMMENT '砍价成交金额',
  `bargain_max_price` decimal(20,2) DEFAULT NULL COMMENT '砍价每次最大金额',
  `bargain_min_price` decimal(20,2) unsigned DEFAULT '0.00' COMMENT '砍价每次最小金额',
  `total_times` int(10) DEFAULT NULL COMMENT '总砍价次数',
  `significant_interval` int(5) DEFAULT NULL COMMENT '砍价发起后有效时长,单位小时',
  `desc` text COMMENT '活动规则描述',
  `ctime` int(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` int(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='砍价活动表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bargain_log`
--

CREATE TABLE IF NOT EXISTS `jshop_bargain_log` (
  `id` int(10) unsigned NOT NULL,
  `record_id` int(10) unsigned DEFAULT '0' COMMENT '砍价人ID',
  `user_id` int(10) unsigned DEFAULT '0' COMMENT '砍价人ID,砍价人ID和发起人ID一样时,表示自己砍价',
  `bargain_id` int(10) unsigned DEFAULT NULL COMMENT '砍价活动ID',
  `bargain_price` decimal(20,2) unsigned DEFAULT '0.00' COMMENT '砍掉金额',
  `goods_price` decimal(20,2) unsigned DEFAULT '0.00' COMMENT '砍价后商品金额',
  `product_id` int(10) unsigned DEFAULT '0' COMMENT '砍价货品id',
  `ctime` int(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `ip` varchar(15) DEFAULT NULL COMMENT '砍价人ip地址'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='砍价记录表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bargain_record`
--

CREATE TABLE IF NOT EXISTS `jshop_bargain_record` (
  `id` int(10) NOT NULL,
  `bargain_id` int(10) unsigned DEFAULT '0' COMMENT '砍价活动id',
  `user_id` int(10) unsigned DEFAULT '0' COMMENT '砍价发起人id',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态,1进行中,2成功,3,已下单,4超过活动时间砍价失败',
  `name` varchar(200) DEFAULT NULL COMMENT '活动名称',
  `goods_id` int(11) DEFAULT NULL COMMENT '商品id',
  `product_id` int(11) DEFAULT NULL COMMENT '货品id',
  `goods_name` varchar(200) DEFAULT NULL COMMENT '商品名称',
  `image_url` varchar(300) DEFAULT NULL COMMENT '图片地址',
  `start_price` decimal(20,2) unsigned DEFAULT '0.00' COMMENT '开始价格',
  `end_price` decimal(10,2) DEFAULT NULL COMMENT '底价',
  `price` decimal(20,2) unsigned DEFAULT '0.00' COMMENT '当前价格',
  `stime` int(10) unsigned DEFAULT '0' COMMENT '开始时间',
  `etime` int(10) unsigned DEFAULT '0' COMMENT '结束时间',
  `order_id` varchar(30) CHARACTER SET utf8 DEFAULT NULL COMMENT '订单号',
  `ctime` int(12) unsigned DEFAULT '0' COMMENT '创建时间',
  `utime` int(12) unsigned DEFAULT '0' COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='砍价活动订单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_aftersales`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_aftersales` (
  `aftersales_id` varchar(20) NOT NULL COMMENT '售后单id',
  `order_id` varchar(20) DEFAULT NULL COMMENT '订单ID 关联order.id',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID 关联user.id',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '售后类型,1=只退款,2退款退货',
  `refund` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '退款金额',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态 1=未审核 2=审核通过 3=审核拒绝',
  `reason` varchar(255) NOT NULL COMMENT '退款原因',
  `mark` varchar(255) DEFAULT NULL COMMENT '卖家备注,如果审核失败了,会显示到前端',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='退货单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_aftersales_images`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_aftersales_images` (
  `aftersales_id` varchar(20) NOT NULL COMMENT '售后单id',
  `image_id` char(32) NOT NULL COMMENT '图片ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品图片关联表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_aftersales_items`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_aftersales_items` (
  `id` int(10) unsigned NOT NULL,
  `aftersales_id` varchar(20) NOT NULL COMMENT '售后单id',
  `order_items_id` int(10) unsigned DEFAULT NULL COMMENT '订单明细ID 关联order_items.id',
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品ID 关联goods.id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT '货品ID 关联products.id',
  `sn` varchar(30) DEFAULT NULL COMMENT '货品编码',
  `bn` varchar(30) DEFAULT NULL COMMENT '商品编码',
  `name` varchar(200) DEFAULT NULL COMMENT '商品名称',
  `image_url` varchar(100) NOT NULL COMMENT '图片',
  `nums` smallint(5) unsigned DEFAULT '1' COMMENT '数量',
  `addon` text COMMENT '货品明细序列号存储',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='售后单明细表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_delivery`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_delivery` (
  `delivery_id` varchar(20) NOT NULL,
  `logi_code` varchar(50) DEFAULT NULL COMMENT '物流公司编码',
  `logi_no` varchar(50) DEFAULT NULL COMMENT '物流单号',
  `logi_information` longtext COMMENT '快递物流信息',
  `logi_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0快递信息可能更新  1快递信息不更新了',
  `ship_area_id` int(10) unsigned DEFAULT NULL COMMENT '收货地区ID',
  `ship_address` varchar(200) DEFAULT NULL COMMENT '收货详细地址',
  `ship_name` varchar(50) DEFAULT NULL COMMENT '收货人姓名',
  `ship_mobile` char(15) DEFAULT NULL COMMENT '收货电话',
  `confirm_time` bigint(12) unsigned DEFAULT NULL COMMENT '确认s收货时间',
  `status` tinyint(1) unsigned DEFAULT '2' COMMENT '状态 1=准备发货 2=已发货 3=已确认 4=其他',
  `memo` varchar(255) DEFAULT NULL COMMENT '备注',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='发货单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_delivery_items`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_delivery_items` (
  `id` int(10) unsigned NOT NULL,
  `delivery_id` varchar(20) NOT NULL COMMENT '发货单号 关联bill_delivery.id',
  `goods_id` int(11) unsigned NOT NULL,
  `product_id` int(11) unsigned NOT NULL,
  `sn` varchar(30) NOT NULL,
  `bn` varchar(30) NOT NULL,
  `name` varchar(200) NOT NULL,
  `nums` smallint(5) unsigned DEFAULT NULL COMMENT '发货数量',
  `weight` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
  `addon` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='发货单详情表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_delivery_order_rel`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_delivery_order_rel` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID',
  `order_id` varchar(20) DEFAULT NULL COMMENT '订单号',
  `delivery_id` varchar(20) DEFAULT NULL COMMENT '发货单号'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发货单订单关联表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_lading`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_lading` (
  `id` varchar(20) NOT NULL COMMENT '提货单号',
  `order_id` varchar(20) DEFAULT NULL COMMENT '订单号',
  `store_id` int(10) unsigned DEFAULT NULL COMMENT '提货门店ID',
  `name` varchar(30) DEFAULT NULL COMMENT '提货人姓名',
  `mobile` varchar(15) DEFAULT NULL COMMENT '提货手机号',
  `clerk_id` int(10) unsigned DEFAULT NULL COMMENT '处理店员ID',
  `ptime` bigint(12) unsigned DEFAULT NULL COMMENT '提货时间',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '提货状态1=未提货 2=已提货',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='提货单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_payments`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_payments` (
  `payment_id` varchar(20) NOT NULL COMMENT '支付单号',
  `money` decimal(10,2) DEFAULT '0.00' COMMENT '支付金额',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID 关联user.id',
  `type` smallint(1) unsigned NOT NULL DEFAULT '1' COMMENT '资源类型1=订单,2充值单',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '支付状态 1=未支付 2=支付成功 3=其他',
  `payment_code` varchar(50) DEFAULT NULL COMMENT '支付类型编码 关联payments.code',
  `ip` varchar(50) DEFAULT NULL COMMENT '支付单生成IP',
  `params` varchar(200) NOT NULL COMMENT '支付的时候需要的参数,存的是json格式的一维数组',
  `payed_msg` varchar(255) DEFAULT NULL COMMENT '支付回调后的状态描述',
  `trade_no` varchar(50) DEFAULT NULL COMMENT '第三方平台交易流水号',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='支付单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_payments_rel`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_payments_rel` (
  `payment_id` varchar(20) NOT NULL COMMENT '支付单编号',
  `source_id` varchar(20) NOT NULL COMMENT '资源编号',
  `money` decimal(8,2) unsigned NOT NULL COMMENT '金额'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='支付单明细表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_refund`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_refund` (
  `refund_id` varchar(20) NOT NULL,
  `aftersales_id` varchar(20) NOT NULL COMMENT '售后单id',
  `money` decimal(10,2) unsigned DEFAULT NULL COMMENT '退款金额',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID 关联user.id',
  `source_id` varchar(20) NOT NULL COMMENT '资源id,根据type不同而关联不同的表',
  `type` smallint(1) unsigned NOT NULL DEFAULT '1' COMMENT '资源类型1=订单,2充值单',
  `payment_code` varchar(50) DEFAULT NULL COMMENT '退款支付类型编码 默认原路返回 关联支付单表支付编码',
  `trade_no` varchar(50) DEFAULT NULL COMMENT '第三方平台交易流水号',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态 1=未退款 2=已退款 3=退款失败,可以再次退款,4退款拒绝',
  `memo` varchar(100) NOT NULL DEFAULT '' COMMENT '退款失败原因',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='退款单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_reship`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_reship` (
  `reship_id` varchar(20) NOT NULL,
  `order_id` varchar(20) NOT NULL COMMENT '订单ID 关联order.id',
  `aftersales_id` varchar(20) NOT NULL COMMENT '售后单id',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID 关联user.id',
  `logi_code` varchar(50) DEFAULT NULL COMMENT '物流公司编码',
  `logi_no` varchar(50) DEFAULT NULL COMMENT '物流单号',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态 1=审核通过待发货 2=已发退货 3=已收退货',
  `memo` varchar(255) DEFAULT NULL COMMENT '备注',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='退货单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_bill_reship_items`
--

CREATE TABLE IF NOT EXISTS `jshop_bill_reship_items` (
  `id` int(10) unsigned NOT NULL,
  `reship_id` varchar(20) NOT NULL COMMENT '退款单单id',
  `order_items_id` int(10) unsigned DEFAULT NULL COMMENT '订单明细ID 关联order_items.id',
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品ID 关联goods.id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT '货品ID 关联products.id',
  `sn` varchar(30) DEFAULT NULL COMMENT '货品编码',
  `bn` varchar(30) DEFAULT NULL COMMENT '商品编码',
  `name` varchar(200) DEFAULT NULL COMMENT '商品名称',
  `image_url` varchar(100) NOT NULL COMMENT '图片',
  `nums` smallint(5) unsigned DEFAULT '1' COMMENT '数量',
  `addon` text COMMENT '货品明细序列号存储',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='退货单明细表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_brand`
--

CREATE TABLE IF NOT EXISTS `jshop_brand` (
  `id` int(10) unsigned NOT NULL COMMENT '品牌ID',
  `name` varchar(50) DEFAULT NULL COMMENT '品牌名称',
  `logo` char(32) DEFAULT NULL COMMENT '品牌LOGO 图片ID',
  `sort` smallint(5) unsigned DEFAULT '0' COMMENT '品牌排序 越小越靠前',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志 有数据代表删除'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='品牌表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_cart`
--

CREATE TABLE IF NOT EXISTS `jshop_cart` (
  `id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID 关联user.id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT '货品ID',
  `nums` smallint(5) unsigned DEFAULT '0' COMMENT '货品数量',
  `type` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '购物车类型,1普通类型,2拼团类型'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='购物车表(每个用户最多加100条信息)';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_clerk`
--

CREATE TABLE IF NOT EXISTS `jshop_clerk` (
  `id` int(10) unsigned NOT NULL,
  `store_id` int(10) unsigned DEFAULT NULL COMMENT '店铺ID',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '关联时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='店铺店员关联表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_coupon`
--

CREATE TABLE IF NOT EXISTS `jshop_coupon` (
  `coupon_code` varchar(20) NOT NULL COMMENT '优惠券编码',
  `promotion_id` int(10) unsigned NOT NULL COMMENT '优惠券id',
  `is_used` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否使用1未使用,2已使用',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '谁领取了',
  `used_id` int(10) unsigned DEFAULT NULL COMMENT '被谁用了',
  `endtime` bigint(12) unsigned NOT NULL DEFAULT '0' COMMENT '到期时间',
  `ctime` bigint(12) unsigned NOT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned NOT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='优惠券表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_files`
--

CREATE TABLE IF NOT EXISTS `jshop_files` (
  `id` char(32) NOT NULL COMMENT '视频ID',
  `name` varchar(50) DEFAULT NULL COMMENT '视频名称',
  `url` varchar(255) DEFAULT NULL COMMENT '绝对地址',
  `path` varchar(255) DEFAULT NULL COMMENT '物理地址',
  `type` enum('web','local') DEFAULT 'local' COMMENT '存储引擎',
  `file_type` enum('video') DEFAULT 'video' COMMENT '文件类型',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志 有数据代表删除'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_form`
--

CREATE TABLE IF NOT EXISTS `jshop_form` (
  `id` bigint(12) NOT NULL,
  `name` varchar(100) DEFAULT NULL COMMENT '表单名称',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '1订单、2留言、3反馈、4登记、5调研',
  `sort` int(5) unsigned DEFAULT '100' COMMENT '表单排序',
  `desc` varchar(255) DEFAULT NULL COMMENT '表单描述',
  `head_type` tinyint(1) unsigned DEFAULT '1' COMMENT '1图片2轮播3视频',
  `head_type_value` varchar(200) DEFAULT NULL COMMENT '表单头值',
  `head_type_video` varchar(32) DEFAULT NULL,
  `button_name` varchar(50) DEFAULT NULL COMMENT '表单提交按钮名称',
  `button_color` varchar(30) DEFAULT NULL COMMENT '表单按钮颜色',
  `is_login` tinyint(1) unsigned DEFAULT '2' COMMENT '是否需要登录1需要2不需要',
  `times` int(5) unsigned DEFAULT '0' COMMENT '可提交次数',
  `qrcode` varchar(200) DEFAULT NULL COMMENT '二维码图片地址',
  `return_msg` varchar(200) DEFAULT '' COMMENT '提交后提示语',
  `end_date` bigint(12) unsigned DEFAULT NULL COMMENT '到期时间',
  `ctime` bigint(12) unsigned DEFAULT '0' COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT '0' COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_form_item`
--

CREATE TABLE IF NOT EXISTS `jshop_form_item` (
  `id` bigint(12) unsigned NOT NULL,
  `name` varchar(50) DEFAULT NULL COMMENT '字段名称',
  `type` varchar(30) DEFAULT NULL COMMENT '字段类型',
  `validation_type` varchar(30) DEFAULT NULL COMMENT '验证类型',
  `value` varchar(255) DEFAULT NULL COMMENT '表单值',
  `default_value` varchar(255) DEFAULT NULL COMMENT '默认值',
  `form_id` bigint(12) unsigned DEFAULT '0' COMMENT '表单id',
  `required` tinyint(1) unsigned DEFAULT '2' COMMENT '是否必填,1必填,2不必填',
  `sort` int(5) unsigned DEFAULT '100' COMMENT '排序'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表单项表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_form_submit`
--

CREATE TABLE IF NOT EXISTS `jshop_form_submit` (
  `id` bigint(12) unsigned NOT NULL,
  `form_id` bigint(12) NOT NULL DEFAULT '0' COMMENT '表单id',
  `form_name` varchar(255) DEFAULT '' COMMENT '表单名称',
  `user_id` bigint(20) unsigned DEFAULT '0' COMMENT '会员id',
  `money` decimal(20,2) unsigned DEFAULT '0.00' COMMENT '总金额',
  `pay_status` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '2未支付,1已支付。支付状态',
  `status` tinyint(1) DEFAULT '2' COMMENT '表单状态,1已处理,2未处理',
  `feedback` varchar(255) DEFAULT NULL COMMENT '表单反馈',
  `ip` varchar(20) DEFAULT '' COMMENT '提交人ip',
  `ctime` bigint(12) unsigned DEFAULT '0' COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT '0' COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户对表的提交记录';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_form_submit_detail`
--

CREATE TABLE IF NOT EXISTS `jshop_form_submit_detail` (
  `id` bigint(12) unsigned NOT NULL,
  `submit_id` bigint(12) DEFAULT '0' COMMENT '提交表单id',
  `form_id` bigint(12) unsigned DEFAULT '0' COMMENT '表单id',
  `form_item_id` bigint(12) DEFAULT NULL COMMENT '表单项id',
  `form_item_name` varchar(200) DEFAULT '' COMMENT '表单项名称',
  `form_item_value` text COMMENT '表单项值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='提交表单保存大文本值表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods`
--

CREATE TABLE IF NOT EXISTS `jshop_goods` (
  `id` int(10) unsigned NOT NULL COMMENT '商品ID',
  `bn` varchar(30) DEFAULT NULL COMMENT '商品编码',
  `name` varchar(200) DEFAULT NULL COMMENT '商品名称',
  `brief` varchar(255) DEFAULT NULL COMMENT '商品简介',
  `price` decimal(10,2) DEFAULT NULL COMMENT '商品价格',
  `costprice` decimal(10,2) DEFAULT NULL COMMENT '成本价',
  `mktprice` decimal(10,2) DEFAULT NULL COMMENT '市场价',
  `image_id` char(32) DEFAULT NULL COMMENT '默认图片 图片id',
  `goods_cat_id` int(10) unsigned DEFAULT NULL COMMENT '商品分类ID 关联category.id',
  `goods_type_id` int(10) unsigned DEFAULT NULL COMMENT '商品类别ID 关联goods_type.id',
  `brand_id` int(10) unsigned DEFAULT NULL COMMENT '品牌ID 关联brand.id',
  `is_nomal_virtual` tinyint(1) unsigned DEFAULT '1' COMMENT '虚拟正常商品 1=正常 2=虚拟',
  `marketable` tinyint(1) unsigned DEFAULT '1' COMMENT '上架标志 1=上架 2=下架',
  `stock` int(8) unsigned DEFAULT '0' COMMENT '库存',
  `freeze_stock` int(8) unsigned DEFAULT '0' COMMENT '冻结库存',
  `weight` decimal(10,2) unsigned DEFAULT NULL COMMENT '重量',
  `unit` varchar(20) DEFAULT NULL COMMENT '商品单位',
  `intro` longtext COMMENT '商品详情',
  `spes_desc` text COMMENT '商品规格序列号存储',
  `params` text COMMENT '参数序列化',
  `comments_count` int(10) unsigned DEFAULT '0' COMMENT '评论次数',
  `view_count` int(10) unsigned DEFAULT '0' COMMENT '浏览次数',
  `buy_count` int(10) unsigned DEFAULT '0' COMMENT '购买次数',
  `uptime` bigint(12) unsigned DEFAULT NULL COMMENT '上架时间',
  `downtime` bigint(12) unsigned DEFAULT NULL COMMENT '下架时间',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '商品排序 越小越靠前',
  `is_recommend` tinyint(1) unsigned DEFAULT '2' COMMENT '是否推荐,1是,2不是推荐',
  `is_hot` tinyint(1) unsigned DEFAULT '2' COMMENT '是否热门,1是,2否',
  `label_ids` varchar(10) DEFAULT NULL COMMENT '标签id逗号分隔',
  `new_spec` text COMMENT '自定义规格名称',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志 有数据表示删除',
  `is_combo` tinyint(1) unsigned DEFAULT '2' COMMENT '是否是套餐商品 1=是 2=不是'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_browsing`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_browsing` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID',
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品id 关联goods.id',
  `user_id` int(10) unsigned NOT NULL COMMENT '用户id',
  `goods_name` varchar(200) NOT NULL COMMENT '商品名称',
  `ctime` bigint(12) NOT NULL COMMENT '浏览时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品浏览记录表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_cat`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_cat` (
  `id` int(10) unsigned NOT NULL,
  `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上级分类id',
  `name` varchar(20) DEFAULT NULL COMMENT '分类名称',
  `type_id` int(10) unsigned DEFAULT '0' COMMENT '类型ID 关联 goods_type.id',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '分类排序 越小越靠前',
  `image_id` char(32) DEFAULT NULL COMMENT '分类图片ID',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '1=显示 2=不显示',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品分类';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_collection`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_collection` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID',
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品id 关联goods.id',
  `user_id` int(10) unsigned NOT NULL COMMENT '用户id',
  `goods_name` varchar(200) NOT NULL COMMENT '商品名称',
  `ctime` bigint(12) NOT NULL COMMENT '浏览时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品收藏表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_comment`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_comment` (
  `id` int(10) unsigned NOT NULL,
  `comment_id` int(10) unsigned DEFAULT '0' COMMENT '父级评价ID',
  `score` tinyint(1) DEFAULT '5' COMMENT '评价1-5星',
  `user_id` int(10) unsigned NOT NULL COMMENT '评价用户ID',
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品ID 关联goods.id',
  `product_id` int(10) NOT NULL DEFAULT '0' COMMENT '货品ID 关联products.id',
  `order_id` bigint(20) unsigned NOT NULL COMMENT '评价订单ID',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
  `addon` text COMMENT '货品规格序列号存储',
  `images` varchar(200) DEFAULT NULL COMMENT '评价图片逗号分隔最多五张',
  `content` text COMMENT '评价内容',
  `seller_content` text COMMENT '商家回复',
  `display` tinyint(3) unsigned DEFAULT '1' COMMENT '是否显示 1显示 2不显示',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品评价表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_extend_cat`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_extend_cat` (
  `id` int(10) unsigned NOT NULL,
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品id',
  `goods_cat_id` int(10) unsigned DEFAULT NULL COMMENT '商品分类id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品分类扩展表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_grade`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_grade` (
  `id` bigint(10) unsigned NOT NULL,
  `goods_id` bigint(10) unsigned DEFAULT '0' COMMENT '商品id',
  `grade_id` tinyint(2) unsigned DEFAULT '1' COMMENT '会员等级id',
  `grade_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '会员价'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品会员价表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_images`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_images` (
  `goods_id` int(10) unsigned NOT NULL COMMENT '商品ID',
  `image_id` char(32) NOT NULL COMMENT '图片ID',
  `sort` int(10) DEFAULT '100' COMMENT '图片排序'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品图片关联表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_params`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_params` (
  `id` int(10) NOT NULL,
  `name` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '参数名称',
  `value` text CHARACTER SET utf8 COMMENT '参数值',
  `type` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT '参数类型,text文本框,radio单选,checkbox复选框',
  `ctime` bigint(12) DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品参数表';

--
-- 转存表中的数据 `jshop_goods_params`
--

INSERT INTO `jshop_goods_params` (`id`, `name`, `value`, `type`, `ctime`, `utime`) VALUES
(1, '产地', '', 'text', 1582454016, 1582454016),
(2, '材质', '', 'text', 1582454017, 1582454017),
(3, '型号', '', 'text', 1582454017, 1582454017);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_type`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_type` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(20) DEFAULT NULL COMMENT '类型名称',
  `params` text COMMENT '参数序列号存储 array(参数组名=>array(''参数1'',''参数二''))'
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品类型';

--
-- 转存表中的数据 `jshop_goods_type`
--

INSERT INTO `jshop_goods_type` (`id`, `name`, `params`) VALUES
(3, '通用类型', NULL);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_type_params`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_type_params` (
  `params_id` int(10) unsigned DEFAULT '0' COMMENT '商品参数id',
  `type_id` int(10) unsigned DEFAULT '0' COMMENT '商品类型id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- 转存表中的数据 `jshop_goods_type_params`
--

INSERT INTO `jshop_goods_type_params` (`params_id`, `type_id`) VALUES
(1, 3),
(2, 3),
(3, 3);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_type_spec`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_type_spec` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(30) DEFAULT NULL COMMENT '商品类型属性名称',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '商品类型属性排序 越小越靠前'
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品类型属性表';

--
-- 转存表中的数据 `jshop_goods_type_spec`
--

INSERT INTO `jshop_goods_type_spec` (`id`, `name`, `sort`) VALUES
(3, '规格', 100);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_type_spec_rel`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_type_spec_rel` (
  `spec_id` int(10) unsigned NOT NULL COMMENT '属性ID',
  `type_id` int(10) unsigned DEFAULT NULL COMMENT '类型ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品类型和属性关联表';

--
-- 转存表中的数据 `jshop_goods_type_spec_rel`
--

INSERT INTO `jshop_goods_type_spec_rel` (`spec_id`, `type_id`) VALUES
(3, 3);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_goods_type_spec_value`
--

CREATE TABLE IF NOT EXISTS `jshop_goods_type_spec_value` (
  `id` int(10) unsigned NOT NULL,
  `spec_id` int(10) unsigned DEFAULT NULL COMMENT '属性ID 关联goods_type_spec.id',
  `value` varchar(50) DEFAULT NULL COMMENT '属性值',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '排序 越小越靠前'
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品类型属性值表';

--
-- 转存表中的数据 `jshop_goods_type_spec_value`
--



-- --------------------------------------------------------

--
-- 表的结构 `jshop_group_goods`
--

CREATE TABLE IF NOT EXISTS `jshop_group_goods` (
  `rule_id` int(11) unsigned NOT NULL,
  `goods_id` int(11) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='团购秒杀商品表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_hooks`
--

CREATE TABLE IF NOT EXISTS `jshop_hooks` (
  `id` int(10) NOT NULL,
  `name` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '钩子名称',
  `description` text COMMENT '钩子描述',
  `type` tinyint(1) DEFAULT '1' COMMENT '钩子类型,1是控制器,2是视图',
  `addons` text COMMENT '钩子挂载的插件,逗号分隔',
  `ctime` int(10) DEFAULT NULL COMMENT '创建时间',
  `utime` int(11) DEFAULT '0' COMMENT '更新时间'
) ENGINE=InnoDB AUTO_INCREMENT=10017 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- 转存表中的数据 `jshop_hooks`
--

INSERT INTO `jshop_hooks` (`id`, `name`, `description`, `type`, `addons`, `ctime`, `utime`) VALUES
(1, 'testhook', '测试钩子', 1, '', 1538029316, 1540173219),
(2, 'sendwxmessage', '发送微信消息', 1, '', 1538029328, 1538029328),
(3, 'kefu', '在线客服', 1, '', 1538029339, 1538029339),
(4, 'sendsms', '发送短信', 1, '', 1540891064, 1540891064),
(5, 'goodscommon', '商品编辑、添加时', 1, '', 1541072382, 1541072415),
(6, 'deletegoodsafter', '删除商品后', 1, '', 1541072393, 1541072393),
(7, 'editgoodsafter', '编辑商品后', 1, '', 1541072405, 1541072405),
(8, 'addgoodsafter', '添加商品后', 1, '', 1541072425, 1541072425),
(9, 'addgoodsview', '添加商品页面', 2, '', 1541072442, 1541072451),
(10, 'editgoodsview', '编辑商品页面', 2, '', 1541072464, 1541072464),
(11, 'trustlogin', '信任登录', 1, '', 1541771962, 1541771962),
(12, 'trustcallback', '信任登录返回', 1, '', 1541771974, 1541771974),
(14, 'orderpayed', '订单支付', 1, '', 1542349293, 1542349507),
(10000, 'printOrder', '打印订单埋点', 1, '', 1552448691, 1552448691),
(10001, 'getPrintExpressInfo', '获取打印信息', 1, '', 1552557472, 1552557472),
(10002, 'orderExtJs', '订单扩展js', 2, '', 1552558689, 1552559645),
(10003, 'orderExtBtn', '订单扩展按钮', 2, '', 1552558705, 1552559662),
(10004, 'logisticsQuery', '快递查询', 1, '', 1552704811, 1552704811),
(10005, 'menu', '后台菜单', 1, '', 1554199143, 1554199143),
(10006, 'appupdate', 'APP相关钩子', 1, NULL, 1564537798, 1564537798),
(10007, 'aftersalesreview', '售后审核通过后', 1, NULL, 1564537798, 1564537798),
(10008, 'addUserAfter', '创建会员后', 1, NULL, 1564537798, 1564537798),
(10010, 'orderFinish', '订单完成后', 1, NULL, 1564537798, 1564537798),
(10012, 'loginAfter', '登录后事件', 1, NULL, 1564537798, 1564537798),
(10013, 'apiAddonsConf', '接口访问插件的配置参数,如果插件需要在前台使用配置参数,就用此方法', 1, '', 1586337762, 1586337762),
(10014, 'deshare', '用户扫码后的事件', 1, NULL, 1586337762, 1586337762),
(10015, 'form_submit_after', '智能表单提交后', 1, NULL, 1640241514, 1640241514),
(10016, 'form_submit_after', '智能表单提交后', 1, NULL, 1640241514, 1640241514);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_ietask`
--

CREATE TABLE IF NOT EXISTS `jshop_ietask` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '任务名称',
  `message` longtext COMMENT '任务消息',
  `file_type` varchar(20) CHARACTER SET utf8 DEFAULT 'csv' COMMENT '文件类型',
  `ctime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` int(10) DEFAULT NULL COMMENT '更新时间',
  `type` tinyint(1) DEFAULT NULL COMMENT '任务类型,1为导出,2为导入',
  `status` tinyint(1) unsigned DEFAULT '0' COMMENT '任务状态,0为等待执行,1正在导出,2导出成功,3导出失败,4正在导入,5导入成功,6导入失败,7中断,8部分导入',
  `params` text CHARACTER SET utf8 COMMENT '相关参数',
  `file_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '文件名称',
  `file_size` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '文件大小',
  `file_path` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '文件路径'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='导入导出任务表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_images`
--

CREATE TABLE IF NOT EXISTS `jshop_images` (
  `id` char(32) NOT NULL COMMENT '图片ID',
  `group_id` int(10) unsigned DEFAULT '0' COMMENT '分组id,0为默认分组',
  `name` varchar(500) DEFAULT NULL COMMENT '图片名称',
  `url` varchar(255) DEFAULT NULL COMMENT '绝对地址',
  `path` varchar(255) DEFAULT NULL COMMENT '物理地址',
  `type` enum('web','Local','Aliyun','COS') DEFAULT 'Local' COMMENT '存储引擎',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志 有数据代表删除'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='图片表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_images_group`
--

CREATE TABLE IF NOT EXISTS `jshop_images_group` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '分组名称',
  `show` tinyint(1) unsigned DEFAULT '1' COMMENT '是否显示,1显示,2不显示'
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='图片分组表';

--
-- 转存表中的数据 `jshop_images_group`
--

INSERT INTO `jshop_images_group` (`id`, `name`, `show`) VALUES
(1, '头像', 2),
(2, '海报', 2),
(3, '二维码', 2);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_invoice`
--

CREATE TABLE IF NOT EXISTS `jshop_invoice` (
  `id` int(10) unsigned NOT NULL,
  `class` tinyint(1) unsigned DEFAULT '1' COMMENT '开票类型 1=订单',
  `source_id` varchar(32) DEFAULT NULL COMMENT '资源ID',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '所属用户ID',
  `type` tinyint(1) unsigned DEFAULT '2' COMMENT '发票类型 2=个人 3=企业',
  `title` varchar(255) DEFAULT NULL COMMENT '发票抬头',
  `tax_number` varchar(32) DEFAULT NULL COMMENT '发票税号',
  `amount` decimal(10,2) unsigned DEFAULT NULL COMMENT '发票金额',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '开票状态 1=未开票 2=已开票',
  `remarks` varchar(2000) DEFAULT NULL COMMENT '开票备注',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发票表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_invoice_record`
--

CREATE TABLE IF NOT EXISTS `jshop_invoice_record` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(80) DEFAULT NULL COMMENT '发票抬头',
  `code` varchar(30) DEFAULT NULL COMMENT '发票税号',
  `frequency` mediumint(6) unsigned DEFAULT '1' COMMENT '被使用次数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发票信息记录';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_jobs`
--

CREATE TABLE IF NOT EXISTS `jshop_jobs` (
  `id` int(11) NOT NULL,
  `queue` varchar(255) CHARACTER SET utf8 NOT NULL,
  `payload` longtext CHARACTER SET utf8 NOT NULL,
  `attempts` tinyint(3) unsigned NOT NULL,
  `reserved` tinyint(3) unsigned NOT NULL,
  `reserved_at` int(10) unsigned DEFAULT NULL,
  `available_at` int(10) unsigned NOT NULL,
  `created_at` int(10) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='队列表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_label`
--

CREATE TABLE IF NOT EXISTS `jshop_label` (
  `id` int(10) NOT NULL,
  `name` varchar(20) CHARACTER SET utf8 DEFAULT NULL COMMENT '标签名称',
  `style` varchar(20) CHARACTER SET utf8 DEFAULT 'hot' COMMENT '标签样式'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='标签表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_login_log`
--

CREATE TABLE IF NOT EXISTS `jshop_login_log` (
  `id` int(11) unsigned NOT NULL COMMENT 'id',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户id',
  `state` tinyint(1) DEFAULT NULL COMMENT '登录 1  退出2,3注册',
  `log_time` bigint(12) unsigned DEFAULT NULL COMMENT '时间',
  `city` varchar(100) DEFAULT NULL COMMENT '地点城市',
  `ip` varchar(15) DEFAULT NULL COMMENT 'ip地址'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_logistics`
--

CREATE TABLE IF NOT EXISTS `jshop_logistics` (
  `id` int(10) unsigned NOT NULL,
  `logi_name` varchar(30) DEFAULT NULL COMMENT '物流公司名称',
  `logi_code` varchar(50) DEFAULT NULL COMMENT '物流公司编码',
  `sort` tinyint(3) unsigned DEFAULT '100' COMMENT '排序 越小越靠前'
) ENGINE=InnoDB AUTO_INCREMENT=1100 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='物流公司表';



-- --------------------------------------------------------

--
-- 表的结构 `jshop_manage`
--

CREATE TABLE IF NOT EXISTS `jshop_manage` (
  `id` int(10) unsigned NOT NULL COMMENT '用户ID',
  `username` varchar(20) DEFAULT NULL COMMENT '用户名',
  `password` char(32) DEFAULT NULL COMMENT '密码 md5(md5()+创建时间)',
  `mobile` char(15) DEFAULT NULL COMMENT '手机号',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `nickname` varchar(50) DEFAULT NULL COMMENT '昵称',
  `ctime` bigint(12) unsigned DEFAULT NULL,
  `utime` bigint(12) unsigned DEFAULT NULL,
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '1 = 正常 2 = 停用'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='管理员表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_manage_role`
--

CREATE TABLE IF NOT EXISTS `jshop_manage_role` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(50) DEFAULT NULL COMMENT '角色名称',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='总后台角色表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_manage_role_addons_rel`
--

CREATE TABLE IF NOT EXISTS `jshop_manage_role_addons_rel` (
  `manage_role_id` int(10) NOT NULL,
  `menu_id` varchar(100) NOT NULL COMMENT '插件里的菜单的id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='店铺角色操作权限关联表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_manage_role_operation_rel`
--

CREATE TABLE IF NOT EXISTS `jshop_manage_role_operation_rel` (
  `manage_role_id` int(10) NOT NULL,
  `operation_id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='店铺角色操作权限关联表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_manage_role_rel`
--

CREATE TABLE IF NOT EXISTS `jshop_manage_role_rel` (
  `manage_id` int(10) unsigned NOT NULL COMMENT '管理员ID 关联manage.id',
  `role_id` int(10) unsigned DEFAULT NULL COMMENT '角色ID 关联role.id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='管理员和角色关系表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_message`
--

CREATE TABLE IF NOT EXISTS `jshop_message` (
  `id` int(10) unsigned NOT NULL,
  `user_id` int(10) NOT NULL COMMENT '用户id',
  `code` varchar(60) NOT NULL COMMENT '消息编码',
  `params` varchar(5000) NOT NULL COMMENT '参数',
  `content` text NOT NULL COMMENT '内容',
  `ctime` bigint(12) unsigned NOT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned NOT NULL COMMENT '查看时间',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1未查看,2已查看'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='站内信';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_message_center`
--

CREATE TABLE IF NOT EXISTS `jshop_message_center` (
  `id` int(11) unsigned NOT NULL,
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '编码',
  `sms` tinyint(1) unsigned NOT NULL COMMENT '1 启用  2禁用',
  `message` tinyint(1) unsigned NOT NULL COMMENT '站内消息',
  `wx_tpl_message` tinyint(1) unsigned NOT NULL COMMENT '微信模板消息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='消息中心表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_notice`
--

CREATE TABLE IF NOT EXISTS `jshop_notice` (
  `id` int(11) unsigned NOT NULL,
  `title` varchar(200) DEFAULT NULL COMMENT '公告标题',
  `content` longtext COMMENT '公告内容',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '公告类型',
  `ctime` bigint(12) DEFAULT NULL COMMENT '创建时间 毫秒',
  `sort` tinyint(3) unsigned DEFAULT '100' COMMENT '排序 从小到大',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '软删除位  有时间代表已删除'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='公告表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_operation`
--

CREATE TABLE IF NOT EXISTS `jshop_operation` (
  `id` int(10) unsigned NOT NULL,
  `parent_id` int(10) unsigned NOT NULL COMMENT '父ID',
  `name` varchar(50) DEFAULT NULL COMMENT '操作名称',
  `code` varchar(50) DEFAULT NULL COMMENT '操作编码',
  `type` enum('m','c','a') NOT NULL DEFAULT 'a' COMMENT '类型',
  `parent_menu_id` int(10) unsigned NOT NULL COMMENT '菜单id',
  `perm_type` int(1) unsigned NOT NULL DEFAULT '3' COMMENT '权限许可类型,如果为1就是主体权限,, 如果为2就是半主体权限,在左侧菜单不显示,但是在权限菜单上有体现,如果为3就是关联权限',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '操作排序 越小越靠前'
) ENGINE=InnoDB AUTO_INCREMENT=611 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='权限表';

--
-- 转存表中的数据 `jshop_operation`
--

INSERT INTO `jshop_operation` (`id`, `parent_id`, `name`, `code`, `type`, `parent_menu_id`, `perm_type`, `sort`) VALUES
(2, 1, '管理后台', 'manage', 'm', 1, 1, 200),
(238, 2, '会员', 'User', 'c', 2, 1, 20),
(239, 238, '会员列表', 'index', 'a', 238, 1, 10),
(240, 238, '商品评价', 'comment', 'a', 305, 1, 101),
(242, 238, '积分记录查询', 'pointlog', 'a', 239, 2, 100),
(243, 238, '积分编辑', 'editpoint', 'a', 239, 2, 100),
(244, 2, '设置', 'Setting', 'c', 2, 1, 200),
(245, 244, '平台设置', 'index', 'a', 244, 1, 10),
(246, 2, '支付方式', 'Payments', 'c', 2, 3, 100),
(247, 246, '支付配置', 'index', 'a', 244, 1, 20),
(249, 246, '支付方式修改', 'edit', 'a', 247, 2, 100),
(251, 246, '支付方式启/禁用', 'changestatus', 'a', 249, 2, 100),
(252, 2, '文章分类', 'ArticleType', 'c', 2, 3, 100),
(253, 252, '文章栏目', 'index', 'a', 258, 1, 20),
(254, 252, '文章分类添加', 'add', 'a', 253, 2, 100),
(255, 252, '文章分类修改', 'edit', 'a', 253, 2, 100),
(256, 252, '文章分类删除', 'del', 'a', 253, 2, 100),
(257, 252, '文章添加子分类', 'addson', 'a', 253, 3, 100),
(258, 2, '文章管理', 'Article', 'c', 266, 1, 10),
(259, 258, '文章列表', 'index', 'a', 258, 1, 10),
(260, 258, '文章添加', 'add', 'a', 259, 2, 100),
(261, 258, '文章修改', 'edit', 'a', 259, 2, 100),
(262, 258, '文章删除', 'del', 'a', 259, 2, 100),
(263, 2, '优惠券管理', 'Coupon', 'c', 2, 3, 140),
(264, 263, '优惠券领取列表', 'index', 'a', 361, 2, 100),
(265, 263, '优惠券删除', 'del', 'a', 361, 2, 100),
(266, 2, '站点', 'Notice', 'c', 2, 1, 130),
(267, 266, '公告列表', 'index', 'a', 266, 1, 20),
(268, 266, '公告添加', 'add', 'a', 267, 2, 100),
(269, 266, '公告修改', 'edit', 'a', 267, 2, 100),
(270, 266, '公告删除', 'del', 'a', 267, 2, 100),
(271, 2, '广告位管理', 'CarouselSeat', 'c', 2, 3, 100),
(272, 271, '广告位列表', 'index', 'a', 277, 1, 100),
(273, 271, '广告位添加', 'add', 'a', 272, 2, 100),
(274, 271, '广告位修改', 'edit', 'a', 272, 2, 100),
(275, 271, '广告位删除', 'del', 'a', 272, 2, 100),
(277, 2, '广告管理', 'Carousel', 'c', 266, 1, 30),
(278, 277, '广告列表', 'index', 'a', 277, 1, 100),
(279, 277, '广告添加', 'add', 'a', 278, 2, 100),
(280, 277, '广告修改', 'edit', 'a', 278, 2, 100),
(281, 277, '广告删除', 'del', 'a', 278, 2, 100),
(282, 277, '获取商品', 'getgoods', 'a', 278, 3, 100),
(283, 277, '获取文章', 'getarticle', 'a', 278, 3, 100),
(284, 277, '获取商品名称', 'goodsinfo', 'a', 278, 3, 100),
(285, 277, '获取文章名称', 'articleinfo', 'a', 278, 3, 100),
(286, 2, '品牌管理', 'Brand', 'c', 2, 3, 100),
(287, 286, '商品品牌', 'index', 'a', 305, 1, 60),
(288, 286, '品牌添加', 'add', 'a', 287, 2, 100),
(289, 286, '品牌修改', 'edit', 'a', 287, 2, 100),
(290, 286, '品牌删除', 'del', 'a', 287, 2, 100),
(291, 2, '商品分类', 'Categories', 'c', 2, 3, 100),
(292, 291, '商品分类', 'index', 'a', 305, 1, 20),
(293, 291, '添加商品分类', 'add', 'a', 292, 2, 100),
(294, 291, '编辑商品分类', 'edit', 'a', 292, 2, 100),
(295, 291, '删除商品分类', 'del', 'a', 292, 2, 100),
(296, 2, '订单', 'Order', 'c', 2, 1, 30),
(297, 296, '订单列表', 'index', 'a', 296, 1, 10),
(298, 296, '查看订单详情', 'view', 'a', 297, 3, 100),
(299, 296, '编辑订单', 'edit', 'a', 297, 2, 100),
(300, 296, '订单发货', 'ship', 'a', 297, 2, 100),
(301, 296, '取消订单', 'cancel', 'a', 299, 3, 100),
(302, 296, '完成订单', 'complete', 'a', 299, 3, 100),
(303, 296, '删除订单', 'del', 'a', 297, 2, 100),
(304, 296, '物流查询', 'logistics', 'a', 297, 3, 100),
(305, 2, '商品', 'Goods', 'c', 2, 1, 10),
(306, 305, '商品管理', 'index', 'a', 305, 1, 10),
(307, 305, '添加商品', 'add', 'a', 306, 2, 100),
(308, 305, '保存商品', 'doAdd', 'a', 307, 3, 100),
(309, 305, '商品评价列表', 'commentlist', 'a', 306, 2, 100),
(310, 305, '商品评价详情', 'getcommentinfo', 'a', 309, 3, 100),
(311, 305, '商家回复', 'sellercontent', 'a', 309, 3, 100),
(312, 305, '前台展示状态', 'setdisplay', 'a', 164, 3, 100),
(313, 305, '获取子分类', 'getcat', 'a', 306, 3, 100),
(314, 305, '获取规格信息', 'getspec', 'a', 306, 3, 100),
(315, 305, '生成多规格', 'getspechtml', 'a', 306, 3, 100),
(316, 305, '编辑商品', 'edit', 'a', 306, 2, 100),
(317, 305, '保存编辑商品信息', 'doedit', 'a', 316, 3, 100),
(318, 305, '批量上下架', 'batchmarketable', 'a', 316, 3, 100),
(319, 305, '批量删除', 'batchdel', 'a', 321, 3, 100),
(320, 305, '商品高级筛选', 'goodssearch', 'a', 306, 3, 100),
(321, 305, '删除商品', 'del', 'a', 306, 2, 100),
(322, 305, '设置热门或推荐', 'changestate', 'a', 316, 3, 100),
(323, 2, '商品类型管理', 'GoodsType', 'c', 2, 3, 100),
(324, 323, '商品类型', 'index', 'a', 305, 1, 30),
(325, 323, '添加类型', 'add', 'a', 324, 2, 100),
(326, 323, '关联属性', 'addrel', 'a', 324, 3, 100),
(327, 323, '编辑属性', 'edit', 'a', 324, 2, 100),
(328, 323, '删除属性', 'del', 'a', 324, 2, 100),
(329, 323, '关联参数', 'addparams', 'a', 324, 3, 100),
(330, 2, '商品属性', 'GoodsTypeSpec', 'c', 2, 3, 100),
(331, 330, '商品规格', 'index', 'a', 305, 1, 40),
(332, 330, '添加属性', 'add', 'a', 331, 3, 100),
(333, 330, '编辑属性', 'edit', 'a', 331, 3, 100),
(334, 330, '删除属性', 'del', 'a', 331, 3, 100),
(335, 2, '配送方式', 'Ship', 'c', 2, 3, 100),
(336, 335, '运费模板', 'index', 'a', 296, 1, 60),
(337, 335, '添加配送方式', 'add', 'a', 336, 2, 100),
(338, 335, '编辑配送方式', 'edit', 'a', 336, 2, 100),
(339, 335, '删除配送方式', 'del', 'a', 336, 2, 100),
(340, 335, '选择地区', 'choosearea', 'a', 336, 3, 100),
(343, 2, '售后单管理', 'BillAftersales', 'c', 2, 3, 100),
(344, 343, '售后申请', 'index', 'a', 296, 1, 20),
(345, 343, '售后单审核', 'audit', 'a', 344, 2, 100),
(346, 343, '售后单查看', 'view', 'a', 344, 3, 100),
(347, 2, '退货单管理', 'BillReship', 'c', 2, 3, 100),
(348, 347, '退货单', 'index', 'a', 296, 1, 50),
(349, 347, '退货单查看', 'view', 'a', 348, 3, 100),
(350, 347, '退货单确认收货', 'confirmreship', 'a', 348, 2, 100),
(351, 2, '退款单管理', 'BillRefund', 'c', 2, 3, 150),
(352, 351, '退款单', 'index', 'a', 399, 1, 30),
(353, 351, '退款单查看', 'view', 'a', 352, 3, 100),
(354, 351, '操作退款', 'refund', 'a', 352, 2, 100),
(355, 351, '再次退款', 'reaudit', 'a', 354, 3, 100),
(356, 2, '营销', 'Promotion', 'c', 2, 1, 40),
(357, 356, '促销管理', 'index', 'a', 356, 1, 100),
(358, 356, '添加促销', 'add', 'a', 357, 2, 100),
(359, 356, '促销编辑', 'edit', 'a', 357, 2, 100),
(360, 356, '促销删除', 'del', 'a', 357, 2, 100),
(361, 356, '优惠券', 'coupon', 'a', 356, 1, 30),
(362, 356, '添加优惠券规则', 'couponadd', 'a', 361, 2, 100),
(363, 356, '优惠券规则编辑', 'couponedit', 'a', 361, 2, 100),
(364, 356, '优惠券规则删除', 'coupondel', 'a', 361, 2, 100),
(365, 2, '门店管理', 'Store', 'c', 2, 3, 220),
(366, 365, '门店管理', 'index', 'a', 244, 1, 30),
(367, 365, '门店添加', 'add', 'a', 366, 2, 100),
(368, 365, '门店修改', 'edit', 'a', 366, 2, 100),
(369, 365, '门店删除', 'del', 'a', 366, 2, 100),
(370, 365, '门店地图展现', 'showmap', 'a', 366, 3, 100),
(390, 2, '图片列表', 'images', 'c', 2, 3, 100),
(391, 390, '图片管理', 'index', 'a', 244, 1, 70),
(392, 2, '导入导出管理', 'ietask', 'c', 2, 3, 100),
(393, 392, '导入导出', 'index', 'a', 244, 1, 60),
(394, 392, '导出', 'export', 'a', 306, 2, 100),
(395, 392, '导入', 'import', 'a', 306, 2, 100),
(396, 392, '下载导入模板', 'importtemplete', 'a', 306, 3, 100),
(397, 392, '下载文件', 'down', 'a', 393, 2, 100),
(398, 392, '执行下载文件', 'dodown', 'a', 397, 3, 100),
(399, 2, '财务', 'BillPayments', 'c', 2, 1, 50),
(400, 399, '支付单', 'index', 'a', 399, 1, 20),
(401, 399, '后台支付', 'pay', 'a', 400, 2, 100),
(402, 399, '后台支付实际操作', 'topay', 'a', 401, 3, 100),
(403, 399, '支付单查看', 'index', 'a', 400, 3, 100),
(404, 2, '发货单管理', 'BillDelivery', 'c', 2, 3, 100),
(405, 404, '发货单', 'index', 'a', 296, 1, 30),
(406, 404, '发货单详情', 'view', 'a', 405, 3, 100),
(407, 404, '发货单明细', 'items', 'a', 405, 3, 100),
(408, 2, '消息中心', 'MessageCenter', 'c', 2, 3, 100),
(409, 408, '消息提醒', 'index', 'a', 244, 1, 40),
(410, 2, '角色管理', 'Role', 'c', 2, 3, 100),
(411, 410, '平台角色', 'index', 'a', 416, 1, 10),
(412, 410, '角色添加', 'add', 'a', 411, 2, 100),
(413, 410, '角色删除', 'del', 'a', 411, 2, 100),
(414, 410, '编辑权限', 'getoperation', 'a', 411, 2, 100),
(415, 410, '角色保存权限', 'saveperm', 'a', 411, 3, 100),
(416, 2, '账号管理', 'Administrator', 'c', 244, 1, 90),
(417, 416, '平台管理员', 'index', 'a', 416, 1, 200),
(418, 416, '管理员添加', 'add', 'a', 417, 2, 100),
(419, 416, '管理员修改', 'edit', 'a', 417, 2, 100),
(420, 416, '管理员删除', 'del', 'a', 417, 2, 100),
(421, 2, '商品参数', 'GoodsParams', 'c', 2, 3, 100),
(422, 421, '商品参数', 'index', 'a', 305, 1, 50),
(423, 421, '添加参数', 'add', 'a', 422, 2, 100),
(424, 421, '编辑参数', 'edit', 'a', 422, 2, 100),
(425, 421, '删除参数', 'del', 'a', 422, 2, 100),
(426, 2, '标签管理', 'Label', 'c', 2, 3, 100),
(427, 426, '设置标签', 'setlabel', 'a', 306, 3, 100),
(428, 426, '设置标签', 'dosetlabel', 'a', 306, 3, 100),
(429, 426, '删除标签', 'dellabel', 'a', 306, 3, 100),
(430, 426, '删除标签', 'dodellabel', 'a', 306, 3, 100),
(431, 2, '提现管理', 'Balance', 'c', 399, 1, 10),
(432, 431, '资金明细', 'index', 'a', 399, 1, 40),
(434, 2, '节点控制器', 'Operation', 'c', 2, 3, 100),
(435, 434, '后台菜单', 'index', 'a', 266, 1, 150),
(436, 434, '节点删除', 'del', 'a', 435, 2, 100),
(437, 434, '节点编辑', 'add', 'a', 435, 2, 100),
(438, 2, '消息控制器', 'Message', 'c', 2, 3, 100),
(439, 438, '消息管理', 'index', 'a', 239, 3, 300),
(440, 438, '消息删除', 'del', 'a', 439, 3, 100),
(441, 2, '短信控制器', 'Sms', 'c', 2, 3, 100),
(442, 441, '短信管理', 'index', 'a', 244, 1, 100),
(443, 441, '短信删除', 'del', 'a', 442, 2, 100),
(460, 431, '提现申请', 'tocash', 'a', 431, 1, 10),
(461, 431, '提现审核', 'tocashexamine', 'a', 460, 2, 100),
(462, 2, '钩子列表', 'Hooks', 'c', 2, 3, 100),
(463, 462, '钩子列表', 'index', 'a', 464, 1, 100),
(464, 2, '开发设置', 'Addons', 'c', 244, 1, 80),
(465, 464, '插件列表', 'index', 'a', 464, 1, 100),
(466, 2, '基础数据管理', 'Area', 'c', 244, 3, 100),
(467, 466, '地区管理', 'index', 'a', 244, 1, 50),
(468, 466, '添加地区', 'add', 'a', 467, 2, 100),
(469, 466, '编辑地区', 'edit', 'a', 467, 2, 100),
(470, 466, '删除地区', 'del', 'a', 467, 2, 100),
(471, 462, '添加钩子', 'add', 'a', 463, 2, 100),
(472, 462, '编辑钩子', 'edit', 'a', 463, 2, 100),
(473, 462, '删除钩子', 'del', 'a', 463, 2, 100),
(474, 464, '安装插件', 'install', 'a', 465, 2, 100),
(475, 464, '卸载插件', 'uninstall', 'a', 465, 2, 100),
(476, 464, '插件配置', 'setting', 'a', 465, 2, 100),
(477, 464, '保存配置', 'dosetting', 'a', 476, 3, 100),
(478, 464, '插件启用/停用', 'changestatus', 'a', 465, 2, 100),
(479, 2, '微信公众号', 'Wechat', 'c', 266, 1, 60),
(480, 479, '小程序配置', 'edit', 'a', 604, 1, 100),
(481, 479, '模板列表', 'template', 'a', 479, 3, 100),
(482, 479, '保存配置', 'doEdit', 'a', 480, 3, 100),
(483, 479, '公众号配置', 'official', 'a', 479, 1, 100),
(484, 365, '店员列表', 'clerklist', 'a', 366, 2, 100),
(485, 365, '添加店员', 'addclerk', 'a', 366, 2, 100),
(486, 365, '删除店员', 'delclerk', 'a', 366, 2, 100),
(487, 2, '提货单列表', 'BillLading', 'c', 2, 3, 100),
(488, 487, '提货单', 'index', 'a', 296, 1, 40),
(489, 487, '提货单详情', 'info', 'a', 488, 3, 100),
(490, 487, '删除提货单', 'dellading', 'a', 488, 2, 100),
(491, 356, '限时秒杀', 'group', 'a', 356, 1, 20),
(492, 356, '添加团购', 'groupadd', 'a', 491, 2, 100),
(493, 356, '编辑团购', 'groupedit', 'a', 491, 2, 100),
(494, 356, '删除团购', 'groupdel', 'a', 491, 2, 100),
(495, 2, '物流公司', 'Logistics', 'c', 2, 3, 100),
(496, 495, '物流公司', 'index', 'a', 296, 1, 70),
(497, 495, '添加', 'add', 'a', 496, 2, 100),
(498, 495, '编辑', 'edit', 'a', 496, 2, 100),
(499, 495, '删除', 'del', 'a', 496, 2, 100),
(500, 277, '获取文章分类', 'getarticletype', 'a', 278, 3, 100),
(501, 277, '获取文章分类名称', 'articletypeinfo', 'a', 278, 3, 100),
(502, 466, '地区列表', 'getlist', 'a', 467, 3, 100),
(503, 487, '提货单核销', 'write', 'a', 488, 2, 100),
(504, 286, '获取所有品牌', 'getAll', 'a', 287, 3, 100),
(505, 291, '全部分类', 'getAll', 'a', 292, 3, 100),
(506, 305, '更新排序', 'updatesort', 'a', 316, 3, 100),
(507, 421, '弹窗参数', 'getlist', 'a', 422, 3, 100),
(508, 323, '获取所有', 'getAll', 'a', 324, 3, 100),
(509, 330, '弹窗属性列表', 'getlist', 'a', 331, 3, 100),
(510, 408, '消息编辑', 'edit', 'a', 409, 2, 100),
(511, 2, '操作日志', 'OperationLog', 'c', 2, 3, 100),
(512, 511, '操作日志', 'index', 'a', 244, 1, 110),
(517, 479, '自定义菜单', 'officialmenu', 'a', 479, 1, 20),
(518, 479, '公众号菜单-编辑', 'officialmenu', 'a', 517, 2, 100),
(519, 479, '公众号菜单-编辑保存', 'doeditmenu', 'a', 517, 2, 100),
(520, 479, '公众号菜单-删除', 'deletemenu', 'a', 517, 2, 100),
(521, 479, '公众号菜单-同步', 'updatemenu', 'a', 517, 2, 100),
(522, 479, '消息回复', 'message', 'a', 479, 1, 10),
(523, 479, '微信消息-添加', 'addMessage', 'a', 522, 2, 100),
(524, 479, '微信消息-删除', 'delMessage', 'a', 522, 2, 100),
(525, 479, '微信消息-编辑', 'editMessage', 'a', 522, 2, 100),
(526, 479, '微信消息-互动', 'autoreply', 'a', 522, 2, 100),
(527, 479, '编辑图文', 'editmediamessage', 'a', 522, 3, 100),
(528, 479, '保存图文消息', 'doeditmediamessage', 'a', 522, 3, 100),
(529, 238, '邀请人修改', 'editinvite', 'a', 239, 2, 100),
(530, 238, '会员编辑', 'edituser', 'a', 239, 2, 100),
(531, 238, '余额修改', 'editmoney', 'a', 239, 2, 100),
(532, 238, '余额明细', 'moneylog', 'a', 239, 2, 100),
(533, 238, '添加会员', 'adduser', 'a', 239, 2, 100),
(534, 335, '选择地区', 'getarea', 'a', 336, 3, 100),
(535, 2, '统计', 'Report', 'c', 2, 1, 70),
(536, 535, '订单统计', 'order', 'a', 535, 1, 20),
(537, 535, '收款报表', 'payments', 'a', 399, 1, 60),
(538, 535, '商品统计', 'goods', 'a', 535, 1, 10),
(539, 390, '删除图片', 'del', 'a', 391, 2, 100),
(540, 392, '删除任务', 'del', 'a', 393, 3, 100),
(541, 2, '万能表单', 'Form', 'c', 266, 1, 40),
(542, 541, '表单列表', 'index', 'a', 541, 1, 100),
(543, 541, '添加表单', 'add', 'a', 542, 2, 100),
(544, 541, '编辑表单', 'edit', 'a', 542, 2, 100),
(545, 541, '删除表单', 'del', 'a', 542, 2, 100),
(546, 541, '小程序码', 'generate', 'a', 542, 2, 100),
(547, 541, '提交列表', 'formsubmit', 'a', 541, 1, 100),
(548, 541, '表单报表', 'report', 'a', 542, 2, 100),
(549, 541, '表单统计', 'statistics', 'a', 542, 2, 100),
(550, 541, '删除提交', 'delsubmit', 'a', 547, 2, 100),
(551, 541, '提交明细', 'formsubmitdetail', 'a', 547, 2, 100),
(552, 541, '反馈', 'editformsubmit', 'a', 547, 2, 100),
(553, 238, '会员等级', 'grade', 'a', 238, 1, 20),
(554, 238, '添加&修改', 'gradeadd', 'a', 553, 2, 100),
(555, 238, '删除', 'gradedel', 'a', 553, 3, 100),
(556, 296, '订单打印', 'print_tpl', 'a', 297, 3, 100),
(557, 296, '打印选择快递', 'print_form', 'a', 297, 3, 100),
(558, 535, '收藏统计', 'goodscollection', 'a', 535, 1, 30),
(559, 2, '页面模块', 'Pages', 'c', 2, 3, 200),
(560, 559, '页面管理', 'index', 'a', 266, 1, 90),
(561, 559, '保存配置', 'savecustom', 'a', 560, 3, 100),
(562, 559, '页面编辑', 'custom', 'a', 560, 2, 100),
(563, 466, '生成缓存', 'generatecache', 'a', 467, 2, 100),
(564, 263, '优惠券启用禁用', 'changestate', 'a', 361, 2, 100),
(565, 356, '优惠券启用禁用', 'changestate', 'a', 361, 2, 100),
(566, 305, '批量修改价格', 'batchmodifyprice', 'a', 306, 2, 100),
(567, 305, '保存批量修改价格', 'dobatchmodifyprice', 'a', 306, 3, 100),
(568, 305, '批量修改库存', 'batchmodifystock', 'a', 306, 2, 100),
(569, 305, '保存批量修改库存', 'dobatchmodifystock', 'a', 306, 3, 100),
(570, 559, '添加页面', 'add', 'a', 560, 2, 100),
(571, 559, '删除页面', 'del', 'a', 560, 2, 100),
(572, 2, '拼团管理', 'Pintuan', 'c', 356, 1, 10),
(573, 572, '拼团列表', 'index', 'a', 572, 1, 10),
(574, 572, '删除拼团', 'del', 'a', 573, 2, 100),
(575, 572, '添加编辑拼团', 'edit', 'a', 573, 2, 100),
(576, 572, '更新排序', 'updatesort', 'a', 573, 2, 100),
(577, 572, '拼团禁用启用', 'changestate', 'a', 573, 2, 100),
(578, 572, '拼团选择商品', 'getgoods', 'a', 573, 3, 100),
(579, 238, '删除会员', 'deluser', 'a', 239, 2, 100),
(580, 291, '是否显示', 'changestate', 'a', 292, 2, 100),
(581, 296, '保存备注', 'savemark', 'a', 297, 2, 100),
(582, 399, '查看支付单详情', 'view', 'a', 400, 2, 100),
(583, 464, '插件刷新', 'refresh', 'a', 465, 2, 100),
(584, 479, '编辑菜单', 'editmenu', 'a', 517, 2, 100),
(585, 572, '拼团记录', 'record', 'a', 572, 1, 20),
(586, 2, '发票模块', 'Invoice', 'c', 2, 3, 100),
(587, 586, '发票申请', 'index', 'a', 399, 1, 50),
(588, 263, '变更领取者', 'binduser', 'a', 361, 2, 100),
(589, 238, '第三方账号', 'userwx', 'a', 238, 1, 30),
(590, 238, '第三方账号删除', 'userwxdel', 'a', 238, 2, 100),
(591, 296, '订单编辑-订单明细显示', 'edititemslist', 'a', 299, 3, 100),
(592, 296, '订单编辑-订单明细添加', 'edititemsadd', 'a', 299, 3, 100),
(593, 296, '订单编辑-订单明细删除', 'edititemsdel', 'a', 299, 3, 100),
(594, 296, '订单编辑-订单明细编辑', 'edititemsedit', 'a', 299, 3, 100),
(595, 2, '砍价管理', 'Bargain', 'c', 356, 1, 100),
(596, 595, '砍价列表', 'index', 'a', 595, 1, 1),
(597, 595, '添加编辑砍价', 'edit', 'a', 596, 2, 100),
(598, 595, '删除砍价', 'del', 'a', 596, 2, 100),
(599, 595, '更改排序', 'updatesort', 'a', 596, 2, 100),
(600, 595, '更改状态', 'changestate', 'a', 596, 2, 100),
(601, 595, '参与记录', 'record', 'a', 595, 1, 2),
(602, 595, '砍价日志', 'recordlog', 'a', 595, 1, 3),
(603, 305, '商品标签', 'labellist', 'a', 305, 1, 70),
(604, 479, '微信小程序', 'wechat', 'a', 266, 1, 70),
(605, 296, '申请售后', 'aftersales', 'a', 297, 2, 100),
(606, 347, '填写退货单', 'reship', 'a', 348, 2, 100),
(607, 559, '页面菜单', 'setmenu', 'a', 266, 1, 100),
(608, 559, '编辑页面菜单', 'editmenu', 'a', 266, 3, 100),
(609, 559, '保存页面菜单', 'doeditmenu', 'a', 266, 3, 100),
(610, 559, '删除页面菜单', 'deletemenu', 'a', 266, 3, 100);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_operation_log`
--

CREATE TABLE IF NOT EXISTS `jshop_operation_log` (
  `id` int(10) unsigned NOT NULL,
  `manage_id` int(10) unsigned DEFAULT NULL COMMENT '管理员ID',
  `controller` varchar(50) DEFAULT NULL COMMENT '操作的控制器名',
  `method` varchar(50) DEFAULT NULL COMMENT '操作方法名',
  `desc` varchar(255) DEFAULT NULL COMMENT '操作描述',
  `content` longtext COMMENT '操作数据序列号存储',
  `ip` char(50) DEFAULT NULL COMMENT '操作IP',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '操作时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='后台操作记录表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_order`
--

CREATE TABLE IF NOT EXISTS `jshop_order` (
  `order_id` varchar(20) NOT NULL COMMENT '订单号',
  `goods_amount` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '商品总价',
  `payed` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '已支付的金额',
  `order_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单实际销售总额',
  `pay_status` tinyint(1) unsigned DEFAULT '1' COMMENT '支付状态 1=未付款 2=已付款 3=部分付款 4=部分退款 5=已退款',
  `ship_status` tinyint(1) unsigned DEFAULT '1' COMMENT '发货状态 1=未发货 2=部分发货 3=已发货 4=部分退货 5=已退货',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '订单状态 1=正常 2=完成 3=取消',
  `order_type` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '订单类型,1是普通订单,2是拼团订单',
  `payment_code` varchar(20) DEFAULT NULL COMMENT '支付方式代码',
  `payment_time` bigint(12) DEFAULT NULL COMMENT '支付时间',
  `logistics_id` varchar(20) DEFAULT NULL COMMENT '配送方式ID 关联ship.id',
  `logistics_name` varchar(50) DEFAULT NULL COMMENT '配送方式名称',
  `cost_freight` decimal(6,2) unsigned DEFAULT '0.00' COMMENT '配送费用',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID 关联user.id',
  `seller_id` int(10) unsigned DEFAULT NULL COMMENT '店铺ID 关联seller.id',
  `confirm` tinyint(1) unsigned DEFAULT '1' COMMENT '售后状态 1=未确认收货 2=已确认收货',
  `confirm_time` bigint(12) unsigned DEFAULT NULL COMMENT '确认收货时间',
  `store_id` int(10) unsigned DEFAULT '0' COMMENT '自提门店ID,0就是不门店自提',
  `ship_area_id` int(10) unsigned DEFAULT '0' COMMENT '收货地区ID',
  `ship_address` varchar(200) DEFAULT NULL COMMENT '收货详细地址',
  `ship_name` varchar(50) DEFAULT NULL COMMENT '收货人姓名',
  `ship_mobile` char(15) DEFAULT NULL COMMENT '收货电话',
  `weight` double(10,2) unsigned DEFAULT '0.00' COMMENT '商品总重量',
  `tax_type` tinyint(1) unsigned DEFAULT '1' COMMENT '是否开发票 1=不发票 2=个人发票 3=公司发票',
  `tax_code` varchar(50) DEFAULT NULL COMMENT '税号',
  `tax_title` varchar(50) DEFAULT NULL COMMENT '发票抬头',
  `point` int(10) unsigned DEFAULT NULL COMMENT '使用积分',
  `point_money` decimal(10,2) DEFAULT NULL COMMENT '积分抵扣金额',
  `order_pmt` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '订单优惠金额',
  `goods_pmt` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '商品优惠金额',
  `coupon_pmt` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '优惠券优惠额度',
  `coupon` varchar(5000) DEFAULT NULL COMMENT '优惠券信息',
  `promotion_list` longtext COMMENT '优惠信息',
  `memo` varchar(255) DEFAULT NULL COMMENT '买家备注',
  `ip` varchar(50) DEFAULT NULL COMMENT '下单IP',
  `mark` varchar(510) DEFAULT NULL COMMENT '卖家备注',
  `source` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '订单来源 1=PC页面 2=H5页面 3=微信小程序',
  `is_comment` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否评论,1未评论,2已评论',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志 有数据表示删除'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='订单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_order_items`
--

CREATE TABLE IF NOT EXISTS `jshop_order_items` (
  `id` int(10) unsigned NOT NULL,
  `order_id` varchar(20) NOT NULL COMMENT '订单ID 关联order.id',
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品ID 关联goods.id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT '货品ID 关联products.id',
  `sn` varchar(30) DEFAULT NULL COMMENT '货品编码',
  `bn` varchar(30) DEFAULT NULL COMMENT '商品编码',
  `name` varchar(200) DEFAULT NULL COMMENT '商品名称',
  `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '货品价格单价',
  `ave_amount` decimal(20,2) DEFAULT NULL COMMENT '货品实际总金额',
  `ave_price` decimal(20,2) DEFAULT NULL COMMENT '货品实际单价',
  `costprice` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '货品成本价单价',
  `mktprice` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '市场价',
  `image_url` varchar(100) NOT NULL COMMENT '图片',
  `nums` smallint(5) unsigned DEFAULT NULL COMMENT '数量',
  `amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总价',
  `promotion_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品优惠总金额',
  `promotion_list` varchar(5000) NOT NULL COMMENT '促销信息',
  `weight` decimal(10,2) DEFAULT NULL COMMENT '总重量',
  `sendnums` smallint(5) unsigned DEFAULT NULL COMMENT '发货数量',
  `is_gift` tinyint(1) unsigned DEFAULT '2' COMMENT '是否赠品,1赠品,2不是赠品',
  `addon` text COMMENT '货品明细序列号存储',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='订单明细表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_order_log`
--

CREATE TABLE IF NOT EXISTS `jshop_order_log` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID',
  `order_id` varchar(20) DEFAULT NULL COMMENT '订单ID',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID',
  `type` tinyint(2) unsigned DEFAULT '1' COMMENT '类型',
  `msg` varchar(100) DEFAULT NULL COMMENT '描述介绍',
  `data` varchar(1000) DEFAULT NULL COMMENT '请求的数据json',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='订单记录表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_pages`
--

CREATE TABLE IF NOT EXISTS `jshop_pages` (
  `id` int(10) unsigned NOT NULL,
  `code` varchar(50) CHARACTER SET utf8 DEFAULT '' COMMENT '可视化区域编码',
  `name` varchar(50) CHARACTER SET utf8 DEFAULT '' COMMENT '可编辑区域名称',
  `desc` varchar(255) CHARACTER SET utf8 DEFAULT '' COMMENT '描述',
  `layout` tinyint(2) unsigned DEFAULT '1' COMMENT '布局样式编码,1,手机端',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '1手机端,2PC端',
  `is_main` tinyint(1) unsigned DEFAULT '2' COMMENT '是否首页,1是,2不是'
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- 转存表中的数据 `jshop_pages`
--

INSERT INTO `jshop_pages` (`id`, `code`, `name`, `desc`, `layout`, `type`, `is_main`) VALUES
(1, 'mobile_home', '移动端首页', '移动端首页相关操作,可视化移动端、小程序端首页布局', 1, 1, 1);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_pages_items`
--

CREATE TABLE IF NOT EXISTS `jshop_pages_items` (
  `id` int(10) unsigned NOT NULL,
  `widget_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '组件编码',
  `page_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '页面编码',
  `position_id` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '布局位置',
  `sort` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '排序,越小越靠前',
  `params` longtext CHARACTER SET utf8 COMMENT '组件配置内容'
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- 转存表中的数据 `jshop_pages_items`
--

INSERT INTO `jshop_pages_items` (`id`, `widget_code`, `page_code`, `position_id`, `sort`, `params`) VALUES
(5, 'search', 'mobile_home', 0, 1, '{"keywords":"请输入关键字搜索","style":"round"}'),
(6, 'imgSlide', 'mobile_home', 1, 2, '{"duration":2500,"list":[{"image":"\\/static\\/images\\/empty-banner.png","linkType":"","linkValue":""},{"image":"\\/static\\/images\\/empty-banner.png","linkType":"","linkValue":""}]}'),
(7, 'notice', 'mobile_home', 2, 3, '{"type":"auto","list":[{"title":"这里是第一条公告的标题","content":"","id":""}]}'),
(8, 'navBar', 'mobile_home', 3, 4, '{"limit":4,"list":[{"image":"\\/static\\/images\\/empty.png","text":"按钮1","linkType":"","linkValue":""},{"image":"\\/static\\/images\\/empty.png","text":"按钮2","linkType":"","linkValue":""},{"image":"\\/static\\/images\\/empty.png","text":"按钮3","linkType":"","linkValue":""},{"image":"\\/static\\/images\\/empty.png","text":"按钮4","linkType":"","linkValue":""}]}'),
(9, 'goods', 'mobile_home', 4, 5, '{"title":"热门商品","lookMore":"true","type":"auto","classifyId":"","brandId":"","limit":10,"display":"list","column":2,"list":[{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""},{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""},{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""},{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""}]}'),
(10, 'imgSlide', 'mobile_home', 5, 6, '{"duration":2500,"list":[{"image":"\\/static\\/images\\/empty-banner.png","linkType":"","linkValue":""},{"image":"\\/static\\/images\\/empty-banner.png","linkType":"","linkValue":""}]}'),
(11, 'goods', 'mobile_home', 6, 7, '{"title":"推荐商品","lookMore":"true","type":"auto","classifyId":"","brandId":"","limit":10,"display":"list","column":2,"list":[{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""},{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""},{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""},{"image":"\\/static\\/images\\/empty-banner.png","name":"","price":""}]}'),
(12, 'imgSingle', 'mobile_home', 7, 8, '{"list":[{"image":"\\/static\\/images\\/empty-banner.png","linkType":"","linkValue":""}]}');

-- --------------------------------------------------------

--
-- 表的结构 `jshop_pages_menu`
--

CREATE TABLE IF NOT EXISTS `jshop_pages_menu` (
  `id` int(10) NOT NULL,
  `menu_id` int(10) NOT NULL COMMENT '菜单id',
  `pid` int(10) NOT NULL DEFAULT '0' COMMENT '父级菜单',
  `name` varchar(100) CHARACTER SET utf8 NOT NULL COMMENT '菜单名称',
  `ptype` varchar(11) CHARACTER SET utf8 NOT NULL COMMENT '菜单类型',
  `params` text CHARACTER SET utf8 NOT NULL COMMENT '菜单参数',
  `selecticon` varchar(32) DEFAULT NULL COMMENT '选中图标',
  `icon` varchar(32) DEFAULT NULL COMMENT '未选中图标'
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='前端页面菜单表';

--
-- 转存表中的数据 `jshop_pages_menu`
--

INSERT INTO `jshop_pages_menu` (`id`, `menu_id`, `pid`, `name`, `ptype`, `params`, `selecticon`, `icon`) VALUES
(9, 2, 0, '首页', 'redirectTo', '{"url":"\\/pages\\/index\\/index"}', '483b8ee6429a680654c454d0fdd6fd5a', '98ebc1f521934da1d41b35178c0339ae'),
(10, 3, 0, '分类页', 'redirectTo', '{"url":"\\/pages\\/classify\\/classify"}', '70ff17564a360cb74159d82095492ca7', 'f4c5604ff4f9d52f88538579aeadfe54'),
(11, 4, 0, '购物车', 'redirectTo', '{"url":"\\/pages\\/cart\\/index\\/index"}', '4602163f525b84fd0de4b080aa256d92', 'ca84a5bb1899cfa2b7d78d2f66025112'),
(12, 5, 0, '会员', 'redirectTo', '{"url":"\\/pages\\/member\\/index\\/index"}', 'b5f7ae2456ad1a01d772a24363e72fa2', 'af01a9f897c86e59b79aac9fb142701a');

-- --------------------------------------------------------

--
-- 表的结构 `jshop_payments`
--

CREATE TABLE IF NOT EXISTS `jshop_payments` (
  `id` smallint(5) unsigned NOT NULL,
  `code` varchar(50) DEFAULT NULL COMMENT '支付类型编码',
  `name` varchar(50) DEFAULT NULL COMMENT '支付类型名称',
  `is_online` tinyint(1) unsigned DEFAULT '1' COMMENT '是否线上支付 1=线上支付 2=线下支付',
  `params` text NOT NULL COMMENT '参数',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '100' COMMENT '排序',
  `memo` varchar(200) NOT NULL COMMENT '支付方式描述',
  `status` smallint(1) unsigned NOT NULL DEFAULT '2' COMMENT '启用状态 1=启用 2=停用'
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='支付方式表';

--
-- 转存表中的数据 `jshop_payments`
--

INSERT INTO `jshop_payments` (`id`, `code`, `name`, `is_online`, `params`, `sort`, `memo`, `status`) VALUES
(1, 'wechatpay', '微信支付', 1, '{"appid":"","mch_id":"","key":"","sslcert":"","sslkey":""}', 100, '点击去微信支付', 2),
(2, 'alipay', '支付宝支付', 1, '{"appid":"","rsa_private_key":"","alipay_public_key":""}', 100, '点击去支付宝支付', 2),
(3, 'offline', '线下支付', 2, '', 100, '联系客服进行线下付款', 1),
(4, 'balancepay', '余额支付', 1, '', 100, '账户余额支付', 1);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_pintuan_goods`
--

CREATE TABLE IF NOT EXISTS `jshop_pintuan_goods` (
  `rule_id` int(11) unsigned NOT NULL,
  `goods_id` int(11) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='拼团商品表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_pintuan_record`
--

CREATE TABLE IF NOT EXISTS `jshop_pintuan_record` (
  `id` int(10) unsigned NOT NULL,
  `team_id` int(10) unsigned DEFAULT NULL COMMENT '团id',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户Id',
  `rule_id` int(10) unsigned DEFAULT NULL COMMENT '规则表Id',
  `goods_id` bigint(11) unsigned NOT NULL COMMENT '商品id',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态 1=拼团中2=成功 3=失败',
  `order_id` varchar(20) CHARACTER SET utf8 DEFAULT NULL COMMENT '订单id',
  `params` varchar(200) DEFAULT NULL COMMENT 'json格式的参数,主要是拼团人数',
  `close_time` bigint(12) unsigned DEFAULT NULL COMMENT '关闭时间',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='拼团记录表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_pintuan_rule`
--

CREATE TABLE IF NOT EXISTS `jshop_pintuan_rule` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(40) CHARACTER SET utf8 DEFAULT '' COMMENT '活动名称',
  `stime` bigint(12) unsigned DEFAULT NULL COMMENT '开始时间',
  `etime` bigint(12) unsigned DEFAULT NULL COMMENT '结束时间',
  `people_number` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '人数 2-10人',
  `significant_interval` int(10) unsigned NOT NULL DEFAULT '24' COMMENT '单位 小时',
  `discount_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  `max_nums` int(10) unsigned DEFAULT '0' COMMENT '每人限购数量',
  `max_goods_nums` int(10) unsigned DEFAULT '0' COMMENT '每个商品活动数量',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '100' COMMENT '排序',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 1=开启(默认)  2=禁用',
  `ctime` bigint(12) DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='拼团规则表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_products`
--

CREATE TABLE IF NOT EXISTS `jshop_products` (
  `id` int(10) unsigned NOT NULL COMMENT '货品ID',
  `goods_id` int(10) unsigned DEFAULT NULL COMMENT '商品id 关联goods.id',
  `barcode` varchar(128) DEFAULT NULL COMMENT '货品条码',
  `sn` varchar(30) DEFAULT NULL COMMENT '商品编码',
  `price` decimal(10,2) DEFAULT NULL COMMENT '货品价格',
  `costprice` decimal(10,2) DEFAULT NULL COMMENT '货品成本价',
  `mktprice` decimal(10,2) DEFAULT NULL COMMENT '货品市场价',
  `marketable` tinyint(1) unsigned DEFAULT NULL COMMENT '上架标志 1=上架 2=下架',
  `stock` int(11) unsigned DEFAULT '0' COMMENT '库存',
  `freeze_stock` int(11) unsigned DEFAULT '0' COMMENT '冻结库存',
  `spes_desc` text COMMENT '规格值逗号分隔存储',
  `is_defalut` tinyint(1) unsigned DEFAULT '2' COMMENT '是否默认货品 1=是 2=否',
  `image_id` char(32) DEFAULT NULL COMMENT '规格图片ID',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='货品表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_promotion`
--

CREATE TABLE IF NOT EXISTS `jshop_promotion` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(40) NOT NULL COMMENT '促销名称',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '启用状态,1开启,2关闭',
  `type` smallint(1) unsigned NOT NULL DEFAULT '1' COMMENT '类型:1促销,2优惠券,3团购,4秒杀',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '100' COMMENT '排序',
  `exclusive` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '排他,1不排他,2排他',
  `auto_receive` smallint(1) unsigned NOT NULL DEFAULT '1' COMMENT '当时优惠券的时候,自动是否自动领取,1自动领取,2不自动领取',
  `params` text COMMENT '其它参数',
  `stime` bigint(12) unsigned NOT NULL COMMENT '开始时间',
  `etime` bigint(12) unsigned NOT NULL COMMENT '结束时间',
  `isdel` bigint(12) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='促销表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_promotion_condition`
--

CREATE TABLE IF NOT EXISTS `jshop_promotion_condition` (
  `id` int(11) NOT NULL,
  `promotion_id` int(10) unsigned DEFAULT NULL COMMENT '促销ID',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '100' COMMENT '排序',
  `code` varchar(50) DEFAULT NULL COMMENT '促销条件编码',
  `params` text COMMENT '支付配置参数序列号存储'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='促销条件表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_promotion_record`
--

CREATE TABLE IF NOT EXISTS `jshop_promotion_record` (
  `id` int(10) unsigned NOT NULL,
  `promotion_id` int(10) unsigned DEFAULT NULL COMMENT '促销id',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户Id',
  `goods_id` bigint(11) unsigned NOT NULL COMMENT '商品id',
  `product_id` int(10) DEFAULT NULL COMMENT '货品id',
  `order_id` varchar(20) CHARACTER SET utf8 DEFAULT NULL COMMENT '订单id',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '1团购,2秒杀',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='促销活动记录表,目前主要记录团购秒杀记录';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_promotion_result`
--

CREATE TABLE IF NOT EXISTS `jshop_promotion_result` (
  `id` int(11) NOT NULL,
  `promotion_id` int(10) unsigned DEFAULT NULL COMMENT '促销ID',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '100' COMMENT '排序',
  `code` varchar(50) DEFAULT NULL COMMENT '促销条件编码',
  `params` text COMMENT '支付配置参数序列号存储'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='促销结果表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_setting`
--

CREATE TABLE IF NOT EXISTS `jshop_setting` (
  `skey` varchar(50) NOT NULL DEFAULT '' COMMENT '键',
  `value` text COMMENT '值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='店铺设置表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_ship`
--

CREATE TABLE IF NOT EXISTS `jshop_ship` (
  `id` int(11) unsigned NOT NULL,
  `name` varchar(50) DEFAULT NULL COMMENT '配送方式名称',
  `has_cod` tinyint(1) unsigned DEFAULT '1' COMMENT '是否货到付款 1=不是货到付款 2=是货到付款',
  `firstunit` mediumint(8) unsigned DEFAULT NULL COMMENT '首重',
  `continueunit` mediumint(8) unsigned DEFAULT NULL COMMENT '续重',
  `def_area_fee` tinyint(1) unsigned DEFAULT '1' COMMENT '按地区设置配送费用是否启用默认配送费用 1=启用 2=不启用',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '地区类型 1=全部地区 2=指定地区',
  `firstunit_price` decimal(10,2) unsigned DEFAULT NULL COMMENT '首重费用',
  `continueunit_price` decimal(10,2) unsigned DEFAULT NULL COMMENT '续重费用',
  `exp` text COMMENT '配送费用计算表达式',
  `logi_name` varchar(50) DEFAULT NULL COMMENT '物流公司名称',
  `logi_code` varchar(50) DEFAULT NULL COMMENT '物流公司编码',
  `is_def` tinyint(1) unsigned DEFAULT '2' COMMENT '是否默认 1=默认 2=不默认',
  `sort` smallint(5) unsigned DEFAULT '100' COMMENT '配送方式排序 越小越靠前',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态 1=正常 2=停用',
  `free_postage` tinyint(1) unsigned DEFAULT '2' COMMENT '是否包邮,1包邮,2不包邮',
  `area_fee` text COMMENT '地区配送费用',
  `goodsmoney` decimal(20,2) DEFAULT '0.00' COMMENT '商品总额满多少免运费'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='配送方式表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_sms`
--

CREATE TABLE IF NOT EXISTS `jshop_sms` (
  `id` int(10) unsigned NOT NULL,
  `mobile` varchar(60) NOT NULL COMMENT '手机号码,允许同时存在多个手机号码,英文逗号分隔',
  `code` varchar(60) NOT NULL,
  `params` varchar(5000) NOT NULL COMMENT '参数',
  `content` varchar(200) NOT NULL COMMENT '内容',
  `ctime` bigint(12) unsigned NOT NULL COMMENT '创建时间',
  `ip` varchar(50) NOT NULL COMMENT 'ip',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1未使用,2已使用'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_store`
--

CREATE TABLE IF NOT EXISTS `jshop_store` (
  `id` int(11) unsigned NOT NULL COMMENT 'id',
  `store_name` varchar(125) DEFAULT NULL COMMENT '门店名称',
  `mobile` varchar(13) DEFAULT NULL COMMENT '门店电话/手机号',
  `linkman` varchar(32) DEFAULT NULL COMMENT '门店联系人',
  `logo` char(32) DEFAULT NULL COMMENT '门店logo',
  `area_id` int(10) unsigned DEFAULT NULL COMMENT '门店地区id',
  `address` varchar(200) DEFAULT NULL COMMENT '门店详细地址',
  `coordinate` varchar(50) DEFAULT NULL,
  `latitude` varchar(40) DEFAULT NULL COMMENT '纬度',
  `longitude` varchar(40) DEFAULT NULL COMMENT '经度',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_template`
--

CREATE TABLE IF NOT EXISTS `jshop_template` (
  `id` int(10) NOT NULL,
  `name` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板名称',
  `th_template_id` int(10) unsigned DEFAULT NULL COMMENT '模板ID,第三方平台id',
  `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间',
  `user_desc` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板描述',
  `source_appid` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板APPID',
  `developer` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板开发者',
  `version` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板版本,总共3位,第一位表示重大版本升级,第二位表示小版本升级,第三位表示补丁或更新',
  `image_id` char(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板主图',
  `desc` text CHARACTER SET utf8 COMMENT '模板需要注意事项',
  `qr_demo` char(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '二维码预览图片',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '模板类型,1为小程序',
  `ext_json` text CHARACTER SET utf8 COMMENT '模板增加模板配置字段',
  `ctime` int(10) DEFAULT NULL COMMENT '数据创建时间',
  `utime` int(10) DEFAULT NULL COMMENT '数据更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='模板列表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_template_message`
--

CREATE TABLE IF NOT EXISTS `jshop_template_message` (
  `id` int(10) unsigned NOT NULL COMMENT '消息ID',
  `type` varchar(32) DEFAULT NULL COMMENT '消息类型',
  `code` varchar(32) DEFAULT NULL COMMENT '单号',
  `form_id` varchar(64) DEFAULT NULL COMMENT '要发生给的用户',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '发送状态 1=未发送 2=已发送',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标识'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_template_order`
--

CREATE TABLE IF NOT EXISTS `jshop_template_order` (
  `id` int(10) NOT NULL,
  `template_id` int(10) unsigned DEFAULT '0' COMMENT '模板id',
  `appid` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '商户appid',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='模板订购记录表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user`
--

CREATE TABLE IF NOT EXISTS `jshop_user` (
  `id` int(10) unsigned NOT NULL COMMENT '用户ID',
  `username` varchar(20) DEFAULT NULL COMMENT '用户名',
  `password` char(32) DEFAULT NULL COMMENT '密码 md5(md5()+创建时间)',
  `mobile` varchar(15) DEFAULT NULL COMMENT '手机号',
  `sex` tinyint(1) unsigned DEFAULT '3' COMMENT '1=男 2=女 3=未知',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `nickname` varchar(50) DEFAULT NULL COMMENT '昵称',
  `balance` decimal(10,2) DEFAULT '0.00' COMMENT '余额',
  `point` int(11) unsigned DEFAULT '0' COMMENT '积分',
  `grade` tinyint(2) unsigned DEFAULT '0' COMMENT '用户等级',
  `ctime` bigint(12) unsigned DEFAULT NULL,
  `utime` bigint(12) unsigned DEFAULT NULL,
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '1 = 正常 2 = 停用',
  `pid` int(10) unsigned DEFAULT '0' COMMENT '推荐人',
  `isdel` bigint(12) unsigned DEFAULT NULL COMMENT '删除标志 有数据就是删除',
  `remarks` varchar(100) DEFAULT '' COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_bankcards`
--

CREATE TABLE IF NOT EXISTS `jshop_user_bankcards` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID号',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID',
  `bank_name` varchar(60) DEFAULT NULL COMMENT '银行名称',
  `bank_code` varchar(12) DEFAULT NULL COMMENT '银行缩写',
  `bank_area_id` int(10) unsigned DEFAULT NULL COMMENT '账号地区ID',
  `account_bank` varchar(255) DEFAULT NULL COMMENT '开户行',
  `account_name` varchar(60) DEFAULT NULL COMMENT '账户名',
  `card_number` varchar(30) DEFAULT NULL COMMENT '卡号',
  `card_type` tinyint(1) DEFAULT '1' COMMENT '银行卡类型: 1=储蓄卡 2=信用卡',
  `is_default` tinyint(1) unsigned DEFAULT '2' COMMENT '默认卡 1=默认 2=不默认',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_grade`
--

CREATE TABLE IF NOT EXISTS `jshop_user_grade` (
  `id` tinyint(2) unsigned NOT NULL COMMENT 'id',
  `name` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名称',
  `is_def` tinyint(1) NOT NULL DEFAULT '2' COMMENT '1默认,2不默认'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户等级表';

--
-- 转存表中的数据 `jshop_user_grade`
--

INSERT INTO `jshop_user_grade` (`id`, `name`, `is_def`) VALUES
(1, '普通等级', 1);

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_log`
--

CREATE TABLE IF NOT EXISTS `jshop_user_log` (
  `id` int(11) unsigned NOT NULL COMMENT 'id',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户id',
  `state` tinyint(1) DEFAULT NULL COMMENT '登录 1  退出2,3注册',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '时间',
  `params` varchar(200) DEFAULT '' COMMENT '参数',
  `ip` varchar(15) DEFAULT NULL COMMENT 'ip地址',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '类型,1会员,2管理员'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_point_log`
--

CREATE TABLE IF NOT EXISTS `jshop_user_point_log` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID',
  `user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '类型 1=签到 2=购物返积分 3=购物使用积分',
  `num` int(10) DEFAULT '0' COMMENT '积分数量',
  `balance` bigint(20) unsigned DEFAULT NULL COMMENT '积分余额',
  `remarks` varchar(255) DEFAULT NULL COMMENT '备注',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户积分记录表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_ship`
--

CREATE TABLE IF NOT EXISTS `jshop_user_ship` (
  `id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户id 关联user.id',
  `area_id` int(10) unsigned DEFAULT NULL COMMENT '收货地区ID',
  `address` varchar(200) DEFAULT NULL COMMENT '收货详细地址',
  `name` varchar(50) DEFAULT NULL COMMENT '收货人姓名',
  `mobile` char(15) DEFAULT NULL COMMENT '收货电话',
  `utime` bigint(12) NOT NULL COMMENT '更新时间',
  `is_def` tinyint(1) unsigned DEFAULT NULL COMMENT '是否默认 1=默认 2=不默认'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_tocash`
--

CREATE TABLE IF NOT EXISTS `jshop_user_tocash` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID号',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID',
  `money` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现金额',
  `bank_name` varchar(60) DEFAULT NULL COMMENT '银行名称',
  `bank_code` varchar(12) DEFAULT NULL COMMENT '银行缩写',
  `bank_area_id` int(10) unsigned DEFAULT NULL COMMENT '账号地区ID',
  `account_bank` varchar(255) DEFAULT NULL COMMENT '开户行',
  `account_name` varchar(60) DEFAULT NULL COMMENT '账户名',
  `card_number` varchar(30) DEFAULT NULL COMMENT '卡号',
  `withdrawals` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现服务费',
  `type` smallint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1默认,2提现成功,3提现失败',
  `ctime` bigint(12) unsigned DEFAULT NULL COMMENT '创建时间',
  `utime` bigint(12) unsigned DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_token`
--

CREATE TABLE IF NOT EXISTS `jshop_user_token` (
  `token` char(32) NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `platform` smallint(2) NOT NULL DEFAULT '1' COMMENT '平台类型,1就是默认,2就是微信小程序',
  `ctime` bigint(12) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户token';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_user_wx`
--

CREATE TABLE IF NOT EXISTS `jshop_user_wx` (
  `id` int(10) unsigned NOT NULL COMMENT '用户ID',
  `type` tinyint(1) unsigned DEFAULT '1' COMMENT '第三方登录类型,1微信小程序,2微信公众号',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '关联用户表',
  `openid` varchar(50) DEFAULT NULL,
  `session_key` varchar(50) DEFAULT NULL,
  `unionid` varchar(50) DEFAULT NULL,
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `nickname` varchar(50) DEFAULT NULL COMMENT '昵称',
  `gender` smallint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别 0:未知、1:男、2:女',
  `language` varchar(50) DEFAULT NULL COMMENT '语言',
  `city` varchar(80) DEFAULT NULL COMMENT '城市',
  `province` varchar(80) DEFAULT NULL COMMENT '省',
  `country` varchar(80) DEFAULT NULL COMMENT '国家',
  `country_code` varchar(20) DEFAULT NULL COMMENT '手机号码国家编码',
  `mobile` varchar(20) DEFAULT NULL COMMENT '手机号码',
  `ctime` bigint(12) unsigned DEFAULT NULL,
  `utime` bigint(12) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_weixin_author`
--

CREATE TABLE IF NOT EXISTS `jshop_weixin_author` (
  `id` int(10) NOT NULL,
  `nick_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '授权方昵称',
  `head_img` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '授权方头像',
  `service_type_info` varchar(10) CHARACTER SET utf8 DEFAULT '0' COMMENT '默认为0',
  `verify_type_info` tinyint(1) DEFAULT '-1' COMMENT '授权方认证类型,-1代表未认证,0代表微信认证',
  `user_name` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '小程序的原始ID',
  `signature` tinytext CHARACTER SET utf8 COMMENT '帐号介绍',
  `principal_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '小程序的主体名称',
  `business_info` text CHARACTER SET utf8 COMMENT '用以了解以下功能的开通状况(0代表未开通,1代表已开通): open_store:是否开通微信门店功能 open_scan:是否开通微信扫商品功能 open_pay:是否开通微信支付功能 open_card:是否开通微信卡券功能 open_shake:是否开通微信摇一摇功能',
  `qrcode_url` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '二维码图片的URL',
  `authorization_info` text CHARACTER SET utf8 COMMENT '授权信息',
  `appid` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '授权方appid',
  `appsecret` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '授权方AppSecret',
  `miniprograminfo` tinytext CHARACTER SET utf8 COMMENT '可根据这个字段判断是否为小程序类型授权,有值为小程序',
  `func_info` text CHARACTER SET utf8 COMMENT '小程序授权给开发者的权限集列表,ID为17到19时分别代表: 17.帐号管理权限 18.开发管理权限 19.客服消息管理权限 请注意: 1)该字段的返回不会考虑小程序是否具备该权限集的权限(因为可能部分具备)',
  `authorizer_refresh_token` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '刷新token',
  `authorizer_access_token` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT 'token',
  `bind_type` tinyint(1) unsigned DEFAULT '2' COMMENT '绑定类型,1为第三方授权绑定,2为自助绑定',
  `author_type` varchar(10) CHARACTER SET utf8 DEFAULT 'b2c' COMMENT '授权类型,默认b2c',
  `expires_in` int(10) unsigned DEFAULT '0' COMMENT '绑定授权到期时间',
  `ctime` int(10) unsigned DEFAULT '0' COMMENT '小程序授权时间',
  `utime` int(10) unsigned DEFAULT '0' COMMENT '小程序更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='获取授权方的帐号基本信息表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_weixin_media_message`
--

CREATE TABLE IF NOT EXISTS `jshop_weixin_media_message` (
  `id` int(10) NOT NULL,
  `title` varchar(200) DEFAULT NULL COMMENT '标题',
  `author` varchar(100) DEFAULT NULL COMMENT '作者',
  `brief` varchar(255) DEFAULT NULL COMMENT '摘要',
  `image` char(32) DEFAULT NULL COMMENT '封面',
  `content` text COMMENT '文章详情',
  `url` varchar(255) DEFAULT NULL COMMENT '原文地址',
  `ctime` bigint(12) DEFAULT '0' COMMENT '创建时间',
  `utime` bigint(12) DEFAULT '0' COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='微信图文消息表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_weixin_menu`
--

CREATE TABLE IF NOT EXISTS `jshop_weixin_menu` (
  `id` int(10) NOT NULL,
  `menu_id` int(10) NOT NULL COMMENT '菜单id',
  `pid` int(10) NOT NULL DEFAULT '0' COMMENT '父级菜单',
  `name` varchar(100) CHARACTER SET utf8 NOT NULL COMMENT '菜单名称',
  `type` varchar(11) CHARACTER SET utf8 NOT NULL COMMENT '菜单类型',
  `params` text CHARACTER SET utf8 NOT NULL COMMENT '菜单参数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='微信公众号菜单表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_weixin_message`
--

CREATE TABLE IF NOT EXISTS `jshop_weixin_message` (
  `id` int(10) NOT NULL,
  `name` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '消息名称',
  `type` tinyint(1) DEFAULT '1' COMMENT '消息类型1:文本消息,2:图文消息',
  `params` text CHARACTER SET utf8 COMMENT '消息参数',
  `ctime` bigint(12) DEFAULT '0' COMMENT '创建时间',
  `utime` bigint(12) DEFAULT '0' COMMENT '更新时间',
  `is_attention` tinyint(1) DEFAULT '2' COMMENT '关注回复,1是关注回复,2不是关注回复',
  `is_default` tinyint(1) DEFAULT '2' COMMENT '是否默认回复,1是,2不是',
  `enable` tinyint(1) DEFAULT '1' COMMENT '1启用,2禁用'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='微信消息表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_weixin_publish`
--

CREATE TABLE IF NOT EXISTS `jshop_weixin_publish` (
  `id` int(10) unsigned NOT NULL,
  `template_id` int(10) unsigned DEFAULT '0' COMMENT '模板id,不是第三方平台模板id',
  `ctime` int(10) unsigned DEFAULT '0' COMMENT '购买模板时间',
  `audit_status` tinyint(1) DEFAULT NULL COMMENT '审核状态,其中0为审核成功,1为审核失败,2为审核中,-1为未提交审核',
  `reason` text CHARACTER SET utf8 COMMENT '审核反馈',
  `publish_status` tinyint(1) DEFAULT '0' COMMENT '发布状态,0未发布,1已发布,2发布成功,3发布失败',
  `publish_msg` text CHARACTER SET utf8 COMMENT '发布反馈',
  `auditid` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '审核id',
  `ext_json` text CHARACTER SET utf8 COMMENT '第三方自定义的json',
  `user_version` varchar(50) CHARACTER SET utf8 DEFAULT '' COMMENT '代码版本号',
  `user_desc` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '代码描述',
  `appid` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '授权appid',
  `qrcode` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '预览二维码'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='小程序发布审核表';

-- --------------------------------------------------------

--
-- 表的结构 `jshop_worksheet`
--

CREATE TABLE IF NOT EXISTS `jshop_worksheet` (
  `id` int(11) NOT NULL,
  `phone` char(11) CHARACTER SET utf8 NOT NULL,
  `status` char(10) CHARACTER SET utf8 NOT NULL DEFAULT '未处理',
  `job_num` varchar(20) CHARACTER SET utf8 NOT NULL COMMENT '工单号',
  `create_time` int(11) NOT NULL COMMENT '提交时间',
  `type` char(10) CHARACTER SET utf8 NOT NULL,
  `title` varchar(20) CHARACTER SET utf8 NOT NULL,
  `content` varchar(255) CHARACTER SET utf8 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `jshop_wsdetail`
--

CREATE TABLE IF NOT EXISTS `jshop_wsdetail` (
  `id` int(11) NOT NULL,
  `job_num` char(20) CHARACTER SET utf8 NOT NULL,
  `event` text CHARACTER SET utf8 NOT NULL,
  `create_time` int(11) NOT NULL,
  `pic_path` varchar(255) CHARACTER SET utf8 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `jshop_addons`
--
ALTER TABLE `jshop_addons`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_advertisement`
--
ALTER TABLE `jshop_advertisement`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_advert_position`
--
ALTER TABLE `jshop_advert_position`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_area`
--
ALTER TABLE `jshop_area`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`,`parent_id`,`name`) USING BTREE;

--
-- Indexes for table `jshop_article`
--
ALTER TABLE `jshop_article`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE;

--
-- Indexes for table `jshop_article_type`
--
ALTER TABLE `jshop_article_type`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_backstage_notice`
--
ALTER TABLE `jshop_backstage_notice`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_balance`
--
ALTER TABLE `jshop_balance`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_bargain`
--
ALTER TABLE `jshop_bargain`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_bargain_log`
--
ALTER TABLE `jshop_bargain_log`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_bargain_record`
--
ALTER TABLE `jshop_bargain_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_bill_aftersales`
--
ALTER TABLE `jshop_bill_aftersales`
  ADD PRIMARY KEY (`aftersales_id`) USING BTREE;

--
-- Indexes for table `jshop_bill_aftersales_images`
--
ALTER TABLE `jshop_bill_aftersales_images`
  ADD KEY `aftersales_id` (`aftersales_id`) USING BTREE;

--
-- Indexes for table `jshop_bill_aftersales_items`
--
ALTER TABLE `jshop_bill_aftersales_items`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_bill_delivery`
--
ALTER TABLE `jshop_bill_delivery`
  ADD PRIMARY KEY (`delivery_id`) USING BTREE;

--
-- Indexes for table `jshop_bill_delivery_items`
--
ALTER TABLE `jshop_bill_delivery_items`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_bill_delivery_order_rel`
--
ALTER TABLE `jshop_bill_delivery_order_rel`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `delivery_id` (`delivery_id`);

--
-- Indexes for table `jshop_bill_lading`
--
ALTER TABLE `jshop_bill_lading`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_bill_payments`
--
ALTER TABLE `jshop_bill_payments`
  ADD PRIMARY KEY (`payment_id`) USING BTREE,
  ADD KEY `payment_id` (`payment_id`) USING BTREE,
  ADD KEY `status` (`status`) USING BTREE,
  ADD KEY `type` (`type`) USING BTREE;

--
-- Indexes for table `jshop_bill_payments_rel`
--
ALTER TABLE `jshop_bill_payments_rel`
  ADD KEY `payment_id` (`payment_id`) USING BTREE;

--
-- Indexes for table `jshop_bill_refund`
--
ALTER TABLE `jshop_bill_refund`
  ADD PRIMARY KEY (`refund_id`) USING BTREE,
  ADD KEY `refund_id` (`refund_id`) USING BTREE,
  ADD KEY `aftersales_id` (`aftersales_id`) USING BTREE,
  ADD KEY `type` (`type`) USING BTREE;

--
-- Indexes for table `jshop_bill_reship`
--
ALTER TABLE `jshop_bill_reship`
  ADD PRIMARY KEY (`reship_id`) USING BTREE;

--
-- Indexes for table `jshop_bill_reship_items`
--
ALTER TABLE `jshop_bill_reship_items`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `reship_id` (`reship_id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_brand`
--
ALTER TABLE `jshop_brand`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE;

--
-- Indexes for table `jshop_cart`
--
ALTER TABLE `jshop_cart`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `user_id` (`user_id`) USING BTREE;

--
-- Indexes for table `jshop_clerk`
--
ALTER TABLE `jshop_clerk`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_coupon`
--
ALTER TABLE `jshop_coupon`
  ADD PRIMARY KEY (`coupon_code`) USING BTREE;

--
-- Indexes for table `jshop_files`
--
ALTER TABLE `jshop_files`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `id` (`id`),
  ADD KEY `id_2` (`id`),
  ADD KEY `isdel` (`isdel`);

--
-- Indexes for table `jshop_form`
--
ALTER TABLE `jshop_form`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jshop_form_item`
--
ALTER TABLE `jshop_form_item`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jshop_form_submit`
--
ALTER TABLE `jshop_form_submit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jshop_form_submit_detail`
--
ALTER TABLE `jshop_form_submit_detail`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jshop_goods`
--
ALTER TABLE `jshop_goods`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE,
  ADD KEY `is_hot` (`is_hot`) USING BTREE,
  ADD KEY `is_recommend` (`is_recommend`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE,
  ADD KEY `mktprice` (`mktprice`) USING BTREE;

--
-- Indexes for table `jshop_goods_browsing`
--
ALTER TABLE `jshop_goods_browsing`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `user_id` (`user_id`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE;

--
-- Indexes for table `jshop_goods_cat`
--
ALTER TABLE `jshop_goods_cat`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE,
  ADD KEY `seller_id` (`parent_id`) USING BTREE;

--
-- Indexes for table `jshop_goods_collection`
--
ALTER TABLE `jshop_goods_collection`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `user_id` (`user_id`) USING BTREE,
  ADD KEY `goods_id` (`goods_id`) USING BTREE;

--
-- Indexes for table `jshop_goods_comment`
--
ALTER TABLE `jshop_goods_comment`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `user_id` (`user_id`) USING BTREE,
  ADD KEY `display` (`display`) USING BTREE,
  ADD KEY `goods_id` (`goods_id`) USING BTREE;

--
-- Indexes for table `jshop_goods_grade`
--
ALTER TABLE `jshop_goods_grade`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_goods_images`
--
ALTER TABLE `jshop_goods_images`
  ADD KEY `goods_id` (`goods_id`) USING BTREE;

--
-- Indexes for table `jshop_goods_params`
--
ALTER TABLE `jshop_goods_params`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_goods_type`
--
ALTER TABLE `jshop_goods_type`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_goods_type_spec`
--
ALTER TABLE `jshop_goods_type_spec`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE;

--
-- Indexes for table `jshop_goods_type_spec_value`
--
ALTER TABLE `jshop_goods_type_spec_value`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `spec_id` (`spec_id`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE;

--
-- Indexes for table `jshop_hooks`
--
ALTER TABLE `jshop_hooks`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_ietask`
--
ALTER TABLE `jshop_ietask`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_images`
--
ALTER TABLE `jshop_images`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD UNIQUE KEY `id` (`id`) USING BTREE,
  ADD KEY `id_2` (`id`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE;

--
-- Indexes for table `jshop_images_group`
--
ALTER TABLE `jshop_images_group`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_invoice`
--
ALTER TABLE `jshop_invoice`
  ADD PRIMARY KEY (`id`),
  ADD KEY `class` (`class`),
  ADD KEY `source_id` (`source_id`),
  ADD KEY `type` (`type`),
  ADD KEY `status` (`status`);

--
-- Indexes for table `jshop_invoice_record`
--
ALTER TABLE `jshop_invoice_record`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jshop_jobs`
--
ALTER TABLE `jshop_jobs`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_label`
--
ALTER TABLE `jshop_label`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_login_log`
--
ALTER TABLE `jshop_login_log`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_logistics`
--
ALTER TABLE `jshop_logistics`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD UNIQUE KEY `logi_code` (`logi_code`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE;

--
-- Indexes for table `jshop_manage`
--
ALTER TABLE `jshop_manage`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD UNIQUE KEY `username` (`username`) USING BTREE;

--
-- Indexes for table `jshop_manage_role`
--
ALTER TABLE `jshop_manage_role`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_message`
--
ALTER TABLE `jshop_message`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `user_id` (`user_id`) USING BTREE;

--
-- Indexes for table `jshop_message_center`
--
ALTER TABLE `jshop_message_center`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_notice`
--
ALTER TABLE `jshop_notice`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE;

--
-- Indexes for table `jshop_operation`
--
ALTER TABLE `jshop_operation`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `parent_id` (`parent_id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE,
  ADD KEY `parent_menu_id` (`parent_menu_id`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE;

--
-- Indexes for table `jshop_operation_log`
--
ALTER TABLE `jshop_operation_log`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_order`
--
ALTER TABLE `jshop_order`
  ADD PRIMARY KEY (`order_id`) USING BTREE;

--
-- Indexes for table `jshop_order_items`
--
ALTER TABLE `jshop_order_items`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_order_log`
--
ALTER TABLE `jshop_order_log`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_pages`
--
ALTER TABLE `jshop_pages`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_pages_items`
--
ALTER TABLE `jshop_pages_items`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_pages_menu`
--
ALTER TABLE `jshop_pages_menu`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_payments`
--
ALTER TABLE `jshop_payments`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `status` (`status`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_pintuan_record`
--
ALTER TABLE `jshop_pintuan_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_pintuan_rule`
--
ALTER TABLE `jshop_pintuan_rule`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_products`
--
ALTER TABLE `jshop_products`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE,
  ADD KEY `goods_id` (`goods_id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_promotion`
--
ALTER TABLE `jshop_promotion`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `isdel` (`isdel`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE,
  ADD KEY `status` (`status`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE;

--
-- Indexes for table `jshop_promotion_condition`
--
ALTER TABLE `jshop_promotion_condition`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `promotion_id` (`promotion_id`) USING BTREE;

--
-- Indexes for table `jshop_promotion_record`
--
ALTER TABLE `jshop_promotion_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_promotion_result`
--
ALTER TABLE `jshop_promotion_result`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `promotion_id` (`promotion_id`) USING BTREE;

--
-- Indexes for table `jshop_setting`
--
ALTER TABLE `jshop_setting`
  ADD PRIMARY KEY (`skey`) USING BTREE,
  ADD KEY `skey` (`skey`) USING BTREE;

--
-- Indexes for table `jshop_ship`
--
ALTER TABLE `jshop_ship`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `id` (`id`) USING BTREE,
  ADD KEY `sort` (`sort`) USING BTREE,
  ADD KEY `sort_2` (`sort`) USING BTREE;

--
-- Indexes for table `jshop_sms`
--
ALTER TABLE `jshop_sms`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `mobile` (`mobile`) USING BTREE,
  ADD KEY `status` (`status`) USING BTREE;

--
-- Indexes for table `jshop_store`
--
ALTER TABLE `jshop_store`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_template`
--
ALTER TABLE `jshop_template`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_template_message`
--
ALTER TABLE `jshop_template_message`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_template_order`
--
ALTER TABLE `jshop_template_order`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_user`
--
ALTER TABLE `jshop_user`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_user_bankcards`
--
ALTER TABLE `jshop_user_bankcards`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_user_grade`
--
ALTER TABLE `jshop_user_grade`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `id` (`id`);

--
-- Indexes for table `jshop_user_log`
--
ALTER TABLE `jshop_user_log`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_user_point_log`
--
ALTER TABLE `jshop_user_point_log`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_user_ship`
--
ALTER TABLE `jshop_user_ship`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_user_tocash`
--
ALTER TABLE `jshop_user_tocash`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_user_token`
--
ALTER TABLE `jshop_user_token`
  ADD PRIMARY KEY (`token`) USING BTREE;

--
-- Indexes for table `jshop_user_wx`
--
ALTER TABLE `jshop_user_wx`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_weixin_author`
--
ALTER TABLE `jshop_weixin_author`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_weixin_media_message`
--
ALTER TABLE `jshop_weixin_media_message`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_weixin_menu`
--
ALTER TABLE `jshop_weixin_menu`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_weixin_message`
--
ALTER TABLE `jshop_weixin_message`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_weixin_publish`
--
ALTER TABLE `jshop_weixin_publish`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_worksheet`
--
ALTER TABLE `jshop_worksheet`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `jshop_wsdetail`
--
ALTER TABLE `jshop_wsdetail`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `jshop_addons`
--
ALTER TABLE `jshop_addons`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键';
--
-- AUTO_INCREMENT for table `jshop_advertisement`
--
ALTER TABLE `jshop_advertisement`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_advert_position`
--
ALTER TABLE `jshop_advert_position`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_article`
--
ALTER TABLE `jshop_article`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_article_type`
--
ALTER TABLE `jshop_article_type`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_backstage_notice`
--
ALTER TABLE `jshop_backstage_notice`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_balance`
--
ALTER TABLE `jshop_balance`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_bargain`
--
ALTER TABLE `jshop_bargain`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_bargain_log`
--
ALTER TABLE `jshop_bargain_log`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_bargain_record`
--
ALTER TABLE `jshop_bargain_record`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_bill_aftersales_items`
--
ALTER TABLE `jshop_bill_aftersales_items`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_bill_delivery_items`
--
ALTER TABLE `jshop_bill_delivery_items`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_bill_delivery_order_rel`
--
ALTER TABLE `jshop_bill_delivery_order_rel`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID';
--
-- AUTO_INCREMENT for table `jshop_bill_reship_items`
--
ALTER TABLE `jshop_bill_reship_items`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_brand`
--
ALTER TABLE `jshop_brand`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '品牌ID';
--
-- AUTO_INCREMENT for table `jshop_cart`
--
ALTER TABLE `jshop_cart`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_clerk`
--
ALTER TABLE `jshop_clerk`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_form`
--
ALTER TABLE `jshop_form`
  MODIFY `id` bigint(12) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_form_item`
--
ALTER TABLE `jshop_form_item`
  MODIFY `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_form_submit`
--
ALTER TABLE `jshop_form_submit`
  MODIFY `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_form_submit_detail`
--
ALTER TABLE `jshop_form_submit_detail`
  MODIFY `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_goods`
--
ALTER TABLE `jshop_goods`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品ID';
--
-- AUTO_INCREMENT for table `jshop_goods_browsing`
--
ALTER TABLE `jshop_goods_browsing`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID';
--
-- AUTO_INCREMENT for table `jshop_goods_cat`
--
ALTER TABLE `jshop_goods_cat`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_goods_collection`
--
ALTER TABLE `jshop_goods_collection`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID';
--
-- AUTO_INCREMENT for table `jshop_goods_comment`
--
ALTER TABLE `jshop_goods_comment`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_goods_grade`
--
ALTER TABLE `jshop_goods_grade`
  MODIFY `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_goods_params`
--
ALTER TABLE `jshop_goods_params`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `jshop_goods_type`
--
ALTER TABLE `jshop_goods_type`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `jshop_goods_type_spec`
--
ALTER TABLE `jshop_goods_type_spec`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `jshop_goods_type_spec_value`
--
ALTER TABLE `jshop_goods_type_spec_value`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=72;
--
-- AUTO_INCREMENT for table `jshop_hooks`
--
ALTER TABLE `jshop_hooks`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10017;
--
-- AUTO_INCREMENT for table `jshop_ietask`
--
ALTER TABLE `jshop_ietask`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_images_group`
--
ALTER TABLE `jshop_images_group`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `jshop_invoice`
--
ALTER TABLE `jshop_invoice`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_invoice_record`
--
ALTER TABLE `jshop_invoice_record`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_jobs`
--
ALTER TABLE `jshop_jobs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_label`
--
ALTER TABLE `jshop_label`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_login_log`
--
ALTER TABLE `jshop_login_log`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id';
--
-- AUTO_INCREMENT for table `jshop_logistics`
--
ALTER TABLE `jshop_logistics`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1100;
--
-- AUTO_INCREMENT for table `jshop_manage`
--
ALTER TABLE `jshop_manage`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID';
--
-- AUTO_INCREMENT for table `jshop_manage_role`
--
ALTER TABLE `jshop_manage_role`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_message`
--
ALTER TABLE `jshop_message`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_message_center`
--
ALTER TABLE `jshop_message_center`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_notice`
--
ALTER TABLE `jshop_notice`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_operation`
--
ALTER TABLE `jshop_operation`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=611;
--
-- AUTO_INCREMENT for table `jshop_operation_log`
--
ALTER TABLE `jshop_operation_log`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_order_items`
--
ALTER TABLE `jshop_order_items`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_order_log`
--
ALTER TABLE `jshop_order_log`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID';
--
-- AUTO_INCREMENT for table `jshop_pages`
--
ALTER TABLE `jshop_pages`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `jshop_pages_items`
--
ALTER TABLE `jshop_pages_items`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `jshop_pages_menu`
--
ALTER TABLE `jshop_pages_menu`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `jshop_payments`
--
ALTER TABLE `jshop_payments`
  MODIFY `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `jshop_pintuan_record`
--
ALTER TABLE `jshop_pintuan_record`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_pintuan_rule`
--
ALTER TABLE `jshop_pintuan_rule`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_products`
--
ALTER TABLE `jshop_products`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '货品ID';
--
-- AUTO_INCREMENT for table `jshop_promotion`
--
ALTER TABLE `jshop_promotion`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_promotion_condition`
--
ALTER TABLE `jshop_promotion_condition`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_promotion_record`
--
ALTER TABLE `jshop_promotion_record`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_promotion_result`
--
ALTER TABLE `jshop_promotion_result`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_ship`
--
ALTER TABLE `jshop_ship`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_sms`
--
ALTER TABLE `jshop_sms`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_store`
--
ALTER TABLE `jshop_store`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id';
--
-- AUTO_INCREMENT for table `jshop_template`
--
ALTER TABLE `jshop_template`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_template_message`
--
ALTER TABLE `jshop_template_message`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '消息ID';
--
-- AUTO_INCREMENT for table `jshop_template_order`
--
ALTER TABLE `jshop_template_order`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_user`
--
ALTER TABLE `jshop_user`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID';
--
-- AUTO_INCREMENT for table `jshop_user_bankcards`
--
ALTER TABLE `jshop_user_bankcards`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID号';
--
-- AUTO_INCREMENT for table `jshop_user_log`
--
ALTER TABLE `jshop_user_log`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id';
--
-- AUTO_INCREMENT for table `jshop_user_point_log`
--
ALTER TABLE `jshop_user_point_log`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID';
--
-- AUTO_INCREMENT for table `jshop_user_ship`
--
ALTER TABLE `jshop_user_ship`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_user_tocash`
--
ALTER TABLE `jshop_user_tocash`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID号';
--
-- AUTO_INCREMENT for table `jshop_user_wx`
--
ALTER TABLE `jshop_user_wx`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID';
--
-- AUTO_INCREMENT for table `jshop_weixin_author`
--
ALTER TABLE `jshop_weixin_author`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_weixin_media_message`
--
ALTER TABLE `jshop_weixin_media_message`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_weixin_menu`
--
ALTER TABLE `jshop_weixin_menu`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_weixin_message`
--
ALTER TABLE `jshop_weixin_message`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_weixin_publish`
--
ALTER TABLE `jshop_weixin_publish`
  MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_worksheet`
--
ALTER TABLE `jshop_worksheet`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `jshop_wsdetail`
--
ALTER TABLE `jshop_wsdetail`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于LSTM的财务因子预测选股模型LSTM (Long Short-Term Memory) 是一种特殊的循环神经网络(RNN)架构,用于处理具有长期依赖关系的序列数据。传统的RNN在处理长序列时往往会遇到梯度消失或梯度爆炸的问题,导致无法有效地捕捉长期依赖。LSTM通过引入门控机制(Gating Mechanism)和记忆单元(Memory Cell)来克服这些问题。 以下是LSTM的基本结构和主要组件: 记忆单元(Memory Cell):记忆单元是LSTM的核心,用于存储长期信息。它像一个传送带一样,在整个链上运行,只有一些小的线性交互。信息很容易地在其上保持不变。 输入门(Input Gate):输入门决定了哪些新的信息会被加入到记忆单元中。它由当前时刻的输入和上一时刻的隐藏状态共同决定。 遗忘门(Forget Gate):遗忘门决定了哪些信息会从记忆单元中被丢弃或遗忘。它也由当前时刻的输入和上一时刻的隐藏状态共同决定。 输出门(Output Gate):输出门决定了哪些信息会从记忆单元中输出到当前时刻的隐藏状态中。同样地,它也由当前时刻的输入和上一时刻的隐藏状态共同决定。 LSTM的计算过程可以大致描述为: 通过遗忘门决定从记忆单元中丢弃哪些信息。 通过输入门决定哪些新的信息会被加入到记忆单元中。 更新记忆单元的状态。 通过输出门决定哪些信息会从记忆单元中输出到当前时刻的隐藏状态中。 由于LSTM能够有效地处理长期依赖关系,它在许多序列建模任务中都取得了很好的效果,如语音识别、文本生成、机器翻译、时序预测等。
当使用phpMyAdmin导入SQL文件时,可能会遇到一些问题。根据引用,如果您的数据库大于2M,则无法直接导入。为了解决这个问题,您可以考虑以下几个方法: 1. 使用命令行导入:通过命令行工具,您可以使用MySQL命令来导入大型SQL文件。这种方法可以绕过phpMyAdmin的限制。您可以使用以下命令导入SQL文件:mysql -u username -p database_name < file.sql,其中username是您的MySQL用户名,database_name是要导入到的数据库名,file.sql是要导入的SQL文件的路径。 2. 分割SQL文件:如果您无法使用命令行,您可以尝试将SQL文件分割成更小的部分,然后逐个导入。这样可以避免导入过大的文件。 3. 修改php.ini配置文件:如果您有权限访问服务器的php.ini配置文件,可以尝试增加上传文件的大小限制。找到并修改以下两个配置项的值:upload_max_filesize和post_max_size。将它们设置为适当的大小,以容纳您的SQL文件。 同时,根据引用和引用的内容,还有可能出现其他错误。请确保您的SQL文件的语法正确,并且与您的MySQL服务器版本兼容。如果遇到语法错误,请参考MySQL服务器文档查找正确的语法和用法。 希望以上方法对您有所帮助。如果您遇到其他问题,请提供更多详细信息,以便我能够更准确地为您提供帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [修改phpMyAdmin导入SQL文件的大小限制](https://download.csdn.net/download/weixin_38710557/14833172)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [求助,phpmyadmin导入sql文件提示1064错误](https://blog.csdn.net/weixin_35990295/article/details/116214022)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值