t_message.sql 1.0 KB

1234567891011121314151617
  1. -- 消息表 t_messages/
  2. CREATE TABLE `t_messages` (
  3. `id` int NOT NULL auto_increment COMMENT '主键',
  4. `ms_code` varchar(10) NOT NULL COMMENT '消息ID',
  5. `ms_content` varchar(200) NOT NULL DEFAULT '' COMMENT '内容',
  6. `ms_isread` smallint(6) NOT NULL DEFAULT '' COMMENT '已读或未读',
  7. `ms_receiverenuu` bigint(20) NOT NULL DEFAULT '' COMMENT '接收人企业UU',
  8. `ms_type` varchar(30) NOT NULL DEFAULT '' COMMENT '消息类型',
  9. `ms_remark` varchar(120) NOT NULL DEFAULT '' COMMENT '备注',
  10. `ms_create_time` varchar(40) NOT NULL DEFAULT '' COMMENT '消息生成时间',
  11. create_time TIMESTAMP DEFAULT current_timestamp COMMENT '创建时间',
  12. update_time TIMESTAMP DEFAULT current_timestamp ON UPDATE current_timestamp COMMENT '修改时间',
  13. PRIMARY KEY (id) USING BTREE,
  14. INDEX `ms_isread_index`(`ms_isread`) USING BTREE,
  15. INDEX `ms_receiverenuu_index`(`ms_receiverenuu`) USING BTREE,
  16. unique index(ms_core) comment '编号,唯一索引'
  17. ) ENGINE = INNODB auto_increment = 1 DEFAULT charset = utf8mb4 COMMENT '消息表';