准备工作:新建表tb_coupon
/*
Navicat Premium Data Transfer
Source Server : root@localhost
Source Server Type : MySQL
Source Server Version : 50527
Source Host : localhost:3306
Source Schema : leyou
Target Server Type : MySQL
Target Server Version : 50527
File Encoding : 65001
Date: 22/05/2019 18:03:38
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for tb_coupon
-- ----------------------------
DROP TABLE IF EXISTS `tb_coupon`;
CREATE TABLE `tb_coupon` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '优惠卷id',
`name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠卷名称',
`type` enum('1','2','3') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠卷类型,1、抵扣 2、折扣(打折)',
`condition` bigint(20