wiki_api.sql 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : 101.132.183.215-tossboy
  4. Source Server Version : 50556
  5. Source Host : 101.132.183.215:3306
  6. Source Database : wiki_api
  7. Target Server Type : MYSQL
  8. Target Server Version : 50556
  9. File Encoding : 65001
  10. Date: 2017-11-08 17:33:32
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for api_admin_user
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `api_admin_user`;
  17. CREATE TABLE `api_admin_user` (
  18. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  19. `user_name` varchar(255) NOT NULL COMMENT '用户名',
  20. `user_password` char(32) NOT NULL COMMENT '密码',
  21. `user_login` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录次数',
  22. `user_reg_ip` varchar(25) NOT NULL DEFAULT '0' COMMENT '注册IP',
  23. `user_mobile` varchar(20) DEFAULT '' COMMENT '用户手机',
  24. `last_login_ip` varchar(25) NOT NULL DEFAULT '0' COMMENT '最后登录IP',
  25. `user_header_img` varchar(255) DEFAULT '' COMMENT '用户头像160*160',
  26. `user_group` int(10) unsigned DEFAULT '0' COMMENT '用户所属权限组 对应auth_group id',
  27. `user_status` tinyint(1) DEFAULT '1' COMMENT '用户状态 1正常 2禁用',
  28. `project_id` varchar(255) DEFAULT NULL COMMENT '能看到的项目id,逗号分隔',
  29. `create_time` int(11) unsigned zerofill NOT NULL COMMENT '创建时间',
  30. `update_time` int(11) unsigned zerofill NOT NULL COMMENT '更新时间',
  31. PRIMARY KEY (`id`)
  32. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='后台用户表';
  33. -- ----------------------------
  34. -- Records of api_admin_user
  35. -- ----------------------------
  36. INSERT INTO `api_admin_user` VALUES ('1', 'admin', '3ad1e7e6d9e390e38ba304cfc5ddc977', '1', '0', '', '180.117.23.210', '/img/head.png', '0', '1', '00000000000', '01510133008');
  37. -- ----------------------------
  38. -- Table structure for api_date_type
  39. -- ----------------------------
  40. DROP TABLE IF EXISTS `api_date_type`;
  41. CREATE TABLE `api_date_type` (
  42. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  43. `type_name` varchar(60) DEFAULT NULL COMMENT '数据类型',
  44. `create_time` int(11) unsigned DEFAULT NULL,
  45. `update_time` int(11) unsigned DEFAULT NULL,
  46. PRIMARY KEY (`id`)
  47. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='接口数据类型';
  48. -- ----------------------------
  49. -- Records of api_date_type
  50. -- ----------------------------
  51. -- ----------------------------
  52. -- Table structure for api_project
  53. -- ----------------------------
  54. DROP TABLE IF EXISTS `api_project`;
  55. CREATE TABLE `api_project` (
  56. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  57. `project_name` varchar(30) DEFAULT '' COMMENT '项目名称',
  58. `project_icon` varchar(60) DEFAULT NULL COMMENT '项目图标',
  59. `project_about` varchar(60) DEFAULT '' COMMENT '项目简介',
  60. `create_time` int(11) unsigned DEFAULT '0',
  61. `update_time` int(11) unsigned DEFAULT '0',
  62. PRIMARY KEY (`id`)
  63. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='项目表';
  64. -- ----------------------------
  65. -- Records of api_project
  66. -- ----------------------------
  67. INSERT INTO `api_project` VALUES ('1', '50°', '', '50度', '1510133036', '1510133036');
  68. -- ----------------------------
  69. -- Table structure for api_project_api
  70. -- ----------------------------
  71. DROP TABLE IF EXISTS `api_project_api`;
  72. CREATE TABLE `api_project_api` (
  73. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '接口编号',
  74. `project_module_id` int(11) DEFAULT NULL COMMENT '模块id',
  75. `project_id` int(11) DEFAULT NULL COMMENT '项目id',
  76. `project_cate_id` int(11) DEFAULT '0' COMMENT '接口分类id',
  77. `api_url` varchar(100) DEFAULT NULL COMMENT '请求地址',
  78. `api_name` varchar(100) DEFAULT NULL COMMENT '接口名',
  79. `api_des` varchar(300) DEFAULT NULL COMMENT '接口描述',
  80. `api_parameter` text COMMENT '请求参数{所有的主求参数,以json格式在此存放}',
  81. `api_parameter_json` text COMMENT '请求参数的json格式',
  82. `api_re` text COMMENT '返回值{以json格式在此存放}',
  83. `api_re_json` text COMMENT '返回数据的json格式',
  84. `api_isdel` tinyint(4) unsigned DEFAULT '0' COMMENT '{0:正常,1:删除}',
  85. `project_url_id` int(11) NOT NULL COMMENT '项目url域名前缀id',
  86. `api_oeder` int(11) DEFAULT '0' COMMENT '排序(值越大,越靠前)',
  87. `request_type_id` int(11) NOT NULL COMMENT '请求类型id',
  88. `api_memo` text COMMENT '备注',
  89. `update_time` int(11) unsigned DEFAULT NULL COMMENT '最后操作时间',
  90. `create_time` int(11) unsigned DEFAULT NULL,
  91. PRIMARY KEY (`id`)
  92. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='接口明细表';
  93. -- ----------------------------
  94. -- Records of api_project_api
  95. -- ----------------------------
  96. -- ----------------------------
  97. -- Table structure for api_project_cate
  98. -- ----------------------------
  99. DROP TABLE IF EXISTS `api_project_cate`;
  100. CREATE TABLE `api_project_cate` (
  101. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  102. `cate_name` varchar(60) DEFAULT NULL,
  103. `project_id` int(11) NOT NULL COMMENT '项目id',
  104. `project_module_id` int(11) DEFAULT NULL,
  105. `create_time` int(11) unsigned DEFAULT '0',
  106. `update_time` int(11) unsigned DEFAULT '0',
  107. PRIMARY KEY (`id`)
  108. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='项目模块->分类表';
  109. -- ----------------------------
  110. -- Records of api_project_cate
  111. -- ----------------------------
  112. -- ----------------------------
  113. -- Table structure for api_project_module
  114. -- ----------------------------
  115. DROP TABLE IF EXISTS `api_project_module`;
  116. CREATE TABLE `api_project_module` (
  117. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  118. `model_name` varchar(60) DEFAULT NULL COMMENT '项目模块名',
  119. `project_id` int(11) DEFAULT NULL COMMENT '项目id',
  120. `create_time` int(11) unsigned DEFAULT '0',
  121. `update_time` int(11) unsigned DEFAULT '0',
  122. PRIMARY KEY (`id`)
  123. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='项目模块表';
  124. -- ----------------------------
  125. -- Records of api_project_module
  126. -- ----------------------------
  127. -- ----------------------------
  128. -- Table structure for api_project_url
  129. -- ----------------------------
  130. DROP TABLE IF EXISTS `api_project_url`;
  131. CREATE TABLE `api_project_url` (
  132. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  133. `project_id` int(11) NOT NULL COMMENT '项目id',
  134. `url_domain` varchar(60) NOT NULL COMMENT '项目域名',
  135. `create_time` int(11) unsigned DEFAULT '0',
  136. `update_time` int(11) unsigned DEFAULT '0',
  137. PRIMARY KEY (`id`)
  138. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='项目域名表';
  139. -- ----------------------------
  140. -- Records of api_project_url
  141. -- ----------------------------
  142. -- ----------------------------
  143. -- Table structure for api_request_type
  144. -- ----------------------------
  145. DROP TABLE IF EXISTS `api_request_type`;
  146. CREATE TABLE `api_request_type` (
  147. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  148. `type_name` varchar(60) DEFAULT NULL COMMENT '请求类型',
  149. `create_time` int(11) unsigned DEFAULT NULL,
  150. `update_time` int(11) unsigned DEFAULT NULL,
  151. PRIMARY KEY (`id`)
  152. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='接口请求类型';
  153. -- ----------------------------
  154. -- Records of api_request_type
  155. -- ----------------------------