-- Deploy gaia:sms_2016_07_22_init_sms_model to mysql

/*!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 */;
/*!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 */;
BEGIN;

# Dump of table sms_smstemplate
# ------------------------------------------------------------

DROP TABLE IF EXISTS `sms_smstemplate`;

CREATE TABLE `sms_smstemplate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content` varchar(500) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `sms_smstemplate` WRITE;
/*!40000 ALTER TABLE `sms_smstemplate` DISABLE KEYS */;

INSERT INTO `sms_smstemplate` (`id`, `content`)
VALUES
	(1,'{price}元美券已放入您账户！请用领券手机号登陆查看，更美APP下载地址：http://dwz.cn/2e23Hq，退订回复TD'),
	(2,'{seckill}还有3分钟就开始啦，还不马上抢！美购链接：{TIME}，退订回复TD'),
	(3,'您的短信验证码为：{code}，有效期：15分钟。欢迎加入更美APP，全球最大医美平台，让变美简单又放心。'),
	(4,'您购买的美购“{service}”，订单号{order_id}已退款。退款时间{time}，退款金额请通过您使用的支付渠道进行查询。更美：4008113069转6666'),
	(5,'您好，您在更美APP上提交了免费医美定制，48小时内将与您通过私信进一步沟通，祝您越来越美丽！'),
	(6,'您购买的美购“{service}”，订单号{order_id}验证成功，验证时间为{time}。更美客服：4008113069转6666（工作时间为10:00-19:00）别忘了分享日记哦！'),
	(7,'美购“{service}”支付成功！订单号{order_id}，验证码{code}。到院还需支付{price}元。联系医生：4008113069转{phone_number}'),
	(8,'您购买的美购“{service}”，订单号{order_id}已退款。退款时间{time}，退款金额{price}。更美：4008113069转6666'),
	(9,'您购买的美购“{service}”，订单号{order_id}验证成功，验证时间为{time}。更美客服：4008113069转6666（工作时间为10:00-19:00）别忘了分享日记哦！'),
	(10,'您好，今天有{number}单待处理的用户退款申请，请登录最新的更美医生版或在医生版网页处理，用户申请后超过48小时不处理会视为您已经同意退款\n'),
	(11,'亲爱的更美用户，很抱歉通知您，您申请的{doctor_name}医生，时间为{time}的预约被医生取消，原因为{reason}，请选择别的时间段预约'),
	(12,'{doctor_name}医生您好，今日您有{number}个未处理的预约请求，请登录更美医生网站处理'),
	(13,'您好，用户{user_name}申请的时间为{time} ，“{service}”项目的预约被用户取消，该时段可安排其它预约'),
	(14,'你申请的{doctor_name}医生的预约已经确认，时间：{time}。请按时到院'),
	(15,'你预定的美购“{service}”又上架啦！请登录更美APP查看！'),
	(16,'您好，您有{number}条未读私信，请下载最新的更美医生版APP回复。'),
	(17,'你的订单{order_id}将于10分钟后失效，请尽快支付！'),
	(18,'你关注的{name}专家的{service}项目在更美上架啦，快去看看吧，更美APP下载地址: http://dwz.cn/2e23Hq'),
	(19,'您预定的美购{service}已经上架啦，快打开app购买吧！{ser_link}'),
	(20,'您有{number}张美券将于3天后过期，快点预约去体验吧！更美APP下载地址: http://dwz.cn/2e23Hq'),
	(21,'距离你上次购买{service}项目已经{number}个月了，再做一次效果会更好哦，点击再次购买～更美APP下载地址: http://dwz.cn/2e23Hq'),
	(22,'医生：{doctor_name}、医生ID：{doctor_id}于{datetime}申请修改资料，尽快处理');

/*!40000 ALTER TABLE `sms_smstemplate` ENABLE KEYS */;
UNLOCK TABLES;


# Dump of table sms_smstemplateitem
# ------------------------------------------------------------

DROP TABLE IF EXISTS `sms_smstemplateitem`;

CREATE TABLE `sms_smstemplateitem` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sms_template_id` int(11) NOT NULL,
  `template_id` varchar(20) NOT NULL,
  `platform` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sms_template_id_refs_id_ea53c4ab` (`sms_template_id`),
  CONSTRAINT `sms_template_id_refs_id_ea53c4ab` FOREIGN KEY (`sms_template_id`) REFERENCES `sms_smstemplate` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `sms_smstemplateitem` WRITE;
/*!40000 ALTER TABLE `sms_smstemplateitem` DISABLE KEYS */;

INSERT INTO `sms_smstemplateitem` (`id`, `sms_template_id`, `template_id`, `platform`)
VALUES
	(1,1,'SMS_12486431','alidayu'),
	(2,1,'26528','ucpass'),
	(3,2,'SMS_12640364','alidayu'),
	(4,2,'26262','ucpass'),
	(5,3,'SMS_12516173','alidayu'),
	(6,3,'10862','ucpass'),
	(7,4,'SMS_12461021','alidayu'),
	(8,4,'16434','ucpass'),
	(9,5,'SMS_12500915','alidayu'),
	(10,5,'23873','ucpass'),
	(11,6,'SMS_12461022','alidayu'),
	(12,6,'16320','ucpass'),
	(13,7,'SMS_12480840','alidayu'),
	(14,7,'13309','ucpass'),
	(15,8,'SMS_12500917','alidayu'),
	(16,8,'13310','ucpass'),
	(17,9,'SMS_12436117','alidayu'),
	(18,9,'13311','ucpass'),
	(19,10,'SMS_12480807','alidayu'),
	(20,10,'17522','ucpass'),
	(21,11,'SMS_12521300','alidayu'),
	(22,11,'13316','ucpass'),
	(23,12,'SMS_12510979','alidayu'),
	(24,12,'13658','ucpass'),
	(25,13,'SMS_12441122','alidayu'),
	(26,13,'13317','ucpass'),
	(27,14,'SMS_12436150','alidayu'),
	(28,14,'13315','ucpass'),
	(29,15,'SMS_12506166','alidayu'),
	(30,15,'13312','ucpass'),
	(31,16,'SMS_12456076','alidayu'),
	(32,16,'13314','ucpass'),
	(33,17,'SMS_12510997','alidayu'),
	(34,17,'13313','ucpass'),
	(35,18,'SMS_12735334','alidayu'),
	(36,18,'26900','ucpass'),
	(37,19,'SMS_12590561','alidayu'),
	(38,19,'26903','ucpass'),
	(39,20,'SMS_12655585','alidayu'),
	(40,20,'26904','ucpass'),
	(41,21,'SMS_12865453','alidayu'),
	(42,21,'26905','ucpass'),
	(43,22,'SMS_12841747','alidayu'),
	(44,22,'27202','ucpass');

UNLOCK TABLES;


COMMIT;