123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837 |
- -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
- --
- -- Host: 127.0.0.1 Database: litemall
- -- ------------------------------------------------------
- -- Server version 5.7.21-log
- /*!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 utf8 */;
- /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
- /*!40103 SET TIME_ZONE='+00:00' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
- --
- -- Table structure for table `litemall_ad`
- --
- DROP TABLE IF EXISTS `litemall_ad`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_ad` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(63) NOT NULL DEFAULT '' COMMENT '广告标题',
- `link` varchar(255) NOT NULL DEFAULT '' COMMENT '所广告的商品页面或者活动页面链接地址',
- `url` varchar(255) NOT NULL COMMENT '广告宣传图片',
- `position` tinyint(3) DEFAULT '1' COMMENT '广告位置:1则是首页',
- `content` varchar(255) DEFAULT '' COMMENT '活动内容',
- `start_time` datetime DEFAULT NULL COMMENT '广告开始时间',
- `end_time` datetime DEFAULT NULL COMMENT '广告结束时间',
- `enabled` tinyint(1) DEFAULT '0' COMMENT '是否启动',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `enabled` (`enabled`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='广告表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_address`
- --
- DROP TABLE IF EXISTS `litemall_address`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_address` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(63) NOT NULL DEFAULT '' COMMENT '收货人名称',
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
- `province` varchar(63) NOT NULL COMMENT '行政区域表的省ID',
- `city` varchar(63) NOT NULL COMMENT '行政区域表的市ID',
- `county` varchar(63) NOT NULL COMMENT '行政区域表的区县ID',
- `address_detail` varchar(127) NOT NULL DEFAULT '' COMMENT '详细收货地址',
- `area_code` char(6) DEFAULT NULL COMMENT '地区编码',
- `postal_code` char(6) DEFAULT NULL COMMENT '邮政编码',
- `tel` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号码',
- `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否默认地址',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `user_id` (`user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='收货地址表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_admin`
- --
- DROP TABLE IF EXISTS `litemall_admin`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_admin` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `username` varchar(63) NOT NULL DEFAULT '' COMMENT '管理员名称',
- `password` varchar(63) NOT NULL DEFAULT '' COMMENT '管理员密码',
- `last_login_ip` varchar(63) DEFAULT '' COMMENT '最近一次登录IP地址',
- `last_login_time` datetime DEFAULT NULL COMMENT '最近一次登录时间',
- `avatar` varchar(255) DEFAULT '''' COMMENT '头像图片',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- `role_ids` varchar(127) DEFAULT '[]' COMMENT '角色列表',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='管理员表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_aftersale`
- --
- DROP TABLE IF EXISTS `litemall_aftersale`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_aftersale` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `aftersale_sn` varchar(63) DEFAULT NULL COMMENT '售后编号',
- `order_id` int(11) NOT NULL COMMENT '订单ID',
- `user_id` int(11) NOT NULL COMMENT '用户ID',
- `type` smallint(6) DEFAULT '0' COMMENT '售后类型,0是未收货退款,1是已收货(无需退货)退款,2用户退货退款',
- `reason` varchar(31) DEFAULT '' COMMENT '退款原因',
- `amount` decimal(10,2) DEFAULT '0.00' COMMENT '退款金额',
- `pictures` varchar(1023) DEFAULT '[]' COMMENT '退款凭证图片链接数组',
- `comment` varchar(511) DEFAULT '' COMMENT '退款说明',
- `status` smallint(6) DEFAULT '0' COMMENT '售后状态,0是可申请,1是用户已申请,2是管理员审核通过,3是管理员退款成功,4是管理员审核拒绝,5是用户已取消',
- `handle_time` datetime DEFAULT NULL COMMENT '管理员操作时间',
- `add_time` datetime DEFAULT NULL COMMENT '添加时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='售后表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_brand`
- --
- DROP TABLE IF EXISTS `litemall_brand`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_brand` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌商名称',
- `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌商简介',
- `pic_url` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌商页的品牌商图片',
- `sort_order` tinyint(3) DEFAULT '50',
- `floor_price` decimal(10,2) DEFAULT '0.00' COMMENT '品牌商的商品低价,仅用于页面展示',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1046003 DEFAULT CHARSET=utf8mb4 COMMENT='品牌商表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_cart`
- --
- DROP TABLE IF EXISTS `litemall_cart`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_cart` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) DEFAULT NULL COMMENT '用户表的用户ID',
- `goods_id` int(11) DEFAULT NULL COMMENT '商品表的商品ID',
- `goods_sn` varchar(63) DEFAULT NULL COMMENT '商品编号',
- `goods_name` varchar(127) DEFAULT NULL COMMENT '商品名称',
- `product_id` int(11) DEFAULT NULL COMMENT '商品货品表的货品ID',
- `price` decimal(10,2) DEFAULT '0.00' COMMENT '商品货品的价格',
- `number` smallint(5) DEFAULT '0' COMMENT '商品货品的数量',
- `specifications` varchar(1023) DEFAULT NULL COMMENT '商品规格值列表,采用JSON数组格式',
- `checked` tinyint(1) DEFAULT '1' COMMENT '购物车中商品是否选择状态',
- `pic_url` varchar(255) DEFAULT NULL COMMENT '商品图片或者商品货品图片',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='购物车商品表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_category`
- --
- DROP TABLE IF EXISTS `litemall_category`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_category` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(63) NOT NULL DEFAULT '' COMMENT '类目名称',
- `keywords` varchar(1023) NOT NULL DEFAULT '' COMMENT '类目关键字,以JSON数组格式',
- `desc` varchar(255) DEFAULT '' COMMENT '类目广告语介绍',
- `pid` int(11) NOT NULL DEFAULT '0' COMMENT '父类目ID',
- `icon_url` varchar(255) DEFAULT '' COMMENT '类目图标',
- `pic_url` varchar(255) DEFAULT '' COMMENT '类目图片',
- `level` varchar(255) DEFAULT 'L1',
- `sort_order` tinyint(3) DEFAULT '50' COMMENT '排序',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `parent_id` (`pid`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1036007 DEFAULT CHARSET=utf8mb4 COMMENT='类目表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_collect`
- --
- DROP TABLE IF EXISTS `litemall_collect`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_collect` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
- `value_id` int(11) NOT NULL DEFAULT '0' COMMENT '如果type=0,则是商品ID;如果type=1,则是专题ID',
- `type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '收藏类型,如果type=0,则是商品ID;如果type=1,则是专题ID',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `user_id` (`user_id`),
- KEY `goods_id` (`value_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收藏表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_comment`
- --
- DROP TABLE IF EXISTS `litemall_comment`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_comment` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `value_id` int(11) NOT NULL DEFAULT '0' COMMENT '如果type=0,则是商品评论;如果是type=1,则是专题评论。',
- `type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '评论类型,如果type=0,则是商品评论;如果是type=1,则是专题评论;',
- `content` varchar(1023) DEFAULT '' COMMENT '评论内容',
- `admin_content` varchar(511) DEFAULT '' COMMENT '管理员回复内容',
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
- `has_picture` tinyint(1) DEFAULT '0' COMMENT '是否含有图片',
- `pic_urls` varchar(1023) DEFAULT NULL COMMENT '图片地址列表,采用JSON数组格式',
- `star` smallint(6) DEFAULT '1' COMMENT '评分, 1-5',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `id_value` (`value_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1012 DEFAULT CHARSET=utf8mb4 COMMENT='评论表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_coupon`
- --
- DROP TABLE IF EXISTS `litemall_coupon`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_coupon` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(63) NOT NULL COMMENT '优惠券名称',
- `desc` varchar(127) DEFAULT '' COMMENT '优惠券介绍,通常是显示优惠券使用限制文字',
- `tag` varchar(63) DEFAULT '' COMMENT '优惠券标签,例如新人专用',
- `total` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券数量,如果是0,则是无限量',
- `discount` decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额,',
- `min` decimal(10,2) DEFAULT '0.00' COMMENT '最少消费金额才能使用优惠券。',
- `limit` smallint(6) DEFAULT '1' COMMENT '用户领券限制数量,如果是0,则是不限制;默认是1,限领一张.',
- `type` smallint(6) DEFAULT '0' COMMENT '优惠券赠送类型,如果是0则通用券,用户领取;如果是1,则是注册赠券;如果是2,则是优惠券码兑换;',
- `status` smallint(6) DEFAULT '0' COMMENT '优惠券状态,如果是0则是正常可用;如果是1则是过期; 如果是2则是下架。',
- `goods_type` smallint(6) DEFAULT '0' COMMENT '商品限制类型,如果0则全商品,如果是1则是类目限制,如果是2则是商品限制。',
- `goods_value` varchar(1023) DEFAULT '[]' COMMENT '商品限制值,goods_type如果是0则空集合,如果是1则是类目集合,如果是2则是商品集合。',
- `code` varchar(63) DEFAULT NULL COMMENT '优惠券兑换码',
- `time_type` smallint(6) DEFAULT '0' COMMENT '有效时间限制,如果是0,则基于领取时间的有效天数days;如果是1,则start_time和end_time是优惠券有效期;',
- `days` smallint(6) DEFAULT '0' COMMENT '基于领取时间的有效天数days。',
- `start_time` datetime DEFAULT NULL COMMENT '使用券开始时间',
- `end_time` datetime DEFAULT NULL COMMENT '使用券截至时间',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `code` (`code`)
- ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='优惠券信息及规则表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_coupon_user`
- --
- DROP TABLE IF EXISTS `litemall_coupon_user`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_coupon_user` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL COMMENT '用户ID',
- `coupon_id` int(11) NOT NULL COMMENT '优惠券ID',
- `status` smallint(6) DEFAULT '0' COMMENT '使用状态, 如果是0则未使用;如果是1则已使用;如果是2则已过期;如果是3则已经下架;',
- `used_time` datetime DEFAULT NULL COMMENT '使用时间',
- `start_time` datetime DEFAULT NULL COMMENT '有效期开始时间',
- `end_time` datetime DEFAULT NULL COMMENT '有效期截至时间',
- `order_id` int(11) DEFAULT NULL COMMENT '订单ID',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='优惠券用户使用表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_feedback`
- --
- DROP TABLE IF EXISTS `litemall_feedback`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_feedback` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
- `username` varchar(63) NOT NULL DEFAULT '' COMMENT '用户名称',
- `mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号',
- `feed_type` varchar(63) NOT NULL DEFAULT '' COMMENT '反馈类型',
- `content` varchar(1023) NOT NULL COMMENT '反馈内容',
- `status` int(3) NOT NULL DEFAULT '0' COMMENT '状态',
- `has_picture` tinyint(1) DEFAULT '0' COMMENT '是否含有图片',
- `pic_urls` varchar(1023) DEFAULT NULL COMMENT '图片地址列表,采用JSON数组格式',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `id_value` (`status`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='意见反馈表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_footprint`
- --
- DROP TABLE IF EXISTS `litemall_footprint`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_footprint` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
- `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '浏览商品ID',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户浏览足迹表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_goods`
- --
- DROP TABLE IF EXISTS `litemall_goods`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_goods` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `goods_sn` varchar(63) NOT NULL DEFAULT '' COMMENT '商品编号',
- `name` varchar(127) NOT NULL DEFAULT '' COMMENT '商品名称',
- `category_id` int(11) DEFAULT '0' COMMENT '商品所属类目ID',
- `brand_id` int(11) DEFAULT '0',
- `gallery` varchar(1023) DEFAULT NULL COMMENT '商品宣传图片列表,采用JSON数组格式',
- `keywords` varchar(255) DEFAULT '' COMMENT '商品关键字,采用逗号间隔',
- `brief` varchar(255) DEFAULT '' COMMENT '商品简介',
- `is_on_sale` tinyint(1) DEFAULT '1' COMMENT '是否上架',
- `sort_order` smallint(4) DEFAULT '100',
- `pic_url` varchar(255) DEFAULT NULL COMMENT '商品页面商品图片',
- `share_url` varchar(255) DEFAULT NULL COMMENT '商品分享海报',
- `is_new` tinyint(1) DEFAULT '0' COMMENT '是否新品首发,如果设置则可以在新品首发页面展示',
- `is_hot` tinyint(1) DEFAULT '0' COMMENT '是否人气推荐,如果设置则可以在人气推荐页面展示',
- `unit` varchar(31) DEFAULT '’件‘' COMMENT '商品单位,例如件、盒',
- `counter_price` decimal(10,2) DEFAULT '0.00' COMMENT '专柜价格',
- `retail_price` decimal(10,2) DEFAULT '100000.00' COMMENT '零售价格',
- `detail` text COMMENT '商品详细介绍,是富文本格式',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `goods_sn` (`goods_sn`),
- KEY `cat_id` (`category_id`),
- KEY `brand_id` (`brand_id`),
- KEY `sort_order` (`sort_order`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1181004 DEFAULT CHARSET=utf8mb4 COMMENT='商品基本信息表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_goods_attribute`
- --
- DROP TABLE IF EXISTS `litemall_goods_attribute`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_goods_attribute` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
- `attribute` varchar(255) NOT NULL COMMENT '商品参数名称',
- `value` varchar(255) NOT NULL COMMENT '商品参数值',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `goods_id` (`goods_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=877 DEFAULT CHARSET=utf8mb4 COMMENT='商品参数表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_goods_product`
- --
- DROP TABLE IF EXISTS `litemall_goods_product`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_goods_product` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
- `specifications` varchar(1023) NOT NULL COMMENT '商品规格值列表,采用JSON数组格式',
- `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品货品价格',
- `number` int(11) NOT NULL DEFAULT '0' COMMENT '商品货品数量',
- `url` varchar(125) DEFAULT NULL COMMENT '商品货品图片',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `goods_id` (`goods_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=utf8mb4 COMMENT='商品货品表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_goods_specification`
- --
- DROP TABLE IF EXISTS `litemall_goods_specification`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_goods_specification` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
- `specification` varchar(255) NOT NULL DEFAULT '' COMMENT '商品规格名称',
- `value` varchar(255) NOT NULL DEFAULT '' COMMENT '商品规格值',
- `pic_url` varchar(255) NOT NULL DEFAULT '' COMMENT '商品规格图片',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `goods_id` (`goods_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COMMENT='商品规格表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_groupon`
- --
- DROP TABLE IF EXISTS `litemall_groupon`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_groupon` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `order_id` int(11) NOT NULL COMMENT '关联的订单ID',
- `groupon_id` int(11) DEFAULT '0' COMMENT '如果是开团用户,则groupon_id是0;如果是参团用户,则groupon_id是团购活动ID',
- `rules_id` int(11) NOT NULL COMMENT '团购规则ID,关联litemall_groupon_rules表ID字段',
- `user_id` int(11) NOT NULL COMMENT '用户ID',
- `share_url` varchar(255) DEFAULT NULL COMMENT '团购分享图片地址',
- `creator_user_id` int(11) NOT NULL COMMENT '开团用户ID',
- `creator_user_time` datetime DEFAULT NULL COMMENT '开团时间',
- `status` smallint(6) DEFAULT '0' COMMENT '团购活动状态,开团未支付则0,开团中则1,开团失败则2',
- `add_time` datetime NOT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='团购活动表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_groupon_rules`
- --
- DROP TABLE IF EXISTS `litemall_groupon_rules`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_groupon_rules` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `goods_id` int(11) NOT NULL COMMENT '商品表的商品ID',
- `goods_name` varchar(127) NOT NULL COMMENT '商品名称',
- `pic_url` varchar(255) DEFAULT NULL COMMENT '商品图片或者商品货品图片',
- `discount` decimal(63,0) NOT NULL COMMENT '优惠金额',
- `discount_member` int(11) NOT NULL COMMENT '达到优惠条件的人数',
- `expire_time` datetime DEFAULT NULL COMMENT '团购过期时间',
- `status` smallint(6) DEFAULT '0' COMMENT '团购规则状态,正常上线则0,到期自动下线则1,管理手动下线则2',
- `add_time` datetime NOT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `goods_id` (`goods_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='团购规则表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_issue`
- --
- DROP TABLE IF EXISTS `litemall_issue`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_issue` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `question` varchar(255) DEFAULT NULL COMMENT '问题标题',
- `answer` varchar(255) DEFAULT NULL COMMENT '问题答案',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='常见问题表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_keyword`
- --
- DROP TABLE IF EXISTS `litemall_keyword`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_keyword` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `keyword` varchar(127) NOT NULL DEFAULT '' COMMENT '关键字',
- `url` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字的跳转链接',
- `is_hot` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是热门关键字',
- `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是默认关键字',
- `sort_order` int(11) NOT NULL DEFAULT '100' COMMENT '排序',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='关键字表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_log`
- --
- DROP TABLE IF EXISTS `litemall_log`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_log` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `admin` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '管理员',
- `ip` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '管理员地址',
- `type` int(11) DEFAULT NULL COMMENT '操作分类',
- `action` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '操作动作',
- `status` tinyint(1) DEFAULT NULL COMMENT '操作状态',
- `result` varchar(127) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '操作结果,或者成功消息,或者失败消息',
- `comment` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '补充信息',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='操作日志表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_notice`
- --
- DROP TABLE IF EXISTS `litemall_notice`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_notice` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `title` varchar(63) DEFAULT NULL COMMENT '通知标题',
- `content` varchar(511) DEFAULT NULL COMMENT '通知内容',
- `admin_id` int(11) DEFAULT '0' COMMENT '创建通知的管理员ID,如果是系统内置通知则是0.',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='通知表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_notice_admin`
- --
- DROP TABLE IF EXISTS `litemall_notice_admin`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_notice_admin` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `notice_id` int(11) DEFAULT NULL COMMENT '通知ID',
- `notice_title` varchar(63) DEFAULT NULL COMMENT '通知标题',
- `admin_id` int(11) DEFAULT NULL COMMENT '接收通知的管理员ID',
- `read_time` datetime DEFAULT NULL COMMENT '阅读时间,如果是NULL则是未读状态',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='通知管理员表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_order`
- --
- DROP TABLE IF EXISTS `litemall_order`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_order` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL COMMENT '用户表的用户ID',
- `order_sn` varchar(63) NOT NULL COMMENT '订单编号',
- `order_status` smallint(6) NOT NULL COMMENT '订单状态',
- `aftersale_status` smallint(6) DEFAULT '0' COMMENT '售后状态,0是可申请,1是用户已申请,2是管理员审核通过,3是管理员退款成功,4是管理员审核拒绝,5是用户已取消',
- `consignee` varchar(63) NOT NULL COMMENT '收货人名称',
- `mobile` varchar(63) NOT NULL COMMENT '收货人手机号',
- `address` varchar(127) NOT NULL COMMENT '收货具体地址',
- `message` varchar(512) NOT NULL DEFAULT '' COMMENT '用户订单留言',
- `goods_price` decimal(10,2) NOT NULL COMMENT '商品总费用',
- `freight_price` decimal(10,2) NOT NULL COMMENT '配送费用',
- `coupon_price` decimal(10,2) NOT NULL COMMENT '优惠券减免',
- `integral_price` decimal(10,2) NOT NULL COMMENT '用户积分减免',
- `groupon_price` decimal(10,2) NOT NULL COMMENT '团购优惠价减免',
- `order_price` decimal(10,2) NOT NULL COMMENT '订单费用, = goods_price + freight_price - coupon_price',
- `actual_price` decimal(10,2) NOT NULL COMMENT '实付费用, = order_price - integral_price',
- `pay_id` varchar(63) DEFAULT NULL COMMENT '微信付款编号',
- `pay_time` datetime DEFAULT NULL COMMENT '微信付款时间',
- `ship_sn` varchar(63) DEFAULT NULL COMMENT '发货编号',
- `ship_channel` varchar(63) DEFAULT NULL COMMENT '发货快递公司',
- `ship_time` datetime DEFAULT NULL COMMENT '发货开始时间',
- `refund_amount` decimal(10,2) DEFAULT NULL COMMENT '实际退款金额,(有可能退款金额小于实际支付金额)',
- `refund_type` varchar(63) DEFAULT NULL COMMENT '退款方式',
- `refund_content` varchar(127) DEFAULT NULL COMMENT '退款备注',
- `refund_time` datetime DEFAULT NULL COMMENT '退款时间',
- `confirm_time` datetime DEFAULT NULL COMMENT '用户确认收货时间',
- `comments` smallint(6) DEFAULT '0' COMMENT '待评价订单商品数量',
- `end_time` datetime DEFAULT NULL COMMENT '订单关闭时间',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_order_goods`
- --
- DROP TABLE IF EXISTS `litemall_order_goods`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_order_goods` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单表的订单ID',
- `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
- `goods_name` varchar(127) NOT NULL DEFAULT '' COMMENT '商品名称',
- `goods_sn` varchar(63) NOT NULL DEFAULT '' COMMENT '商品编号',
- `product_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品货品表的货品ID',
- `number` smallint(5) NOT NULL DEFAULT '0' COMMENT '商品货品的购买数量',
- `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品货品的售价',
- `specifications` varchar(1023) NOT NULL COMMENT '商品货品的规格列表',
- `pic_url` varchar(255) NOT NULL DEFAULT '' COMMENT '商品货品图片或者商品图片',
- `comment` int(11) DEFAULT '0' COMMENT '订单商品评论,如果是-1,则超期不能评价;如果是0,则可以评价;如果其他值,则是comment表里面的评论ID。',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `order_id` (`order_id`),
- KEY `goods_id` (`goods_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单商品表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_permission`
- --
- DROP TABLE IF EXISTS `litemall_permission`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_permission` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `role_id` int(11) DEFAULT NULL COMMENT '角色ID',
- `permission` varchar(63) DEFAULT NULL COMMENT '权限',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COMMENT='权限表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_region`
- --
- DROP TABLE IF EXISTS `litemall_region`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_region` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `pid` int(11) NOT NULL DEFAULT '0' COMMENT '行政区域父ID,例如区县的pid指向市,市的pid指向省,省的pid则是0',
- `name` varchar(120) NOT NULL DEFAULT '' COMMENT '行政区域名称',
- `type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '行政区域类型,如如1则是省, 如果是2则是市,如果是3则是区县',
- `code` int(11) NOT NULL DEFAULT '0' COMMENT '行政区域编码',
- PRIMARY KEY (`id`),
- KEY `parent_id` (`pid`),
- KEY `region_type` (`type`),
- KEY `agency_id` (`code`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3232 DEFAULT CHARSET=utf8mb4 COMMENT='行政区域表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_role`
- --
- DROP TABLE IF EXISTS `litemall_role`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_role` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(63) NOT NULL COMMENT '角色名称',
- `desc` varchar(1023) DEFAULT NULL COMMENT '角色描述',
- `enabled` tinyint(1) DEFAULT '1' COMMENT '是否启用',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- UNIQUE KEY `name_UNIQUE` (`name`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='角色表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_search_history`
- --
- DROP TABLE IF EXISTS `litemall_search_history`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_search_history` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL COMMENT '用户表的用户ID',
- `keyword` varchar(63) NOT NULL COMMENT '搜索关键字',
- `from` varchar(63) NOT NULL DEFAULT '' COMMENT '搜索来源,如pc、wx、app',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='搜索历史表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_storage`
- --
- DROP TABLE IF EXISTS `litemall_storage`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_storage` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `key` varchar(63) NOT NULL COMMENT '文件的唯一索引',
- `name` varchar(255) NOT NULL COMMENT '文件名',
- `type` varchar(20) NOT NULL COMMENT '文件类型',
- `size` int(11) NOT NULL COMMENT '文件大小',
- `url` varchar(255) DEFAULT NULL COMMENT '文件访问链接',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `key` (`key`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件存储表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_system`
- --
- DROP TABLE IF EXISTS `litemall_system`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_system` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `key_name` varchar(255) NOT NULL COMMENT '系统配置名',
- `key_value` varchar(255) NOT NULL COMMENT '系统配置值',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='系统配置表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_topic`
- --
- DROP TABLE IF EXISTS `litemall_topic`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_topic` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `title` varchar(255) NOT NULL DEFAULT '''' COMMENT '专题标题',
- `subtitle` varchar(255) DEFAULT '''' COMMENT '专题子标题',
- `content` text COMMENT '专题内容,富文本格式',
- `price` decimal(10,2) DEFAULT '0.00' COMMENT '专题相关商品最低价',
- `read_count` varchar(255) DEFAULT '1k' COMMENT '专题阅读量',
- `pic_url` varchar(255) DEFAULT '' COMMENT '专题图片',
- `sort_order` int(11) DEFAULT '100' COMMENT '排序',
- `goods` varchar(1023) DEFAULT '' COMMENT '专题相关商品,采用JSON数组格式',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- KEY `topic_id` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=319 DEFAULT CHARSET=utf8mb4 COMMENT='专题表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `litemall_user`
- --
- DROP TABLE IF EXISTS `litemall_user`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `litemall_user` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `username` varchar(63) NOT NULL COMMENT '用户名称',
- `password` varchar(63) NOT NULL DEFAULT '' COMMENT '用户密码',
- `gender` tinyint(3) NOT NULL DEFAULT '0' COMMENT '性别:0 未知, 1男, 1 女',
- `birthday` date DEFAULT NULL COMMENT '生日',
- `last_login_time` datetime DEFAULT NULL COMMENT '最近一次登录时间',
- `last_login_ip` varchar(63) NOT NULL DEFAULT '' COMMENT '最近一次登录IP地址',
- `user_level` tinyint(3) DEFAULT '0' COMMENT '0 普通用户,1 VIP用户,2 高级VIP用户',
- `nickname` varchar(63) NOT NULL DEFAULT '' COMMENT '用户昵称或网络名称',
- `mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '用户手机号码',
- `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '用户头像图片',
- `weixin_openid` varchar(63) NOT NULL DEFAULT '' COMMENT '微信登录openid',
- `session_key` varchar(100) NOT NULL DEFAULT '' COMMENT '微信登录会话KEY',
- `status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0 可用, 1 禁用, 2 注销',
- `add_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
- PRIMARY KEY (`id`),
- UNIQUE KEY `user_name` (`username`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!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 */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
- -- Dump completed on 2019-12-16 23:12:57
|