Coupon 商品优惠券 API

##coupon_temp 优惠券模板

CREATE TABLE `coupon_temp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `utime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `type` tinyint(1) NOT NULL,
  `metadata` varchar(11) DEFAULT NULL,
  `amount_available` bigint(16) DEFAULT NULL,
  `amount_off` bigint(16) DEFAULT NULL,
  `percent_off` bigint(16) DEFAULT NULL,
  `max_circulation` int(8) DEFAULT NULL,
  `max_user_circulation` int(8) DEFAULT NULL,
  `duration` bigint(16) DEFAULT NULL,
  `name` varchar(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100003 DEFAULT CHARSET=utf8mb4;