msg_type.sql 2.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. -- -- create database if not exists `notice` default character set utf8 collate utf8_general_ci;
  2. -- DROP TABLE IF EXISTS `notice`.`message_type`;
  3. -- create table `notice`.`message_type`(
  4. -- `sys_name` varchar(64) not null default '',
  5. -- `id` int(11) unsigned not null ,
  6. -- `pasture_id` int(11) not null default 0,
  7. -- `type_name` varchar(64) not null default '',
  8. -- `remind_type_id` int(11) unsigned not null default 0,
  9. -- `remind_type` varchar(64) not null default '',
  10. -- `push_date` varchar(64) not null default '',
  11. -- `push_time` varchar(64) not null default '' comment '推送时间,different type have different format',
  12. -- `interval_time` int(11) not null default 0 comment '提醒间隔时间,单位hour',
  13. -- `push_limit` int(11) not null default 0 ,
  14. -- `template_id` varchar(64) not null default '',
  15. -- `roles_id` varchar(64) not null default '',
  16. -- `users_id` varchar(64) not null default '',
  17. -- primary key(`id`,`sys_name`,`pasture_id`),
  18. -- index `u_msg_type` (`remind_type`)
  19. -- )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '消息类型';
  20. -- alter table msg_type
  21. -- modify column `remind_type_id` int(11) unsigned not null default '0' FIRST remind_type;
  22. -- modify column `remind_type_id` int(11) FIRST remind_type
  23. -- drop index u_msg_type on message_type
  24. -- alter table message
  25. -- -- add push_count int(11) unsigned not null default '0' AFTER `status`;
  26. -- add remind_type_id int(11) unsigned not null default '0' AFTER `status`;
  27. insert into message_type
  28. (sys_name,id,pasture_id,type_name,remind_type_id,remind_type,push_date,push_time,interval_time,push_limit,template_id,roles_id,users_id)
  29. values
  30. -- ('tmrwatch',1,1,'合同金额超期未收',3,'指定周期','w1,w3,w5','9:30','0',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo','1,2,3','1,2,3'),
  31. ('tmrwatch',2,3,'合同金额超期未收',3,'指定周期','w1,w3,w5','9:30','0',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo','1,2,3','1,2,3'),
  32. ('tmrwatch',1,3,'合同金额超期未收',3,'指定周期','w1,w3,w5','9:30','0',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo','1,2,3','1,2,3');
  33. -- ('tmrwatch','合同审批',1,'立即','0','0','2','0','BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo'),
  34. -- ('tmrwatch','客户回访未完成',2,'延时','48','9:30','24',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo'),