Repository navigation
Expand file tree
/
Copy pathdevelop.sql
More file actions
181 lines (181 loc) · 8.27 KB
/
Copy pathdevelop.sql
File metadata and controls
181 lines (181 loc) · 8.27 KB
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
DROP TABLE IF EXISTS `cms_admin`;
CREATE TABLE `cms_admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`state` int(11) DEFAULT '0',
`roleid` int(11) NOT NULL DEFAULT '1',
`username` varchar(50) NOT NULL,
`password` varchar(250) NOT NULL,
`avatar` varchar(250) DEFAULT NULL,
`addtime` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_admin_log`;
CREATE TABLE `cms_admin_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`ip` varchar(50) NOT NULL,
`logintime` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_admin_role`;
CREATE TABLE `cms_admin_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role` varchar(50) NOT NULL,
`module` text DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_api_set`;
CREATE TABLE `cms_api_set` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`white` text,
`opentable` text,
`authtable` varchar(50) DEFAULT NULL,
`authquery` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_module`;
CREATE TABLE `cms_module` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`bid` int(11) DEFAULT '0',
`mid` varchar(50) DEFAULT NULL,
`modname` varchar(100) DEFAULT NULL,
`modurl` varchar(200) DEFAULT NULL,
`isopen` int(11) DEFAULT '0',
`ordernum` int(11) DEFAULT '0',
`look` int(11) DEFAULT '0',
`othername` varchar(100) DEFAULT NULL,
`befoitem` varchar(250) DEFAULT NULL,
`backitem` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_plugin`;
CREATE TABLE `cms_plugin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` varchar(50) DEFAULT NULL,
`type` varchar(50) DEFAULT NULL,
`auther` varchar(50) DEFAULT NULL,
`title` varchar(50) DEFAULT NULL,
`ver` varchar(10) DEFAULT NULL,
`description` text,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_search`;
CREATE TABLE `cms_search` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hit` int(11) DEFAULT '1',
`keyword` varchar(100) DEFAULT NULL,
`lang` varchar(20) DEFAULT 'zh',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_search_set`;
CREATE TABLE `cms_search_set` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dbs` varchar(50) DEFAULT NULL,
`fields` varchar(100) DEFAULT NULL,
`wheres` varchar(200) DEFAULT NULL,
`pages` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_template`;
CREATE TABLE `cms_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tid` varchar(50) DEFAULT NULL,
`lang` varchar(20) DEFAULT NULL,
`title` varchar(50) DEFAULT NULL,
`makefront` int(11) DEFAULT '0',
`makeadmin` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cms_update`;
CREATE TABLE `cms_update` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`updateid` int(11) DEFAULT NULL,
`updatetime` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `oauth_clients`;
CREATE TABLE `oauth_clients` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT '0',
`client_id` varchar(80) DEFAULT NULL,
`client_secret` varchar(80) DEFAULT NULL,
`redirect_uri` varchar(250) DEFAULT NULL,
`grant_types` varchar(80) DEFAULT 'authorization_code',
`scope` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `oauth_access_tokens`;
CREATE TABLE `oauth_access_tokens` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`access_token` varchar(40) DEFAULT NULL,
`client_id` varchar(80) DEFAULT NULL,
`user_id` varchar(80) DEFAULT NULL,
`expires` timestamp NULL DEFAULT NULL,
`scope` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `oauth_authorization_codes`;
CREATE TABLE `oauth_authorization_codes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`authorization_code` varchar(40) DEFAULT NULL,
`client_id` varchar(80) DEFAULT NULL,
`user_id` varchar(80) DEFAULT NULL,
`redirect_uri` varchar(250) DEFAULT NULL,
`expires` timestamp NULL DEFAULT NULL,
`scope` varchar(250) DEFAULT NULL,
`id_token` varchar(250) DEFAULT NULL,
`code_challenge` varchar(128) DEFAULT NULL,
`code_challenge_method` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `oauth_refresh_tokens`;
CREATE TABLE `oauth_refresh_tokens` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`refresh_token` varchar(40) DEFAULT NULL,
`client_id` varchar(80) DEFAULT NULL,
`user_id` varchar(80) DEFAULT NULL,
`expires` timestamp NULL DEFAULT NULL,
`scope` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `oauth_users`;
CREATE TABLE `oauth_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(80) DEFAULT NULL,
`password` varchar(80) DEFAULT NULL,
`fullname` varchar(80) DEFAULT NULL,
`email` varchar(80) DEFAULT NULL,
`addtime` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `oauth_scopes`;
CREATE TABLE `oauth_scopes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(50) DEFAULT NULL,
`scope` varchar(50) DEFAULT NULL,
`dbtable` varchar(50) DEFAULT NULL,
`is_default` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `oauth_jwt`;
CREATE TABLE `oauth_jwt` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`client_id` varchar(80) DEFAULT NULL,
`subject` varchar(80) DEFAULT NULL,
`public_key` text DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
INSERT INTO `cms_admin` VALUES (1, 0, 1, 'admin', '$2y$12$IXiotxHNFPNDQ3c.tdyvPumkb9W1d1Lr5N7ZDxWgX2cVlBx5n554W', '/assets/images/noimage.png', '2021-08-08 00:00:00');
INSERT INTO `cms_admin_role` VALUES (1, '超级管理', 'ut-frame,ut-module,ut-plugin,ut-template,ut-cac,ut-system,ut-data,ut-oauth,ut-api,ut-power');
INSERT INTO `cms_api_set` VALUES (1, NULL, NULL, 'cms_admin', 'username=[0] and password=[1]');
INSERT INTO `cms_module` VALUES (1, 3, 'ut-frame', 'UT公共模块', 'index.php', 1, 90, 0, '', NULL, NULL);
INSERT INTO `cms_module` VALUES (2, 3, 'ut-module', '模块', 'index.php', 1, 91, 0, '', '', '模块市场:module.php,管理模块:index.php');
INSERT INTO `cms_module` VALUES (3, 3, 'ut-plugin', '插件', 'index.php', 1, 92, 0, '', '', '插件市场:plugin.php,管理插件:index.php');
INSERT INTO `cms_module` VALUES (4, 3, 'ut-template', '模板', 'index.php', 1, 93, 0, '', '', '模板市场:template.php,创建模板:template_creat.php,管理模板:index.php');
INSERT INTO `cms_module` VALUES (5, 3, 'ut-cac', 'CAC', 'index.php', 1, 94, 0, '', '', '');
INSERT INTO `cms_module` VALUES (6, 3, 'ut-system', '配置', 'index.php', 1, 95, 1, '', '', '系统:index.php,语言:lang.php,搜索:search.php');
INSERT INTO `cms_module` VALUES (7, 3, 'ut-data', '数据', 'index.php', 1, 96, 1, '', '', '表管理:index.php,SQL查询:sql.php,备份还原:backup.php');
INSERT INTO `cms_module` VALUES (8, 3, 'ut-oauth', 'OAuth', 'index.php', 1, 97, 1, '', '', '管理应用:index.php,授权记录:log.php,权限集合:role.php,用户列表:user.php');
INSERT INTO `cms_module` VALUES (9, 3, 'ut-api', '接口', 'index.php', 1, 98, 1, '', '', '接口列表:index.php,在线调试:test.php');
INSERT INTO `cms_module` VALUES (10, 3, 'ut-power', '权限', 'index.php', 1, 99, 1, '', '', '角色:role.php,管理员:index.php,登陆日志:log.php');