123456789101112131415161718192021222324252627282930313233343536 |
- create database if not exists `notice` default character set utf8 collate utf8_general_ci;
- DROP TABLE IF EXISTS `notice`.`msg_type`;
- create table `notice`.`message_type`(
- `id` int(11) unsigned not null auto_increment,
- `sys_name` varchar(64) not null default '',
- `type_name` varchar(64) not null default '',
- `remind_type_id` int(11) unsigned not null default 0,
- `remind_type` varchar(64) not null default '',
- `push_date` varchar(64) not null default '',
- `push_time` varchar(64) not null default '' comment '推送时间,different type have different format',
- `interval_time` int(11) not null default 0 comment '提醒间隔时间,单位hour',
- `push_limit` int(11) not null default 0 ,
- `template_id` varchar(64) not null default '',
- primary key (`id`),
- UNIQUE key `u_msg_type` (`remind_type`)
- )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '消息类型';
- drop table if exists `notice`.`message`;
- create table `notice`.`message`(
- `id` int(11) not null auto_increment,
- `msg_type_id` int(11) not null default 0,
- `msg_content` text not null ,
- `target` varchar(64) not null default '',
- `push_count` int(11) not null default 0,
- `push_limit` int(11) not null default 0,
- `status` int(11) not null default 0,
- `create_at` DATETIME not null default CURRENT_TIMESTAMP,
- `update_at` DATETIME not null ON UPDATE CURRENT_TIMESTAMP ,
- primary key(`id`)
- )ENGINE=InnoDB DEFAULT CHARSET=utf8 comment '消息';
- -- create table `user`(
- -- `id` int(11) not null auto_increment,
- -- openid varchar(64) not null default '',
- -- phone varchar(64) not null default '',
- -- primary key (`id`)
- -- )ENGINE=InnoDB DEFAULT CHARSET=utf8 comment='用户表';
|