Commit cd24f3d6 authored by Junling Bu's avatar Junling Bu
Browse files

数据库调整: 支持兑换码优惠券

parent 570fff52
...@@ -98,10 +98,20 @@ UNLOCK TABLES; ...@@ -98,10 +98,20 @@ UNLOCK TABLES;
   
LOCK TABLES `litemall_coupon` WRITE; LOCK TABLES `litemall_coupon` WRITE;
/*!40000 ALTER TABLE `litemall_coupon` DISABLE KEYS */; /*!40000 ALTER TABLE `litemall_coupon` DISABLE KEYS */;
INSERT INTO `litemall_coupon` VALUES (1,'限时满减券','全场通用','无限制',0,5.00,99.00,1,0,0,0,'[]',10,NULL,NULL,'2018-02-01 00:00:00','2018-02-01 00:00:00',0),(2,'限时满减券','全场通用','无限制',0,10.00,99.00,1,0,0,0,'[]',10,NULL,NULL,'2018-02-01 00:00:00','2018-02-01 00:00:00',0),(3,'新用户优惠券','全场通用','无限制',0,10.00,99.00,1,1,0,0,'[]',10,NULL,NULL,'2018-02-01 00:00:00','2018-02-01 00:00:00',0); INSERT INTO `litemall_coupon` VALUES (1,'限时满减券','全场通用','无限制',0,5.00,99.00,1,0,0,0,'[]',NULL,0,10,NULL,NULL,'2018-02-01 00:00:00','2018-02-01 00:00:00',0),(2,'限时满减券','全场通用','无限制',0,10.00,99.00,1,0,0,0,'[]',NULL,0,10,NULL,NULL,'2018-02-01 00:00:00','2018-02-01 00:00:00',0),(3,'新用户优惠券','全场通用','无限制',0,10.00,99.00,1,1,0,0,'[]',NULL,0,10,NULL,NULL,'2018-02-01 00:00:00','2018-02-01 00:00:00',0),(8,'可兑换优惠券','全场通用','仅兑换领券',0,15.00,99.00,1,2,0,0,'[]','DC6FF8SE',0,7,NULL,NULL,'2018-12-23 09:29:57','2018-12-23 09:29:57',0);
/*!40000 ALTER TABLE `litemall_coupon` ENABLE KEYS */; /*!40000 ALTER TABLE `litemall_coupon` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
   
--
-- Dumping data for table `litemall_coupon_user`
--
LOCK TABLES `litemall_coupon_user` WRITE;
/*!40000 ALTER TABLE `litemall_coupon_user` DISABLE KEYS */;
INSERT INTO `litemall_coupon_user` VALUES (2,1,8,0,NULL,NULL,'2018-12-23 09:30:14','2018-12-23 09:30:14',0);
/*!40000 ALTER TABLE `litemall_coupon_user` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Dumping data for table `litemall_feedback` -- Dumping data for table `litemall_feedback`
-- --
...@@ -62,7 +62,7 @@ CREATE TABLE `litemall_address` ( ...@@ -62,7 +62,7 @@ CREATE TABLE `litemall_address` (
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除', `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `user_id` (`user_id`) KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收货地址表'; ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='收货地址表';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
...@@ -219,11 +219,13 @@ CREATE TABLE `litemall_coupon` ( ...@@ -219,11 +219,13 @@ CREATE TABLE `litemall_coupon` (
`discount` decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额,', `discount` decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额,',
`min` decimal(10,2) DEFAULT '0.00' COMMENT '最少消费金额才能使用优惠券。', `min` decimal(10,2) DEFAULT '0.00' COMMENT '最少消费金额才能使用优惠券。',
`limit` smallint(6) DEFAULT '1' COMMENT '用户领券限制数量,如果是0,则是不限制;默认是1,限领一张.', `limit` smallint(6) DEFAULT '1' COMMENT '用户领券限制数量,如果是0,则是不限制;默认是1,限领一张.',
`type` smallint(6) DEFAULT '0' COMMENT '优惠券赠送类型,如果是0则通用券,用户领取;如果是1,则是注册赠券;', `type` smallint(6) DEFAULT '0' COMMENT '优惠券赠送类型,如果是0则通用券,用户领取;如果是1,则是注册赠券;如果是2,则是优惠券码兑换;',
`status` 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_type` smallint(6) DEFAULT '0' COMMENT '商品限制类型,如果0则全商品,如果是1则是类目限制,如果是2则是商品限制。',
`goods_value` varchar(1023) DEFAULT '[]' COMMENT '商品限制值,goods_type如果是0则空集合,如果是1则是类目集合,如果是2则是商品集合。', `goods_value` varchar(1023) DEFAULT '[]' COMMENT '商品限制值,goods_type如果是0则空集合,如果是1则是类目集合,如果是2则是商品集合。',
`days` smallint(6) DEFAULT '0' COMMENT '如果是0,则start_time和end_time是优惠券有效期;如果是非0,则基于领取时间的有效天数。', `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 '使用券开始时间', `start_time` datetime DEFAULT NULL COMMENT '使用券开始时间',
`end_time` datetime DEFAULT NULL COMMENT '使用券截至时间', `end_time` datetime DEFAULT NULL COMMENT '使用券截至时间',
`add_time` datetime DEFAULT NULL COMMENT '创建时间', `add_time` datetime DEFAULT NULL COMMENT '创建时间',
...@@ -246,7 +248,7 @@ CREATE TABLE `litemall_coupon_user` ( ...@@ -246,7 +248,7 @@ CREATE TABLE `litemall_coupon_user` (
`coupon_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则已经下架;', `status` smallint(6) DEFAULT '0' COMMENT '使用状态, 如果是0则未使用;如果是1则已使用;如果是2则已过期;如果是3则已经下架;',
`used_time` datetime DEFAULT NULL COMMENT '使用时间', `used_time` datetime DEFAULT NULL COMMENT '使用时间',
`order_id` int(11) DEFAULT '0' COMMENT '订单ID', `order_id` int(11) DEFAULT NULL COMMENT '订单ID',
`add_time` datetime DEFAULT NULL COMMENT '创建时间', `add_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除', `deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment