DROP TABLE IF EXISTS `tb_coupon_log`;
CREATE TABLE `tb_coupon_log`
(
    `id`                 int(11) NOT NULL AUTO_INCREMENT,
    `coupon_id`          int(11) NULL DEFAULT NULL COMMENT '优惠券id',
    `content`            varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容',
    `create_time`        datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `create_sys_user_id` int(11) NULL DEFAULT NULL COMMENT '创建人',
    `coupon_name`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '优惠券名称',
    `coupon_picture`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '优惠券图片',
    `end_date`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '有效期天数',
    `min_money`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '优惠券可使用订单最低金额',
    `goods_type`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '优惠券可使用商品类型',
    `need_integral`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '购买此优惠券需要积分数',
    `money`              decimal(10, 2) NULL DEFAULT NULL COMMENT '优惠券金额',
    `shop_id`            int(11) NULL DEFAULT NULL COMMENT '所属商铺 0为总后台发布的优惠券',
    `state`              int(11) NULL DEFAULT NULL COMMENT '状态:0-待审核，1-发布，2-撤销',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;