From 1bc9d5562359b94256944ac5d07ead84a95692bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E4=BD=B3?= Date: Mon, 6 Sep 2021 14:33:27 +0800 Subject: [PATCH] add notification.sql --- db/notification.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 db/notification.sql diff --git a/db/notification.sql b/db/notification.sql new file mode 100644 index 0000000..4508198 --- /dev/null +++ b/db/notification.sql @@ -0,0 +1,22 @@ +CREATE TABLE `platform_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `platform_code` varchar(50) NOT NULL DEFAULT '' COMMENT '平台编码', + `platform_name` varchar(50) NOT NULL DEFAULT '' COMMENT '平台名称', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `is_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; + +CREATE TABLE `gitlink_sys_notification` ( + `id` int NOT NULL AUTO_INCREMENT, + `sender` int NOT NULL COMMENT '发送者id', + `receiver` int NOT NULL COMMENT '接受者id', + `content` text NOT NULL COMMENT '消息内容', + `notification_url` varchar(255) DEFAULT NULL COMMENT '消息跳转url', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `status` tinyint(4) NOT NULL COMMENT '消息状态1-未读2-已读3-未删除4-已删除', + PRIMARY KEY (`id`), + KEY `index_on_receiver_and_status` (`receiver`,`status`), + KEY `index_on_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; \ No newline at end of file