zheng.sql 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : 127.0.0.1
  4. Source Server Version : 50621
  5. Source Host : localhost:3306
  6. Source Database : zheng
  7. Target Server Type : MYSQL
  8. Target Server Version : 50621
  9. File Encoding : 65001
  10. Date: 2017-07-23 23:13:56
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for cms_article
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `cms_article`;
  17. CREATE TABLE `cms_article` (
  18. `article_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章编号',
  19. `topic_id` int(11) DEFAULT NULL COMMENT '所属专题',
  20. `title` varchar(200) NOT NULL COMMENT '文章标题',
  21. `author` varchar(50) DEFAULT NULL COMMENT '文章原作者',
  22. `fromurl` varchar(300) DEFAULT NULL COMMENT '转载来源网址',
  23. `image` varchar(300) DEFAULT NULL COMMENT '封面图',
  24. `keywords` varchar(100) DEFAULT NULL COMMENT '关键字',
  25. `description` varchar(500) DEFAULT NULL COMMENT '简介',
  26. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型(1:普通,2:热门...)',
  27. `allowcomments` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否允许评论(0:不允许,1:允许)',
  28. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:不通过,0未审核,1:通过)',
  29. `content` mediumtext COMMENT '内容',
  30. `user_id` int(10) unsigned NOT NULL COMMENT '发布人id',
  31. `readnumber` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '阅读数量',
  32. `top` int(11) NOT NULL DEFAULT '0' COMMENT '置顶等级',
  33. `system_id` int(11) DEFAULT NULL COMMENT '所属系统',
  34. `ctime` bigint(20) unsigned NOT NULL COMMENT '创建时间',
  35. `orders` bigint(20) unsigned NOT NULL COMMENT '排序',
  36. PRIMARY KEY (`article_id`),
  37. KEY `cms_article_orders` (`orders`)
  38. ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COMMENT='文章表';
  39. -- ----------------------------
  40. -- Records of cms_article
  41. -- ----------------------------
  42. INSERT INTO `cms_article` VALUES ('3', '0', '中国经济标题1', '1', '1', '1', '1', '1', '1', '1', '0', '资讯内容', '1', '0', '0', '1', '1489827019528', '1489827019528');
  43. INSERT INTO `cms_article` VALUES ('4', '0', '中国经济标题2', '2', '2', '2', '2', '2', '1', '1', '-1', '资讯内容', '1', '0', '0', '1', '1489827340870', '1489827340870');
  44. INSERT INTO `cms_article` VALUES ('5', '0', '中国经济标题3', '3', '3', '3', '3', '3', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1489827581414', '1489827581414');
  45. INSERT INTO `cms_article` VALUES ('8', '1', '日本从地球消失,我们倍(喜)感(大)心(普)痛(奔)', 'shuzheng', '网络', '', '日本消失,日本地震', '日本从地震中消失', '1', '1', '1', '好悲(gao)伤(xing)啊', '1', '12', '0', '1', '1489845594355', '1489845594355');
  46. INSERT INTO `cms_article` VALUES ('9', '0', '中国经济标题4', '4', '4', '4', '4', '4', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460546198', '1490460546198');
  47. INSERT INTO `cms_article` VALUES ('10', '0', '中国经济标题5', '5', '5', '5', '5', '5', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460567137', '1490460567137');
  48. INSERT INTO `cms_article` VALUES ('11', '0', '中国经济标题6', '6', '6', '6', '6', '6', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460575304', '1490460575304');
  49. INSERT INTO `cms_article` VALUES ('12', '0', '中国经济标题7', '7', '7', '7', '7', '7', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460582004', '1490460582004');
  50. INSERT INTO `cms_article` VALUES ('13', '0', '中国经济标题8', '8', '8', '8', '8', '8', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460588840', '1490460588840');
  51. INSERT INTO `cms_article` VALUES ('14', '0', '中国经济标题9', '9', '9', '9', '9', '9', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460596394', '1490460596394');
  52. INSERT INTO `cms_article` VALUES ('15', '0', '中国经济标题10', '10', '10', '10', '10', '10', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460612370', '1490460612370');
  53. INSERT INTO `cms_article` VALUES ('16', '0', '中国经济标题11', '11', '11', '11', '11', '11', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460782767', '1490460782767');
  54. INSERT INTO `cms_article` VALUES ('17', '0', '中国经济标题12', '12', '12', '12', '12', '12', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460792501', '1490460792501');
  55. INSERT INTO `cms_article` VALUES ('18', '0', '中国经济标题13', '13', '13', '13', '13', '13', '1', '1', '1', '资讯内容', '1', '0', '0', '1', '1490460800634', '1490460800634');
  56. INSERT INTO `cms_article` VALUES ('19', '0', '人为什么谈恋爱?', 'test', 'test', 'test', 'test', 'test', '1', '1', '1', '人为什么谈恋爱?', '1', '0', '0', '2', '1490460800635', '1490460800635');
  57. INSERT INTO `cms_article` VALUES ('20', '0', 'java开发笔记', 'test', 'test', 'test', 'test', 'test', '1', '1', '1', '好记性不如烂笔头', '1', '0', '0', '3', '1490460800636', '1490460800636');
  58. -- ----------------------------
  59. -- Table structure for cms_article_category
  60. -- ----------------------------
  61. DROP TABLE IF EXISTS `cms_article_category`;
  62. CREATE TABLE `cms_article_category` (
  63. `article_category_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  64. `article_id` int(10) unsigned NOT NULL COMMENT '文章编号',
  65. `category_id` int(10) unsigned NOT NULL COMMENT '类目编号',
  66. PRIMARY KEY (`article_category_id`),
  67. KEY `cms_article_category_article_id` (`article_id`),
  68. KEY `cms_article_category_category_id` (`category_id`),
  69. CONSTRAINT `FK_Reference_7` FOREIGN KEY (`category_id`) REFERENCES `cms_category` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  70. CONSTRAINT `FK_Reference_8` FOREIGN KEY (`article_id`) REFERENCES `cms_article` (`article_id`) ON DELETE CASCADE ON UPDATE CASCADE
  71. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COMMENT='文章类目关联表';
  72. -- ----------------------------
  73. -- Records of cms_article_category
  74. -- ----------------------------
  75. INSERT INTO `cms_article_category` VALUES ('1', '3', '6');
  76. INSERT INTO `cms_article_category` VALUES ('2', '4', '6');
  77. INSERT INTO `cms_article_category` VALUES ('3', '5', '6');
  78. INSERT INTO `cms_article_category` VALUES ('4', '9', '6');
  79. INSERT INTO `cms_article_category` VALUES ('5', '10', '6');
  80. INSERT INTO `cms_article_category` VALUES ('6', '11', '6');
  81. INSERT INTO `cms_article_category` VALUES ('7', '12', '6');
  82. INSERT INTO `cms_article_category` VALUES ('8', '12', '6');
  83. INSERT INTO `cms_article_category` VALUES ('9', '13', '6');
  84. INSERT INTO `cms_article_category` VALUES ('10', '14', '6');
  85. INSERT INTO `cms_article_category` VALUES ('11', '15', '6');
  86. INSERT INTO `cms_article_category` VALUES ('12', '16', '6');
  87. INSERT INTO `cms_article_category` VALUES ('13', '17', '6');
  88. INSERT INTO `cms_article_category` VALUES ('14', '18', '6');
  89. INSERT INTO `cms_article_category` VALUES ('15', '8', '7');
  90. INSERT INTO `cms_article_category` VALUES ('16', '19', '8');
  91. INSERT INTO `cms_article_category` VALUES ('17', '20', '9');
  92. -- ----------------------------
  93. -- Table structure for cms_article_tag
  94. -- ----------------------------
  95. DROP TABLE IF EXISTS `cms_article_tag`;
  96. CREATE TABLE `cms_article_tag` (
  97. `article_tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  98. `article_id` int(10) unsigned NOT NULL COMMENT '文章编号',
  99. `tag_id` int(10) unsigned NOT NULL COMMENT '标签编号',
  100. PRIMARY KEY (`article_tag_id`),
  101. KEY `cms_article_tag_article_id` (`article_id`),
  102. KEY `cms_article_tag_tag_id` (`tag_id`),
  103. CONSTRAINT `FK_Reference_3` FOREIGN KEY (`article_id`) REFERENCES `cms_article` (`article_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  104. CONSTRAINT `FK_Reference_4` FOREIGN KEY (`tag_id`) REFERENCES `cms_tag` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
  105. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='文章标签关联表';
  106. -- ----------------------------
  107. -- Records of cms_article_tag
  108. -- ----------------------------
  109. INSERT INTO `cms_article_tag` VALUES ('1', '19', '4');
  110. INSERT INTO `cms_article_tag` VALUES ('2', '20', '5');
  111. -- ----------------------------
  112. -- Table structure for cms_category
  113. -- ----------------------------
  114. DROP TABLE IF EXISTS `cms_category`;
  115. CREATE TABLE `cms_category` (
  116. `category_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '类目编号',
  117. `pid` int(10) unsigned DEFAULT NULL COMMENT '上级编号',
  118. `level` tinyint(4) NOT NULL COMMENT '层级',
  119. `name` varchar(20) NOT NULL COMMENT '名称',
  120. `description` varchar(200) DEFAULT NULL COMMENT '描述',
  121. `icon` varchar(50) DEFAULT NULL COMMENT '图标',
  122. `type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '类型(1:普通,2:热门...)',
  123. `alias` varchar(20) DEFAULT NULL COMMENT '别名',
  124. `system_id` int(11) DEFAULT NULL COMMENT '所属系统',
  125. `ctime` bigint(20) unsigned NOT NULL COMMENT '创建时间',
  126. `orders` bigint(255) unsigned NOT NULL COMMENT '排序',
  127. PRIMARY KEY (`category_id`),
  128. KEY `cms_category_orders` (`orders`),
  129. KEY `cms_category_pid` (`pid`),
  130. KEY `cms_category_alias` (`alias`),
  131. KEY `cms_category_level` (`level`)
  132. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='类目表';
  133. -- ----------------------------
  134. -- Records of cms_category
  135. -- ----------------------------
  136. INSERT INTO `cms_category` VALUES ('5', null, '1', '经济', '经济类目', '', '1', 'economic', '1', '1489590733919', '1489590733919');
  137. INSERT INTO `cms_category` VALUES ('6', '5', '2', '中国经济', '中国经济类目', '', '1', 'chinaeconomic', '1', '1489590768989', '1489590768989');
  138. INSERT INTO `cms_category` VALUES ('7', '5', '2', '日本经济', '日本经济类目', '', '1', 'japaneconomic', '1', '1491636586316', '1491636586316');
  139. INSERT INTO `cms_category` VALUES ('8', null, '1', '人类', '人类问题', '', '1', 'people', '2', '1491636586317', '1491636586317');
  140. INSERT INTO `cms_category` VALUES ('9', null, '1', '技术', '技术博文', null, '1', 'technic', '3', '1491636586318', '1491636586318');
  141. -- ----------------------------
  142. -- Table structure for cms_category_tag
  143. -- ----------------------------
  144. DROP TABLE IF EXISTS `cms_category_tag`;
  145. CREATE TABLE `cms_category_tag` (
  146. `category_tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  147. `category_id` int(10) unsigned NOT NULL COMMENT '类目编号',
  148. `tag_id` int(10) unsigned NOT NULL COMMENT '标签编号',
  149. PRIMARY KEY (`category_tag_id`),
  150. KEY `cms_category_tag_tag_id` (`tag_id`),
  151. KEY `cms_category_tag_category_id` (`category_id`),
  152. CONSTRAINT `FK_Reference_5` FOREIGN KEY (`category_id`) REFERENCES `cms_category` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  153. CONSTRAINT `FK_Reference_6` FOREIGN KEY (`tag_id`) REFERENCES `cms_tag` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
  154. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='类目标签关联表';
  155. -- ----------------------------
  156. -- Records of cms_category_tag
  157. -- ----------------------------
  158. -- ----------------------------
  159. -- Table structure for cms_comment
  160. -- ----------------------------
  161. DROP TABLE IF EXISTS `cms_comment`;
  162. CREATE TABLE `cms_comment` (
  163. `comment_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  164. `pid` int(10) unsigned DEFAULT NULL COMMENT '回复楼中楼编号回复楼中楼编号',
  165. `article_id` int(10) unsigned NOT NULL COMMENT '文章编号',
  166. `user_id` int(10) unsigned NOT NULL COMMENT '用户编号',
  167. `content` text NOT NULL COMMENT '评论内容',
  168. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:不通过,0:未审核,1:通过)',
  169. `ip` varchar(30) DEFAULT NULL COMMENT '评论人ip地址',
  170. `agent` varchar(200) DEFAULT NULL COMMENT '评论人终端信息',
  171. `system_id` int(11) DEFAULT NULL COMMENT '所属系统',
  172. `ctime` bigint(20) NOT NULL COMMENT '创建时间',
  173. PRIMARY KEY (`comment_id`),
  174. KEY `cms_comment_article_id` (`article_id`)
  175. ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COMMENT='评论表';
  176. -- ----------------------------
  177. -- Records of cms_comment
  178. -- ----------------------------
  179. INSERT INTO `cms_comment` VALUES ('1', null, '8', '1', '1', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490535749413');
  180. INSERT INTO `cms_comment` VALUES ('2', null, '8', '1', '2', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536186447');
  181. INSERT INTO `cms_comment` VALUES ('3', null, '8', '1', '3', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536192205');
  182. INSERT INTO `cms_comment` VALUES ('4', null, '8', '1', '4', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536460544');
  183. INSERT INTO `cms_comment` VALUES ('5', null, '8', '1', '5', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536462182');
  184. INSERT INTO `cms_comment` VALUES ('6', null, '8', '1', '6', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536463614');
  185. INSERT INTO `cms_comment` VALUES ('7', null, '8', '1', '7', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536464870');
  186. INSERT INTO `cms_comment` VALUES ('8', null, '8', '1', '8', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536465926');
  187. INSERT INTO `cms_comment` VALUES ('9', null, '8', '1', '9', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536466853');
  188. INSERT INTO `cms_comment` VALUES ('10', null, '8', '1', '10', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '1', '1490536467821');
  189. INSERT INTO `cms_comment` VALUES ('11', null, '19', '1', '1', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '2', '1491737900448');
  190. INSERT INTO `cms_comment` VALUES ('12', null, '19', '1', '3', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '2', '1491737902517');
  191. INSERT INTO `cms_comment` VALUES ('13', null, '19', '1', '4', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '2', '1491737903420');
  192. INSERT INTO `cms_comment` VALUES ('14', null, '19', '1', '5', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '2', '1491737904428');
  193. INSERT INTO `cms_comment` VALUES ('15', null, '19', '1', '6', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '2', '1491737905236');
  194. INSERT INTO `cms_comment` VALUES ('16', null, '19', '1', '7', '1', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36', '2', '1491737905980');
  195. -- ----------------------------
  196. -- Table structure for cms_menu
  197. -- ----------------------------
  198. DROP TABLE IF EXISTS `cms_menu`;
  199. CREATE TABLE `cms_menu` (
  200. `menu_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  201. `pid` int(11) DEFAULT NULL COMMENT '父菜单',
  202. `name` varchar(20) DEFAULT NULL COMMENT '名称',
  203. `url` varchar(100) DEFAULT NULL COMMENT '链接',
  204. `target` varchar(10) DEFAULT NULL COMMENT '打开方式',
  205. `orders` bigint(20) DEFAULT NULL COMMENT '排序',
  206. PRIMARY KEY (`menu_id`)
  207. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='菜单';
  208. -- ----------------------------
  209. -- Records of cms_menu
  210. -- ----------------------------
  211. INSERT INTO `cms_menu` VALUES ('1', null, '首页', '/', '_self', '1489847080380');
  212. INSERT INTO `cms_menu` VALUES ('2', null, '问答', '/qa', '_self', '1489847186644');
  213. INSERT INTO `cms_menu` VALUES ('3', null, '博客', '/blog', '_self', '1489847186645');
  214. INSERT INTO `cms_menu` VALUES ('4', null, '资讯', '/news', '_self', '1489847080381');
  215. INSERT INTO `cms_menu` VALUES ('5', null, '专题', '/topic/list', '_self', '1489847186646');
  216. INSERT INTO `cms_menu` VALUES ('6', null, '关于', '/page/about', '_self', '1489847186647');
  217. -- ----------------------------
  218. -- Table structure for cms_page
  219. -- ----------------------------
  220. DROP TABLE IF EXISTS `cms_page`;
  221. CREATE TABLE `cms_page` (
  222. `page_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码',
  223. `pid` int(10) DEFAULT NULL COMMENT '父页面',
  224. `title` varchar(20) DEFAULT NULL COMMENT '标题',
  225. `alias` varchar(20) DEFAULT NULL COMMENT '别名',
  226. `content` mediumtext COMMENT '页面内容',
  227. `keywords` varchar(100) DEFAULT NULL COMMENT '关键字',
  228. `description` varchar(300) DEFAULT NULL COMMENT '描述',
  229. `ctime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  230. `orders` bigint(20) DEFAULT NULL COMMENT '排序',
  231. PRIMARY KEY (`page_id`)
  232. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='页面';
  233. -- ----------------------------
  234. -- Records of cms_page
  235. -- ----------------------------
  236. INSERT INTO `cms_page` VALUES ('1', null, '关于', 'about', '作者:张恕征', '单页关键字', '单页描述', '1489839705049', '1489839705049');
  237. -- ----------------------------
  238. -- Table structure for cms_setting
  239. -- ----------------------------
  240. DROP TABLE IF EXISTS `cms_setting`;
  241. CREATE TABLE `cms_setting` (
  242. `setting_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  243. `setting_key` varchar(10) DEFAULT NULL,
  244. `setting_value` varchar(500) DEFAULT NULL,
  245. PRIMARY KEY (`setting_id`)
  246. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='网站配置';
  247. -- ----------------------------
  248. -- Records of cms_setting
  249. -- ----------------------------
  250. INSERT INTO `cms_setting` VALUES ('1', 'copyright', '© 2017 Zhang Shuzheng');
  251. -- ----------------------------
  252. -- Table structure for cms_system
  253. -- ----------------------------
  254. DROP TABLE IF EXISTS `cms_system`;
  255. CREATE TABLE `cms_system` (
  256. `system_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  257. `name` varchar(20) NOT NULL COMMENT '系统名称',
  258. `code` varchar(20) DEFAULT NULL COMMENT '别名',
  259. `description` varchar(300) DEFAULT NULL COMMENT '描述',
  260. `ctime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  261. `orders` bigint(20) DEFAULT NULL COMMENT '排序',
  262. PRIMARY KEY (`system_id`)
  263. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='系统管理';
  264. -- ----------------------------
  265. -- Records of cms_system
  266. -- ----------------------------
  267. INSERT INTO `cms_system` VALUES ('1', '资讯', 'news', '资讯', '1', '1');
  268. INSERT INTO `cms_system` VALUES ('2', '问答', 'qa', '问答', '2', '2');
  269. INSERT INTO `cms_system` VALUES ('3', '博客', 'blog', '博客', '3', '3');
  270. -- ----------------------------
  271. -- Table structure for cms_tag
  272. -- ----------------------------
  273. DROP TABLE IF EXISTS `cms_tag`;
  274. CREATE TABLE `cms_tag` (
  275. `tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '标签编号',
  276. `name` varchar(20) NOT NULL COMMENT '名称',
  277. `description` varchar(200) DEFAULT NULL COMMENT '描述',
  278. `icon` varchar(50) DEFAULT NULL COMMENT '图标',
  279. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型(1:普通,2:热门...)',
  280. `alias` varchar(20) DEFAULT NULL COMMENT '别名',
  281. `system_id` int(11) DEFAULT NULL COMMENT '所属系统',
  282. `ctime` bigint(20) unsigned NOT NULL COMMENT '创建时间',
  283. `orders` bigint(20) unsigned NOT NULL COMMENT '排序',
  284. PRIMARY KEY (`tag_id`),
  285. KEY `cms_tag_orders` (`orders`),
  286. KEY `cms_tag_alias` (`alias`)
  287. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='标签表';
  288. -- ----------------------------
  289. -- Records of cms_tag
  290. -- ----------------------------
  291. INSERT INTO `cms_tag` VALUES ('1', 'JAVA', 'java标签', '', '1', 'java', '1', '1489585694864', '1489585694864');
  292. INSERT INTO `cms_tag` VALUES ('2', 'Android', 'android标签', '', '1', 'android', '1', '1489585720382', '1489585720382');
  293. INSERT INTO `cms_tag` VALUES ('3', 'zheng', 'zheng标签', '', '2', 'zheng', '1', '1489585815042', '1489585815042');
  294. INSERT INTO `cms_tag` VALUES ('4', '谈恋爱', '谈恋爱标签', '', '1', 'love', '2', '1489585815043', '1489585815043');
  295. INSERT INTO `cms_tag` VALUES ('5', 'java', 'java标签', '', '1', 'java', '3', '1489585815044', '1489585815044');
  296. -- ----------------------------
  297. -- Table structure for cms_topic
  298. -- ----------------------------
  299. DROP TABLE IF EXISTS `cms_topic`;
  300. CREATE TABLE `cms_topic` (
  301. `topic_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  302. `title` varchar(100) DEFAULT NULL COMMENT '标题',
  303. `description` varchar(300) DEFAULT NULL COMMENT '描述',
  304. `url` varchar(100) DEFAULT NULL COMMENT '链接',
  305. `ctime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  306. PRIMARY KEY (`topic_id`)
  307. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='专题';
  308. -- ----------------------------
  309. -- Records of cms_topic
  310. -- ----------------------------
  311. INSERT INTO `cms_topic` VALUES ('1', '日本地震专题', '日本经历灭国性地震,彻底沉入海底', '/topic/1', '1489843484448');
  312. -- ----------------------------
  313. -- Table structure for pay_in_order
  314. -- ----------------------------
  315. DROP TABLE IF EXISTS `pay_in_order`;
  316. CREATE TABLE `pay_in_order` (
  317. `pay_in_order_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  318. `pay_vendor_id` int(10) DEFAULT NULL,
  319. `pay_mch_id` int(10) DEFAULT NULL,
  320. `amount` decimal(10,0) NOT NULL,
  321. `status` tinyint(4) NOT NULL,
  322. `ctime` bigint(20) unsigned NOT NULL,
  323. PRIMARY KEY (`pay_in_order_id`),
  324. KEY `FK_Reference_32` (`pay_vendor_id`),
  325. KEY `FK_Reference_38` (`pay_mch_id`),
  326. CONSTRAINT `FK_Reference_32` FOREIGN KEY (`pay_vendor_id`) REFERENCES `pay_vendor` (`pay_vendor_id`),
  327. CONSTRAINT `FK_Reference_38` FOREIGN KEY (`pay_mch_id`) REFERENCES `pay_mch` (`pay_mch_id`)
  328. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收入订单表';
  329. -- ----------------------------
  330. -- Records of pay_in_order
  331. -- ----------------------------
  332. -- ----------------------------
  333. -- Table structure for pay_in_order_detail
  334. -- ----------------------------
  335. DROP TABLE IF EXISTS `pay_in_order_detail`;
  336. CREATE TABLE `pay_in_order_detail` (
  337. `pay_in_order_detail_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  338. `pay_in_order_id` int(10) DEFAULT NULL,
  339. `product_id` varchar(50) DEFAULT NULL,
  340. `product_name` varchar(100) DEFAULT NULL,
  341. `product_price` decimal(10,0) DEFAULT NULL,
  342. `product_count` int(10) DEFAULT NULL,
  343. `remark` varchar(500) DEFAULT NULL,
  344. PRIMARY KEY (`pay_in_order_detail_id`)
  345. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收入订单明细表';
  346. -- ----------------------------
  347. -- Records of pay_in_order_detail
  348. -- ----------------------------
  349. -- ----------------------------
  350. -- Table structure for pay_mch
  351. -- ----------------------------
  352. DROP TABLE IF EXISTS `pay_mch`;
  353. CREATE TABLE `pay_mch` (
  354. `pay_mch_id` int(10) NOT NULL AUTO_INCREMENT,
  355. `mch_id` varchar(20) DEFAULT NULL,
  356. `name` varchar(20) DEFAULT NULL,
  357. `reqKey` varchar(50) DEFAULT NULL,
  358. `resKey` varchar(50) DEFAULT NULL,
  359. PRIMARY KEY (`pay_mch_id`)
  360. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付中心商户管理表';
  361. -- ----------------------------
  362. -- Records of pay_mch
  363. -- ----------------------------
  364. -- ----------------------------
  365. -- Table structure for pay_out_order
  366. -- ----------------------------
  367. DROP TABLE IF EXISTS `pay_out_order`;
  368. CREATE TABLE `pay_out_order` (
  369. `pay_out_order_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  370. `pay_mch_id` int(10) DEFAULT NULL,
  371. `pay_vendor_id` int(10) DEFAULT NULL,
  372. `amount` decimal(10,0) NOT NULL,
  373. `status` tinyint(4) NOT NULL,
  374. `ctime` bigint(20) unsigned NOT NULL,
  375. PRIMARY KEY (`pay_out_order_id`)
  376. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支出订单表';
  377. -- ----------------------------
  378. -- Records of pay_out_order
  379. -- ----------------------------
  380. -- ----------------------------
  381. -- Table structure for pay_out_order_detail
  382. -- ----------------------------
  383. DROP TABLE IF EXISTS `pay_out_order_detail`;
  384. CREATE TABLE `pay_out_order_detail` (
  385. `pay_out_order_detail_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  386. `pay_out_order_id` int(10) DEFAULT NULL,
  387. `remark` varchar(500) DEFAULT NULL,
  388. PRIMARY KEY (`pay_out_order_detail_id`)
  389. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支出订单明细表';
  390. -- ----------------------------
  391. -- Records of pay_out_order_detail
  392. -- ----------------------------
  393. -- ----------------------------
  394. -- Table structure for pay_pay
  395. -- ----------------------------
  396. DROP TABLE IF EXISTS `pay_pay`;
  397. CREATE TABLE `pay_pay` (
  398. `pay_pay_id` int(10) NOT NULL AUTO_INCREMENT,
  399. `pay_type_id` int(10) DEFAULT NULL,
  400. `param` varchar(1000) DEFAULT NULL,
  401. PRIMARY KEY (`pay_pay_id`)
  402. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付参数配置表';
  403. -- ----------------------------
  404. -- Records of pay_pay
  405. -- ----------------------------
  406. -- ----------------------------
  407. -- Table structure for pay_type
  408. -- ----------------------------
  409. DROP TABLE IF EXISTS `pay_type`;
  410. CREATE TABLE `pay_type` (
  411. `pay_type_id` int(10) NOT NULL AUTO_INCREMENT,
  412. `pay_vendor_id` int(10) DEFAULT NULL,
  413. `pay_mch_id` int(10) DEFAULT NULL,
  414. PRIMARY KEY (`pay_type_id`)
  415. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户支持支付类型表';
  416. -- ----------------------------
  417. -- Records of pay_type
  418. -- ----------------------------
  419. -- ----------------------------
  420. -- Table structure for pay_vendor
  421. -- ----------------------------
  422. DROP TABLE IF EXISTS `pay_vendor`;
  423. CREATE TABLE `pay_vendor` (
  424. `pay_vendor_id` int(10) NOT NULL AUTO_INCREMENT,
  425. `name` varchar(20) DEFAULT NULL,
  426. `appid` varchar(50) DEFAULT NULL,
  427. `appsecret` varchar(150) DEFAULT NULL,
  428. `config` varchar(1000) DEFAULT NULL,
  429. PRIMARY KEY (`pay_vendor_id`)
  430. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='第三方支付标识表';
  431. -- ----------------------------
  432. -- Records of pay_vendor
  433. -- ----------------------------
  434. -- ----------------------------
  435. -- Table structure for pay_vest
  436. -- ----------------------------
  437. DROP TABLE IF EXISTS `pay_vest`;
  438. CREATE TABLE `pay_vest` (
  439. `pay_vest_id` int(10) NOT NULL AUTO_INCREMENT,
  440. `pay_type_id` int(10) DEFAULT NULL,
  441. `prefix` varchar(20) DEFAULT NULL,
  442. `param` varchar(1000) DEFAULT NULL,
  443. PRIMARY KEY (`pay_vest_id`)
  444. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='马甲支付参数配置表';
  445. -- ----------------------------
  446. -- Records of pay_vest
  447. -- ----------------------------
  448. -- ----------------------------
  449. -- Table structure for ucenter_oauth
  450. -- ----------------------------
  451. DROP TABLE IF EXISTS `ucenter_oauth`;
  452. CREATE TABLE `ucenter_oauth` (
  453. `oauth_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  454. `name` varchar(20) DEFAULT NULL COMMENT '认证方式名称',
  455. PRIMARY KEY (`oauth_id`)
  456. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='认证方式表';
  457. -- ----------------------------
  458. -- Records of ucenter_oauth
  459. -- ----------------------------
  460. INSERT INTO `ucenter_oauth` VALUES ('1', '手机');
  461. INSERT INTO `ucenter_oauth` VALUES ('2', '微信');
  462. INSERT INTO `ucenter_oauth` VALUES ('3', 'QQ');
  463. INSERT INTO `ucenter_oauth` VALUES ('4', '微博');
  464. -- ----------------------------
  465. -- Table structure for ucenter_user
  466. -- ----------------------------
  467. DROP TABLE IF EXISTS `ucenter_user`;
  468. CREATE TABLE `ucenter_user` (
  469. `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  470. `password` varchar(32) DEFAULT NULL COMMENT '密码(MD5(密码+盐))',
  471. `salt` varchar(32) DEFAULT NULL COMMENT '盐',
  472. `nickname` varchar(20) DEFAULT NULL COMMENT '昵称',
  473. `sex` tinyint(4) DEFAULT '0' COMMENT '性别(0:未知,1:男,2:女)',
  474. `avatar` varchar(100) DEFAULT NULL COMMENT '头像',
  475. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
  476. `create_ip` varchar(50) DEFAULT NULL COMMENT '注册IP地址',
  477. `last_login_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '最后登录时间',
  478. `last_login_ip` varchar(50) DEFAULT NULL COMMENT '最后登录IP地址',
  479. PRIMARY KEY (`user_id`)
  480. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
  481. -- ----------------------------
  482. -- Records of ucenter_user
  483. -- ----------------------------
  484. -- ----------------------------
  485. -- Table structure for ucenter_user_details
  486. -- ----------------------------
  487. DROP TABLE IF EXISTS `ucenter_user_details`;
  488. CREATE TABLE `ucenter_user_details` (
  489. `user_id` int(10) unsigned NOT NULL COMMENT '编号',
  490. `signature` varchar(300) DEFAULT NULL COMMENT '个性签名',
  491. `real_name` varchar(20) DEFAULT NULL COMMENT '真实姓名',
  492. `birthday` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '出生日期',
  493. `question` varchar(100) DEFAULT NULL COMMENT '帐号安全问题',
  494. `answer` varchar(100) DEFAULT NULL COMMENT '帐号安全答案',
  495. PRIMARY KEY (`user_id`),
  496. CONSTRAINT `FK_Reference_41` FOREIGN KEY (`user_id`) REFERENCES `ucenter_user` (`user_id`)
  497. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户详情表';
  498. -- ----------------------------
  499. -- Records of ucenter_user_details
  500. -- ----------------------------
  501. -- ----------------------------
  502. -- Table structure for ucenter_user_log
  503. -- ----------------------------
  504. DROP TABLE IF EXISTS `ucenter_user_log`;
  505. CREATE TABLE `ucenter_user_log` (
  506. `user_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  507. `user_id` int(10) unsigned DEFAULT NULL COMMENT '用户编号',
  508. `content` varbinary(100) DEFAULT NULL COMMENT '内容',
  509. `ip` varchar(20) DEFAULT NULL COMMENT '操作IP地址',
  510. `agent` varbinary(200) DEFAULT NULL COMMENT '操作环境',
  511. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  512. PRIMARY KEY (`user_log_id`),
  513. KEY `FK_Reference_44` (`user_id`),
  514. CONSTRAINT `FK_Reference_44` FOREIGN KEY (`user_id`) REFERENCES `ucenter_user` (`user_id`)
  515. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户操作日志表';
  516. -- ----------------------------
  517. -- Records of ucenter_user_log
  518. -- ----------------------------
  519. -- ----------------------------
  520. -- Table structure for ucenter_user_oauth
  521. -- ----------------------------
  522. DROP TABLE IF EXISTS `ucenter_user_oauth`;
  523. CREATE TABLE `ucenter_user_oauth` (
  524. `user_oauth_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  525. `user_id` int(10) unsigned NOT NULL COMMENT '帐号编号',
  526. `oauth_id` int(10) unsigned NOT NULL COMMENT '认证方式编号',
  527. `open_id` varbinary(50) NOT NULL COMMENT '第三方ID',
  528. `status` tinyint(4) unsigned DEFAULT NULL COMMENT '绑定状态(0:解绑,1:绑定)',
  529. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  530. PRIMARY KEY (`user_oauth_id`),
  531. KEY `FK_Reference_42` (`user_id`),
  532. KEY `FK_Reference_43` (`oauth_id`),
  533. CONSTRAINT `FK_Reference_42` FOREIGN KEY (`user_id`) REFERENCES `ucenter_user` (`user_id`),
  534. CONSTRAINT `FK_Reference_43` FOREIGN KEY (`oauth_id`) REFERENCES `ucenter_oauth` (`oauth_id`)
  535. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户认证方式表';
  536. -- ----------------------------
  537. -- Records of ucenter_user_oauth
  538. -- ----------------------------
  539. -- ----------------------------
  540. -- Table structure for upms_log
  541. -- ----------------------------
  542. DROP TABLE IF EXISTS `upms_log`;
  543. CREATE TABLE `upms_log` (
  544. `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
  545. `description` varchar(100) DEFAULT NULL COMMENT '操作描述',
  546. `username` varchar(20) DEFAULT NULL COMMENT '操作用户',
  547. `start_time` bigint(20) DEFAULT NULL COMMENT '操作时间',
  548. `spend_time` int(11) DEFAULT NULL COMMENT '消耗时间',
  549. `base_path` varchar(500) DEFAULT NULL COMMENT '根路径',
  550. `uri` varchar(500) DEFAULT NULL COMMENT 'URI',
  551. `url` varchar(500) DEFAULT NULL COMMENT 'URL',
  552. `method` varchar(10) DEFAULT NULL COMMENT '请求类型',
  553. `parameter` mediumtext,
  554. `user_agent` varchar(500) DEFAULT NULL COMMENT '用户标识',
  555. `ip` varchar(30) DEFAULT NULL COMMENT 'IP地址',
  556. `result` mediumtext,
  557. `permissions` varchar(100) DEFAULT NULL COMMENT '权限值',
  558. PRIMARY KEY (`log_id`),
  559. KEY `log_id` (`log_id`)
  560. ) ENGINE=InnoDB AUTO_INCREMENT=779 DEFAULT CHARSET=utf8mb4 COMMENT='操作日志';
  561. -- ----------------------------
  562. -- Records of upms_log
  563. -- ----------------------------
  564. -- ----------------------------
  565. -- Table structure for upms_organization
  566. -- ----------------------------
  567. DROP TABLE IF EXISTS `upms_organization`;
  568. CREATE TABLE `upms_organization` (
  569. `organization_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  570. `pid` int(10) DEFAULT NULL COMMENT '所属上级',
  571. `name` varchar(20) DEFAULT NULL COMMENT '组织名称',
  572. `description` varchar(1000) DEFAULT NULL COMMENT '组织描述',
  573. `ctime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  574. PRIMARY KEY (`organization_id`)
  575. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='组织';
  576. -- ----------------------------
  577. -- Records of upms_organization
  578. -- ----------------------------
  579. INSERT INTO `upms_organization` VALUES ('1', null, '总部', '北京总部', '1');
  580. INSERT INTO `upms_organization` VALUES ('4', null, '河北分部', '河北石家庄', '1488122466236');
  581. INSERT INTO `upms_organization` VALUES ('5', null, '河南分部', '河南郑州', '1488122480265');
  582. INSERT INTO `upms_organization` VALUES ('6', null, '湖北分部', '湖北武汉', '1488122493265');
  583. INSERT INTO `upms_organization` VALUES ('7', null, '湖南分部', '湖南长沙', '1488122502752');
  584. -- ----------------------------
  585. -- Table structure for upms_permission
  586. -- ----------------------------
  587. DROP TABLE IF EXISTS `upms_permission`;
  588. CREATE TABLE `upms_permission` (
  589. `permission_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  590. `system_id` int(10) unsigned NOT NULL COMMENT '所属系统',
  591. `pid` int(10) DEFAULT NULL COMMENT '所属上级',
  592. `name` varchar(20) DEFAULT NULL COMMENT '名称',
  593. `type` tinyint(4) DEFAULT NULL COMMENT '类型(1:目录,2:菜单,3:按钮)',
  594. `permission_value` varchar(50) DEFAULT NULL COMMENT '权限值',
  595. `uri` varchar(100) DEFAULT NULL COMMENT '路径',
  596. `icon` varchar(50) DEFAULT NULL COMMENT '图标',
  597. `status` tinyint(4) DEFAULT NULL COMMENT '状态(0:禁止,1:正常)',
  598. `ctime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  599. `orders` bigint(20) DEFAULT NULL COMMENT '排序',
  600. PRIMARY KEY (`permission_id`)
  601. ) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8mb4 COMMENT='权限';
  602. -- ----------------------------
  603. -- Records of upms_permission
  604. -- ----------------------------
  605. INSERT INTO `upms_permission` VALUES ('1', '1', '0', '系统组织管理', '1', '', '', 'zmdi zmdi-accounts-list', '1', '1', '1');
  606. INSERT INTO `upms_permission` VALUES ('2', '1', '1', '系统管理', '2', 'upms:system:read', '/manage/system/index', '', '1', '2', '2');
  607. INSERT INTO `upms_permission` VALUES ('3', '1', '1', '组织管理', '2', 'upms:organization:read', '/manage/organization/index', '', '1', '3', '3');
  608. INSERT INTO `upms_permission` VALUES ('4', '1', '0', '角色用户管理', '1', '', '', 'zmdi zmdi-accounts', '1', '4', '4');
  609. INSERT INTO `upms_permission` VALUES ('5', '1', '4', '角色管理', '2', 'upms:role:read', '/manage/role/index', '', '1', '6', '6');
  610. INSERT INTO `upms_permission` VALUES ('6', '1', '4', '用户管理', '2', 'upms:user:read', '/manage/user/index', '', '1', '5', '5');
  611. INSERT INTO `upms_permission` VALUES ('7', '1', '0', '权限资源管理', '1', '', '', 'zmdi zmdi-lock-outline', '1', '7', '7');
  612. INSERT INTO `upms_permission` VALUES ('12', '1', '0', '其他数据管理', '1', '', '', 'zmdi zmdi-more', '1', '12', '12');
  613. INSERT INTO `upms_permission` VALUES ('14', '1', '12', '会话管理', '2', 'upms:session:read', '/manage/session/index', '', '1', '14', '14');
  614. INSERT INTO `upms_permission` VALUES ('15', '1', '12', '日志记录', '2', 'upms:log:read', '/manage/log/index', '', '1', '15', '15');
  615. INSERT INTO `upms_permission` VALUES ('17', '2', '0', '标签类目管理', '1', null, null, 'zmdi zmdi-menu', '1', '17', '17');
  616. INSERT INTO `upms_permission` VALUES ('18', '2', '17', '标签管理', '2', 'cms:tag:read', '/manage/tag/index', null, '1', '18', '18');
  617. INSERT INTO `upms_permission` VALUES ('19', '2', '17', '类目管理', '2', 'cms:category:read', '/manage/category/index', null, '1', '19', '19');
  618. INSERT INTO `upms_permission` VALUES ('20', '2', '0', '文章评论管理', '1', null, null, 'zmdi zmdi-collection-text', '1', '20', '20');
  619. INSERT INTO `upms_permission` VALUES ('21', '2', '20', '文章管理', '2', 'cms:article:read', '/manage/article/index', null, '1', '21', '21');
  620. INSERT INTO `upms_permission` VALUES ('22', '2', '20', '回收管理', '2', 'cms:article:read', '/manage/article/recycle', null, '1', '22', '22');
  621. INSERT INTO `upms_permission` VALUES ('24', '1', '2', '新增系统', '3', 'upms:system:create', '/manage/system/create', 'zmdi zmdi-plus', '1', '24', '24');
  622. INSERT INTO `upms_permission` VALUES ('25', '1', '2', '编辑系统', '3', 'upms:system:update', '/manage/system/update', 'zmdi zmdi-edit', '1', '25', '25');
  623. INSERT INTO `upms_permission` VALUES ('26', '1', '2', '删除系统', '3', 'upms:system:delete', '/manage/system/delete', 'zmdi zmdi-close', '1', '26', '26');
  624. INSERT INTO `upms_permission` VALUES ('27', '1', '3', '新增组织', '3', 'upms:organization:create', '/manage/organization/create', 'zmdi zmdi-plus', '1', '27', '27');
  625. INSERT INTO `upms_permission` VALUES ('28', '1', '3', '编辑组织', '3', 'upms:organization:update', '/manage/organization/update', 'zmdi zmdi-edit', '1', '28', '28');
  626. INSERT INTO `upms_permission` VALUES ('29', '1', '3', '删除组织', '3', 'upms:organization:delete', '/manage/organization/delete', 'zmdi zmdi-close', '1', '29', '29');
  627. INSERT INTO `upms_permission` VALUES ('30', '1', '6', '新增用户', '3', 'upms:user:create', '/manage/user/create', 'zmdi zmdi-plus', '1', '30', '30');
  628. INSERT INTO `upms_permission` VALUES ('31', '1', '6', '编辑用户', '3', 'upms:user:update', '/manage/user/update', 'zmdi zmdi-edit', '1', '31', '31');
  629. INSERT INTO `upms_permission` VALUES ('32', '1', '6', '删除用户', '3', 'upms:user:delete', '/manage/user/delete', 'zmdi zmdi-close', '1', '32', '32');
  630. INSERT INTO `upms_permission` VALUES ('33', '1', '5', '新增角色', '3', 'upms:role:create', '/manage/role/create', 'zmdi zmdi-plus', '1', '33', '33');
  631. INSERT INTO `upms_permission` VALUES ('34', '1', '5', '编辑角色', '3', 'upms:role:update', '/manage/role/update', 'zmdi zmdi-edit', '1', '34', '34');
  632. INSERT INTO `upms_permission` VALUES ('35', '1', '5', '删除角色', '3', 'upms:role:delete', '/manage/role/delete', 'zmdi zmdi-close', '1', '35', '35');
  633. INSERT INTO `upms_permission` VALUES ('36', '1', '39', '新增权限', '3', 'upms:permission:create', '/manage/permission/create', 'zmdi zmdi-plus', '1', '36', '36');
  634. INSERT INTO `upms_permission` VALUES ('37', '1', '39', '编辑权限', '3', 'upms:permission:update', '/manage/permission/update', 'zmdi zmdi-edit', '1', '37', '37');
  635. INSERT INTO `upms_permission` VALUES ('38', '1', '39', '删除权限', '3', 'upms:permission:delete', '/manage/permission/delete', 'zmdi zmdi-close', '1', '38', '38');
  636. INSERT INTO `upms_permission` VALUES ('39', '1', '7', '权限管理', '2', 'upms:permission:read', '/manage/permission/index', null, '1', '39', '39');
  637. INSERT INTO `upms_permission` VALUES ('46', '1', '5', '角色权限', '3', 'upms:role:permission', '/manage/role/permission', 'zmdi zmdi-key', '1', '1488091928257', '1488091928257');
  638. INSERT INTO `upms_permission` VALUES ('48', '1', '6', '用户组织', '3', 'upms:user:organization', '/manage/user/organization', 'zmdi zmdi-accounts-list', '1', '1488120011165', '1488120011165');
  639. INSERT INTO `upms_permission` VALUES ('50', '1', '6', '用户角色', '3', 'upms:user:role', '/manage/user/role', 'zmdi zmdi-accounts', '1', '1488120554175', '1488120554175');
  640. INSERT INTO `upms_permission` VALUES ('51', '1', '6', '用户权限', '3', 'upms:user:permission', '/manage/user/permission', 'zmdi zmdi-key', '1', '1488092013302', '1488092013302');
  641. INSERT INTO `upms_permission` VALUES ('53', '1', '14', '强制退出', '3', 'upms:session:forceout', '/manage/session/forceout', 'zmdi zmdi-run', '1', '1488379514715', '1488379514715');
  642. INSERT INTO `upms_permission` VALUES ('54', '2', '18', '新增标签', '3', 'cms:tag:create', '/manage/tag/create', 'zmdi zmdi-plus', '1', '1489417315159', '1489417315159');
  643. INSERT INTO `upms_permission` VALUES ('55', '2', '18', '编辑标签', '3', 'cms:tag:update', 'zmdi zmdi-edit', 'zmdi zmdi-widgets', '1', '1489417344931', '1489417344931');
  644. INSERT INTO `upms_permission` VALUES ('56', '2', '18', '删除标签', '3', 'cms:tag:delete', '/manage/tag/delete', 'zmdi zmdi-close', '1', '1489417372114', '1489417372114');
  645. INSERT INTO `upms_permission` VALUES ('57', '1', '15', '删除权限', '3', 'upms:log:delete', '/manage/log/delete', 'zmdi zmdi-close', '1', '1489503867909', '1489503867909');
  646. INSERT INTO `upms_permission` VALUES ('58', '2', '19', '编辑类目', '3', 'cms:category:update', '/manage/category/update', 'zmdi zmdi-edit', '1', '1489586600462', '1489586600462');
  647. INSERT INTO `upms_permission` VALUES ('59', '2', '19', '删除类目', '3', 'cms:category:delete', '/manage/category/delete', 'zmdi zmdi-close', '1', '1489586633059', '1489586633059');
  648. INSERT INTO `upms_permission` VALUES ('60', '2', '19', '新增类目', '3', 'cms:category:create', '/manage/category/create', 'zmdi zmdi-plus', '1', '1489590342089', '1489590342089');
  649. INSERT INTO `upms_permission` VALUES ('61', '2', '0', '其他数据管理', '1', '', '', 'zmdi zmdi-more', '1', '1489835455359', '1489835455359');
  650. INSERT INTO `upms_permission` VALUES ('62', '2', '20', '评论管理', '2', 'cms:comment:read', '/manage/comment/index', '', '1', '1489591408224', '1489591408224');
  651. INSERT INTO `upms_permission` VALUES ('63', '2', '62', '删除评论', '3', 'cms:comment:delete', '/manage/comment/delete', 'zmdi zmdi-close', '1', '1489591449614', '1489591449614');
  652. INSERT INTO `upms_permission` VALUES ('64', '2', '79', '单页管理', '2', 'cms:page:read', '/manage/page/index', '', '1', '1489591332779', '1489591332779');
  653. INSERT INTO `upms_permission` VALUES ('65', '2', '64', '新增单页', '3', 'cms:page:create', '/manage/page/create', 'zmdi zmdi-plus', '1', '1489591614473', '1489591614473');
  654. INSERT INTO `upms_permission` VALUES ('66', '2', '64', '编辑单页', '3', 'cms:page:update', '/manage/page/update', 'zmdi zmdi-edit', '1', '1489591653000', '1489591653000');
  655. INSERT INTO `upms_permission` VALUES ('67', '2', '64', '删除单页', '3', 'cms:page:delete', '/manage/page/delete', 'zmdi zmdi-close', '1', '1489591683552', '1489591683552');
  656. INSERT INTO `upms_permission` VALUES ('68', '2', '61', '菜单管理', '2', 'cms:menu:read', '/manage/menu/index', 'zmdi zmdi-widgets', '1', '1489591746846', '1489591746846');
  657. INSERT INTO `upms_permission` VALUES ('69', '2', '68', '新增菜单', '3', 'cms:menu:create', '/manage/menu/create', 'zmdi zmdi-plus', '1', '1489591791747', '1489591791747');
  658. INSERT INTO `upms_permission` VALUES ('70', '2', '68', '编辑菜单', '3', 'cms:menu:update', '/manage/menu/update', 'zmdi zmdi-edit', '1', '1489591831878', '1489591831878');
  659. INSERT INTO `upms_permission` VALUES ('71', '2', '68', '删除菜单', '3', 'cms:menu:delete', '/manage/menu/delete', 'zmdi zmdi-close', '1', '1489591865454', '1489591865454');
  660. INSERT INTO `upms_permission` VALUES ('72', '2', '61', '系统设置', '2', 'cms:setting:read', '/manage/setting/index', 'zmdi zmdi-widgets', '1', '1489591981165', '1489591981165');
  661. INSERT INTO `upms_permission` VALUES ('73', '2', '72', '新增设置', '3', 'cms:setting:create', '/manage/setting/create', 'zmdi zmdi-plus', '1', '1489592024762', '1489592024762');
  662. INSERT INTO `upms_permission` VALUES ('74', '2', '72', '编辑设置', '3', 'cms:setting:update', '/manage/setting/update', 'zmdi zmdi-edit', '1', '1489592052582', '1489592052582');
  663. INSERT INTO `upms_permission` VALUES ('75', '2', '72', '删除设置', '3', 'cms:setting:delete', '/manage/setting/delete', 'zmdi zmdi-close', '1', '1489592081426', '1489592081426');
  664. INSERT INTO `upms_permission` VALUES ('76', '2', '21', '新增文章', '3', 'cms:article:create', '/manage/article/create', 'zmdi zmdi-plus', '1', '1489820150404', '1489820150404');
  665. INSERT INTO `upms_permission` VALUES ('77', '2', '21', '编辑文章', '3', 'cms:article:update', '/manage/article/update', 'zmdi zmdi-edit', '1', '1489820178269', '1489820178269');
  666. INSERT INTO `upms_permission` VALUES ('78', '2', '21', '删除文章', '3', 'cms:article:delete', '/manage/article/delete', 'zmdi zmdi-close', '1', '1489820207607', '1489820207607');
  667. INSERT INTO `upms_permission` VALUES ('79', '2', '0', '单页专题管理', '1', '', '', 'zmdi zmdi-view-web', '1', '1489835320327', '1489835320327');
  668. INSERT INTO `upms_permission` VALUES ('80', '2', '79', '专题管理', '2', 'cms:topic:read', '/manage/topic/index', 'zmdi zmdi-widgets', '1', '1489591507566', '1489591507566');
  669. INSERT INTO `upms_permission` VALUES ('81', '2', '80', '新增专题', '3', 'cms:topic:create', '/manage/topic/create', 'zmdi zmdi-plus', '1', '1489843327028', '1489843327028');
  670. INSERT INTO `upms_permission` VALUES ('82', '2', '80', '编辑专题', '3', 'cms:topic:update', '/manage/topic/update', 'zmdi zmdi-edit', '1', '1489843351513', '1489843351513');
  671. INSERT INTO `upms_permission` VALUES ('83', '2', '80', '删除专题', '3', 'cms:topic:delete', '/manage/topic/delete', 'zmdi zmdi-close', '1', '1489843379953', '1489843379953');
  672. INSERT INTO `upms_permission` VALUES ('84', '2', '68', '上移菜单', '3', 'cms:menu:up', '/manage/menu/up', 'zmdi zmdi-long-arrow-up', '1', '1489846486548', '1489846486548');
  673. INSERT INTO `upms_permission` VALUES ('85', '2', '68', '下移菜单', '3', 'cms:menu:down', '/manage/menu/down', 'zmdi zmdi-long-arrow-down', '1', '1489846578051', '1489846578051');
  674. -- ----------------------------
  675. -- Table structure for upms_role
  676. -- ----------------------------
  677. DROP TABLE IF EXISTS `upms_role`;
  678. CREATE TABLE `upms_role` (
  679. `role_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  680. `name` varchar(20) DEFAULT NULL COMMENT '角色名称',
  681. `title` varchar(20) DEFAULT NULL COMMENT '角色标题',
  682. `description` varchar(1000) DEFAULT NULL COMMENT '角色描述',
  683. `ctime` bigint(20) NOT NULL COMMENT '创建时间',
  684. `orders` bigint(20) NOT NULL COMMENT '排序',
  685. PRIMARY KEY (`role_id`)
  686. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='角色';
  687. -- ----------------------------
  688. -- Records of upms_role
  689. -- ----------------------------
  690. INSERT INTO `upms_role` VALUES ('1', 'super', '超级管理员', '拥有所有权限', '1', '1');
  691. INSERT INTO `upms_role` VALUES ('2', 'admin', '管理员', '拥有除权限管理系统外的所有权限', '1487471013117', '1487471013117');
  692. -- ----------------------------
  693. -- Table structure for upms_role_permission
  694. -- ----------------------------
  695. DROP TABLE IF EXISTS `upms_role_permission`;
  696. CREATE TABLE `upms_role_permission` (
  697. `role_permission_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  698. `role_id` int(10) unsigned NOT NULL COMMENT '角色编号',
  699. `permission_id` int(10) unsigned NOT NULL COMMENT '权限编号',
  700. PRIMARY KEY (`role_permission_id`),
  701. KEY `FK_Reference_23` (`role_id`),
  702. CONSTRAINT `FK_Reference_23` FOREIGN KEY (`role_id`) REFERENCES `upms_role` (`role_id`)
  703. ) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=utf8mb4 COMMENT='角色权限关联表';
  704. -- ----------------------------
  705. -- Records of upms_role_permission
  706. -- ----------------------------
  707. INSERT INTO `upms_role_permission` VALUES ('1', '1', '1');
  708. INSERT INTO `upms_role_permission` VALUES ('2', '1', '2');
  709. INSERT INTO `upms_role_permission` VALUES ('3', '1', '3');
  710. INSERT INTO `upms_role_permission` VALUES ('4', '1', '4');
  711. INSERT INTO `upms_role_permission` VALUES ('5', '1', '5');
  712. INSERT INTO `upms_role_permission` VALUES ('6', '1', '6');
  713. INSERT INTO `upms_role_permission` VALUES ('7', '1', '7');
  714. INSERT INTO `upms_role_permission` VALUES ('8', '1', '39');
  715. INSERT INTO `upms_role_permission` VALUES ('12', '1', '12');
  716. INSERT INTO `upms_role_permission` VALUES ('14', '1', '14');
  717. INSERT INTO `upms_role_permission` VALUES ('15', '1', '15');
  718. INSERT INTO `upms_role_permission` VALUES ('17', '1', '17');
  719. INSERT INTO `upms_role_permission` VALUES ('19', '1', '19');
  720. INSERT INTO `upms_role_permission` VALUES ('20', '1', '20');
  721. INSERT INTO `upms_role_permission` VALUES ('21', '1', '21');
  722. INSERT INTO `upms_role_permission` VALUES ('24', '1', '24');
  723. INSERT INTO `upms_role_permission` VALUES ('27', '1', '27');
  724. INSERT INTO `upms_role_permission` VALUES ('28', '1', '28');
  725. INSERT INTO `upms_role_permission` VALUES ('29', '1', '29');
  726. INSERT INTO `upms_role_permission` VALUES ('30', '1', '30');
  727. INSERT INTO `upms_role_permission` VALUES ('31', '1', '31');
  728. INSERT INTO `upms_role_permission` VALUES ('32', '1', '32');
  729. INSERT INTO `upms_role_permission` VALUES ('33', '1', '33');
  730. INSERT INTO `upms_role_permission` VALUES ('34', '1', '34');
  731. INSERT INTO `upms_role_permission` VALUES ('35', '1', '35');
  732. INSERT INTO `upms_role_permission` VALUES ('36', '1', '36');
  733. INSERT INTO `upms_role_permission` VALUES ('37', '1', '37');
  734. INSERT INTO `upms_role_permission` VALUES ('38', '1', '38');
  735. INSERT INTO `upms_role_permission` VALUES ('39', '1', '46');
  736. INSERT INTO `upms_role_permission` VALUES ('40', '1', '51');
  737. INSERT INTO `upms_role_permission` VALUES ('44', '1', '48');
  738. INSERT INTO `upms_role_permission` VALUES ('45', '1', '50');
  739. INSERT INTO `upms_role_permission` VALUES ('47', '1', '53');
  740. INSERT INTO `upms_role_permission` VALUES ('48', '1', '18');
  741. INSERT INTO `upms_role_permission` VALUES ('49', '1', '54');
  742. INSERT INTO `upms_role_permission` VALUES ('50', '1', '54');
  743. INSERT INTO `upms_role_permission` VALUES ('51', '1', '55');
  744. INSERT INTO `upms_role_permission` VALUES ('52', '1', '54');
  745. INSERT INTO `upms_role_permission` VALUES ('53', '1', '55');
  746. INSERT INTO `upms_role_permission` VALUES ('54', '1', '56');
  747. INSERT INTO `upms_role_permission` VALUES ('55', '1', '57');
  748. INSERT INTO `upms_role_permission` VALUES ('56', '1', '58');
  749. INSERT INTO `upms_role_permission` VALUES ('57', '1', '58');
  750. INSERT INTO `upms_role_permission` VALUES ('58', '1', '59');
  751. INSERT INTO `upms_role_permission` VALUES ('59', '1', '60');
  752. INSERT INTO `upms_role_permission` VALUES ('60', '1', '61');
  753. INSERT INTO `upms_role_permission` VALUES ('61', '1', '62');
  754. INSERT INTO `upms_role_permission` VALUES ('62', '1', '62');
  755. INSERT INTO `upms_role_permission` VALUES ('63', '1', '63');
  756. INSERT INTO `upms_role_permission` VALUES ('64', '1', '62');
  757. INSERT INTO `upms_role_permission` VALUES ('65', '1', '63');
  758. INSERT INTO `upms_role_permission` VALUES ('66', '1', '64');
  759. INSERT INTO `upms_role_permission` VALUES ('67', '1', '62');
  760. INSERT INTO `upms_role_permission` VALUES ('68', '1', '63');
  761. INSERT INTO `upms_role_permission` VALUES ('69', '1', '64');
  762. INSERT INTO `upms_role_permission` VALUES ('70', '1', '65');
  763. INSERT INTO `upms_role_permission` VALUES ('71', '1', '62');
  764. INSERT INTO `upms_role_permission` VALUES ('72', '1', '63');
  765. INSERT INTO `upms_role_permission` VALUES ('73', '1', '64');
  766. INSERT INTO `upms_role_permission` VALUES ('74', '1', '65');
  767. INSERT INTO `upms_role_permission` VALUES ('75', '1', '66');
  768. INSERT INTO `upms_role_permission` VALUES ('76', '1', '62');
  769. INSERT INTO `upms_role_permission` VALUES ('77', '1', '63');
  770. INSERT INTO `upms_role_permission` VALUES ('78', '1', '64');
  771. INSERT INTO `upms_role_permission` VALUES ('79', '1', '65');
  772. INSERT INTO `upms_role_permission` VALUES ('80', '1', '66');
  773. INSERT INTO `upms_role_permission` VALUES ('81', '1', '67');
  774. INSERT INTO `upms_role_permission` VALUES ('82', '1', '68');
  775. INSERT INTO `upms_role_permission` VALUES ('83', '1', '69');
  776. INSERT INTO `upms_role_permission` VALUES ('84', '1', '69');
  777. INSERT INTO `upms_role_permission` VALUES ('85', '1', '70');
  778. INSERT INTO `upms_role_permission` VALUES ('86', '1', '69');
  779. INSERT INTO `upms_role_permission` VALUES ('87', '1', '70');
  780. INSERT INTO `upms_role_permission` VALUES ('88', '1', '71');
  781. INSERT INTO `upms_role_permission` VALUES ('89', '1', '72');
  782. INSERT INTO `upms_role_permission` VALUES ('90', '1', '72');
  783. INSERT INTO `upms_role_permission` VALUES ('91', '1', '73');
  784. INSERT INTO `upms_role_permission` VALUES ('92', '1', '72');
  785. INSERT INTO `upms_role_permission` VALUES ('93', '1', '73');
  786. INSERT INTO `upms_role_permission` VALUES ('94', '1', '74');
  787. INSERT INTO `upms_role_permission` VALUES ('95', '1', '72');
  788. INSERT INTO `upms_role_permission` VALUES ('96', '1', '73');
  789. INSERT INTO `upms_role_permission` VALUES ('97', '1', '74');
  790. INSERT INTO `upms_role_permission` VALUES ('98', '1', '75');
  791. INSERT INTO `upms_role_permission` VALUES ('99', '1', '76');
  792. INSERT INTO `upms_role_permission` VALUES ('100', '1', '76');
  793. INSERT INTO `upms_role_permission` VALUES ('101', '1', '77');
  794. INSERT INTO `upms_role_permission` VALUES ('102', '1', '76');
  795. INSERT INTO `upms_role_permission` VALUES ('103', '1', '77');
  796. INSERT INTO `upms_role_permission` VALUES ('105', '1', '79');
  797. INSERT INTO `upms_role_permission` VALUES ('106', '1', '80');
  798. INSERT INTO `upms_role_permission` VALUES ('107', '1', '81');
  799. INSERT INTO `upms_role_permission` VALUES ('108', '1', '81');
  800. INSERT INTO `upms_role_permission` VALUES ('109', '1', '82');
  801. INSERT INTO `upms_role_permission` VALUES ('110', '1', '81');
  802. INSERT INTO `upms_role_permission` VALUES ('111', '1', '82');
  803. INSERT INTO `upms_role_permission` VALUES ('112', '1', '83');
  804. INSERT INTO `upms_role_permission` VALUES ('113', '1', '84');
  805. INSERT INTO `upms_role_permission` VALUES ('114', '1', '84');
  806. INSERT INTO `upms_role_permission` VALUES ('115', '1', '85');
  807. INSERT INTO `upms_role_permission` VALUES ('121', '1', '78');
  808. INSERT INTO `upms_role_permission` VALUES ('122', '1', '78');
  809. INSERT INTO `upms_role_permission` VALUES ('124', '1', '25');
  810. INSERT INTO `upms_role_permission` VALUES ('125', '1', '26');
  811. -- ----------------------------
  812. -- Table structure for upms_system
  813. -- ----------------------------
  814. DROP TABLE IF EXISTS `upms_system`;
  815. CREATE TABLE `upms_system` (
  816. `system_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  817. `icon` varchar(50) DEFAULT NULL COMMENT '图标',
  818. `banner` varchar(150) DEFAULT NULL COMMENT '背景',
  819. `theme` varchar(50) DEFAULT NULL COMMENT '主题',
  820. `basepath` varchar(100) DEFAULT NULL COMMENT '根目录',
  821. `status` tinyint(4) DEFAULT NULL COMMENT '状态(-1:黑名单,1:正常)',
  822. `name` varchar(20) DEFAULT NULL COMMENT '系统名称',
  823. `title` varchar(20) DEFAULT NULL COMMENT '系统标题',
  824. `description` varchar(300) DEFAULT NULL COMMENT '系统描述',
  825. `ctime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  826. `orders` bigint(20) DEFAULT NULL COMMENT '排序',
  827. PRIMARY KEY (`system_id`)
  828. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='系统';
  829. -- ----------------------------
  830. -- Records of upms_system
  831. -- ----------------------------
  832. INSERT INTO `upms_system` VALUES ('1', 'zmdi zmdi-shield-security', '/resources/zheng-admin/images/zheng-upms.png', '#29A176', 'http://upms.zhangshuzheng.cn:1111', '1', 'zheng-upms-server', '权限管理系统', '用户权限管理系统(RBAC细粒度用户权限、统一后台、单点登录、会话管理)', '1', '1');
  833. INSERT INTO `upms_system` VALUES ('2', 'zmdi zmdi-wikipedia', '/resources/zheng-admin/images/zheng-cms.png', '#455EC5', 'http://cms.zhangshuzheng.cn:2222', '1', 'zheng-cms-admin', '内容管理系统', '内容管理系统(门户、博客、论坛、问答等)', '2', '2');
  834. INSERT INTO `upms_system` VALUES ('3', 'zmdi zmdi-paypal-alt', '/resources/zheng-admin/images/zheng-pay.png', '#F06292', 'http://pay.zhangshuzheng.cn:3331', '1', 'zheng-pay-admin', '支付管理系统', '支付管理系统', '3', '3');
  835. INSERT INTO `upms_system` VALUES ('4', 'zmdi zmdi-account', '/resources/zheng-admin/images/zheng-ucenter.png', '#6539B4', 'http://ucenter.zhangshuzheng.cn:4441', '1', 'zheng-ucenter-home', '用户管理系统', '用户管理系统', '4', '4');
  836. INSERT INTO `upms_system` VALUES ('5', 'zmdi zmdi-cloud', '/resources/zheng-admin/images/zheng-oss.png', '#0B8DE5', 'http://oss.zhangshuzheng.cn:7771', '1', 'zheng-oss-web', '存储管理系统', '存储管理系统', '5', '5');
  837. -- ----------------------------
  838. -- Table structure for upms_user
  839. -- ----------------------------
  840. DROP TABLE IF EXISTS `upms_user`;
  841. CREATE TABLE `upms_user` (
  842. `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  843. `username` varchar(20) NOT NULL COMMENT '帐号',
  844. `password` varchar(32) NOT NULL COMMENT '密码MD5(密码+盐)',
  845. `salt` varchar(32) DEFAULT NULL COMMENT '盐',
  846. `realname` varchar(20) DEFAULT NULL COMMENT '姓名',
  847. `avatar` varchar(150) DEFAULT NULL COMMENT '头像',
  848. `phone` varchar(20) DEFAULT NULL COMMENT '电话',
  849. `email` varchar(50) DEFAULT NULL COMMENT '邮箱',
  850. `sex` tinyint(4) DEFAULT NULL COMMENT '性别',
  851. `locked` tinyint(4) DEFAULT NULL COMMENT '状态(0:正常,1:锁定)',
  852. `ctime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  853. PRIMARY KEY (`user_id`)
  854. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户';
  855. -- ----------------------------
  856. -- Records of upms_user
  857. -- ----------------------------
  858. INSERT INTO `upms_user` VALUES ('1', 'admin', '3038D9CB63B3152A79B8153FB06C02F7', '66f1b370c660445a8657bf8bf1794486', '张恕征', '/resources/zheng-admin/images/avatar.jpg', '', '469741414@qq.com', '1', '0', '1');
  859. INSERT INTO `upms_user` VALUES ('2', 'test', '285C9762F5F9046F5893F752DFAF3476', 'd2d0d03310444ad388a8b290b0fe8564', '张恕征', '/resources/zheng-admin/images/avatar.jpg', '', '469741414@qq.com', '1', '0', '1493394720495');
  860. -- ----------------------------
  861. -- Table structure for upms_user_organization
  862. -- ----------------------------
  863. DROP TABLE IF EXISTS `upms_user_organization`;
  864. CREATE TABLE `upms_user_organization` (
  865. `user_organization_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  866. `user_id` int(10) unsigned NOT NULL COMMENT '用户编号',
  867. `organization_id` int(10) unsigned NOT NULL COMMENT '组织编号',
  868. PRIMARY KEY (`user_organization_id`)
  869. ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COMMENT='用户组织关联表';
  870. -- ----------------------------
  871. -- Records of upms_user_organization
  872. -- ----------------------------
  873. INSERT INTO `upms_user_organization` VALUES ('19', '1', '1');
  874. INSERT INTO `upms_user_organization` VALUES ('20', '1', '4');
  875. INSERT INTO `upms_user_organization` VALUES ('21', '1', '5');
  876. INSERT INTO `upms_user_organization` VALUES ('22', '1', '6');
  877. INSERT INTO `upms_user_organization` VALUES ('23', '1', '7');
  878. -- ----------------------------
  879. -- Table structure for upms_user_permission
  880. -- ----------------------------
  881. DROP TABLE IF EXISTS `upms_user_permission`;
  882. CREATE TABLE `upms_user_permission` (
  883. `user_permission_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  884. `user_id` int(10) unsigned NOT NULL COMMENT '用户编号',
  885. `permission_id` int(10) unsigned NOT NULL COMMENT '权限编号',
  886. `type` tinyint(4) NOT NULL COMMENT '权限类型(-1:减权限,1:增权限)',
  887. PRIMARY KEY (`user_permission_id`)
  888. ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='用户权限关联表';
  889. -- ----------------------------
  890. -- Records of upms_user_permission
  891. -- ----------------------------
  892. INSERT INTO `upms_user_permission` VALUES ('3', '1', '22', '-1');
  893. INSERT INTO `upms_user_permission` VALUES ('4', '1', '22', '1');
  894. INSERT INTO `upms_user_permission` VALUES ('5', '2', '24', '-1');
  895. INSERT INTO `upms_user_permission` VALUES ('6', '2', '26', '-1');
  896. INSERT INTO `upms_user_permission` VALUES ('7', '2', '27', '-1');
  897. INSERT INTO `upms_user_permission` VALUES ('8', '2', '29', '-1');
  898. INSERT INTO `upms_user_permission` VALUES ('9', '2', '32', '-1');
  899. INSERT INTO `upms_user_permission` VALUES ('10', '2', '51', '-1');
  900. INSERT INTO `upms_user_permission` VALUES ('11', '2', '48', '-1');
  901. INSERT INTO `upms_user_permission` VALUES ('12', '2', '50', '-1');
  902. INSERT INTO `upms_user_permission` VALUES ('13', '2', '35', '-1');
  903. INSERT INTO `upms_user_permission` VALUES ('14', '2', '46', '-1');
  904. INSERT INTO `upms_user_permission` VALUES ('15', '2', '37', '-1');
  905. INSERT INTO `upms_user_permission` VALUES ('16', '2', '38', '-1');
  906. INSERT INTO `upms_user_permission` VALUES ('17', '2', '57', '-1');
  907. INSERT INTO `upms_user_permission` VALUES ('18', '2', '56', '-1');
  908. INSERT INTO `upms_user_permission` VALUES ('19', '2', '59', '-1');
  909. INSERT INTO `upms_user_permission` VALUES ('20', '2', '78', '-1');
  910. INSERT INTO `upms_user_permission` VALUES ('21', '2', '67', '-1');
  911. INSERT INTO `upms_user_permission` VALUES ('22', '2', '83', '-1');
  912. INSERT INTO `upms_user_permission` VALUES ('23', '2', '71', '-1');
  913. INSERT INTO `upms_user_permission` VALUES ('24', '2', '75', '-1');
  914. -- ----------------------------
  915. -- Table structure for upms_user_role
  916. -- ----------------------------
  917. DROP TABLE IF EXISTS `upms_user_role`;
  918. CREATE TABLE `upms_user_role` (
  919. `user_role_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  920. `user_id` int(10) unsigned NOT NULL COMMENT '用户编号',
  921. `role_id` int(10) DEFAULT NULL COMMENT '角色编号',
  922. PRIMARY KEY (`user_role_id`)
  923. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='用户角色关联表';
  924. -- ----------------------------
  925. -- Records of upms_user_role
  926. -- ----------------------------
  927. INSERT INTO `upms_user_role` VALUES ('4', '1', '1');
  928. INSERT INTO `upms_user_role` VALUES ('5', '1', '2');
  929. INSERT INTO `upms_user_role` VALUES ('6', '2', '1');
  930. INSERT INTO `upms_user_role` VALUES ('7', '2', '2');