v2.sql 1.31 KB
Newer Older
刘基明's avatar
刘基明 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use  tamp_community;

ALTER TABLE tamp_community.file_record ADD `check_status` int(3) NOT NULL DEFAULT '0' COMMENT '审核状态 0:初试化 1:通过 2:不通过 3:需要人工再审';
ALTER TABLE tamp_community.file_record ADD `check_result_log` varchar(500) NOT NULL DEFAULT '' COMMENT '审核结果记录';

CREATE TABLE `notification` (
  `id` bigint(32) NOT NULL COMMENT 'id',
  `notification_id` varchar(64) NOT NULL DEFAULT '' COMMENT '通知主键Id',
  `notified_user_id` varchar(64) NOT NULL DEFAULT '' COMMENT '被通知的用户id',
  `message_type` varchar(64) NOT NULL DEFAULT '' COMMENT '1:转发 2:点赞 3:评论 4:关注',
  `target_id` varchar(64) NOT NULL DEFAULT '' COMMENT '目标id,类型是转发、点赞、评论时为themeId,关注则为user_id',
  `content` varchar(600) NOT NULL DEFAULT '' COMMENT '评论:评论内容  转发:topicId+内容  点赞:人数+最近3个用户',
  `operator_id` varchar(64) NOT NULL DEFAULT '' COMMENT '操作者id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `delete_tag` int(3) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `idx_user_type_time` (`notified_user_id`,`update_time`,`message_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='消息通知记录'