-
Notifications
You must be signed in to change notification settings - Fork 7
/
gomailer.sql
134 lines (114 loc) · 4.81 KB
/
gomailer.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
-- --------------------------------------------------------
-- 主机: 127.0.0.1
-- 服务器版本: 8.0.19 - MySQL Community Server - GPL
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 10.3.0.5771
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- 导出 gomailer 的数据库结构
CREATE DATABASE IF NOT EXISTS `gomailer` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `gomailer`;
-- 导出 表 gomailer.dialer 结构
CREATE TABLE IF NOT EXISTS `dialer` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`host` varchar(1000) NOT NULL,
`port` int NOT NULL,
`user_id` int unsigned NOT NULL,
`auth_username` varchar(1000) NOT NULL,
`auth_password` varchar(1000) NOT NULL,
`name` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 gomailer.endpoint 结构
CREATE TABLE IF NOT EXISTS `endpoint` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_app_id` int unsigned NOT NULL,
`dialer_id` int unsigned NOT NULL,
`template_id` int unsigned DEFAULT NULL,
`user_id` int unsigned NOT NULL,
`name` varchar(500) NOT NULL,
`key` varchar(1000) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_app_id` (`user_app_id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 gomailer.endpoint_preference 结构
CREATE TABLE IF NOT EXISTS `endpoint_preference` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`endpoint_id` int unsigned NOT NULL,
`deliver_strategy` varchar(500) DEFAULT NULL,
`enable_re_captcha` tinyint DEFAULT NULL,
`success_redirect` text,
`fail_redirect` text,
PRIMARY KEY (`id`),
UNIQUE KEY `end_point_id` (`endpoint_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 gomailer.mail 结构
CREATE TABLE IF NOT EXISTS `mail` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`endpoint_id` int NOT NULL,
`state` varchar(100) NOT NULL,
`delivery_time` timestamp NULL DEFAULT NULL,
`content` longtext NOT NULL,
`raw` longtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 gomailer.receiver 结构
CREATE TABLE IF NOT EXISTS `receiver` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`endpoint_id` int unsigned NOT NULL,
`user_id` int unsigned NOT NULL,
`user_app_id` int unsigned NOT NULL,
`address` varchar(1000) NOT NULL,
`receiver_type` varchar(500) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 gomailer.template 结构
CREATE TABLE IF NOT EXISTS `template` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_id` int unsigned NOT NULL,
`template` longtext NOT NULL,
`content_type` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 gomailer.user 结构
CREATE TABLE IF NOT EXISTS `user` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`username` varchar(500) NOT NULL,
`password` varchar(1000) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 gomailer.user_app 结构
CREATE TABLE IF NOT EXISTS `user_app` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_id` int unsigned NOT NULL,
`app_type` varchar(500) DEFAULT NULL,
`name` varchar(500) NOT NULL,
`host` varchar(1000) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;