install.sql 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : 本地开发
  4. Source Server Version : 50721
  5. Source Host : localhost:3306
  6. Source Database : wechat
  7. Target Server Type : MYSQL
  8. Target Server Version : 50721
  9. File Encoding : 65001
  10. Date: 2020-06-13 17:48:09
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for ai_green_adwords
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `ai_green_adwords`;
  17. CREATE TABLE `ai_green_adwords` (
  18. `id` int(11) NOT NULL AUTO_INCREMENT,
  19. `member_miniapp_id` int(11) DEFAULT '0',
  20. `open_type` varchar(50) DEFAULT NULL,
  21. `group` varchar(100) DEFAULT NULL,
  22. `title` varchar(50) DEFAULT NULL,
  23. `link` varchar(200) DEFAULT NULL,
  24. `picture` varchar(255) DEFAULT NULL,
  25. `sort` int(11) DEFAULT '0',
  26. `update_time` int(11) DEFAULT NULL,
  27. `create_time` int(11) DEFAULT NULL,
  28. PRIMARY KEY (`id`)
  29. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  30. -- ----------------------------
  31. -- Table structure for ai_green_alarm
  32. -- ----------------------------
  33. DROP TABLE IF EXISTS `ai_green_alarm`;
  34. CREATE TABLE `ai_green_alarm` (
  35. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  36. `device_id` varchar(255) DEFAULT NULL,
  37. `content` varchar(255) DEFAULT NULL,
  38. `state` tinyint(1) DEFAULT '0',
  39. `create_time` int(11) DEFAULT NULL,
  40. `relieve_time` int(11) DEFAULT NULL,
  41. `member_miniapp_id` int(11) DEFAULT NULL,
  42. `operate_id` int(11) DEFAULT NULL,
  43. PRIMARY KEY (`id`),
  44. KEY `CODEID` (`device_id`)
  45. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  46. -- ----------------------------
  47. -- Table structure for ai_green_bank_cash
  48. -- ----------------------------
  49. DROP TABLE IF EXISTS `ai_green_bank_cash`;
  50. CREATE TABLE `ai_green_bank_cash` (
  51. `id` int(11) NOT NULL AUTO_INCREMENT,
  52. `member_miniapp_id` int(11) DEFAULT NULL,
  53. `user_id` bigint(20) DEFAULT NULL,
  54. `money` decimal(10,2) DEFAULT '0.00' COMMENT '申请金额',
  55. `realmoney` decimal(10,2) DEFAULT '0.00' COMMENT '实际到账',
  56. `update_time` int(11) DEFAULT NULL,
  57. `state` tinyint(1) DEFAULT '0' COMMENT '0新申请1通过-1不通过',
  58. `audit_time` int(11) DEFAULT NULL,
  59. `trade_no` varchar(100) DEFAULT NULL,
  60. `msg` varchar(255) DEFAULT NULL,
  61. PRIMARY KEY (`id`)
  62. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='提现申请列表';
  63. -- ----------------------------
  64. -- Table structure for ai_green_category
  65. -- ----------------------------
  66. DROP TABLE IF EXISTS `ai_green_category`;
  67. CREATE TABLE `ai_green_category` (
  68. `id` int(11) NOT NULL AUTO_INCREMENT,
  69. `member_miniapp_id` int(11) DEFAULT NULL,
  70. `parent_id` int(11) DEFAULT '0',
  71. `root_id` int(11) DEFAULT NULL,
  72. `title` varchar(50) DEFAULT NULL,
  73. `name` varchar(50) DEFAULT NULL,
  74. `picture` varchar(100) DEFAULT NULL,
  75. `price` decimal(10,2) DEFAULT NULL,
  76. `sort` int(11) DEFAULT '0',
  77. `update_time` int(11) DEFAULT NULL,
  78. `create_time` int(11) DEFAULT NULL,
  79. PRIMARY KEY (`id`),
  80. UNIQUE KEY `ID` (`id`) USING BTREE,
  81. KEY `PARENT_ID` (`parent_id`,`root_id`) USING BTREE
  82. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分类信息栏目';
  83. -- ----------------------------
  84. -- Table structure for ai_green_config
  85. -- ----------------------------
  86. DROP TABLE IF EXISTS `ai_green_config`;
  87. CREATE TABLE `ai_green_config` (
  88. `member_miniapp_id` int(11) NOT NULL DEFAULT '0',
  89. `config` text,
  90. `service_telephone` varchar(100) DEFAULT NULL,
  91. `help` text,
  92. `is_wechat_touser` tinyint(1) DEFAULT NULL,
  93. PRIMARY KEY (`member_miniapp_id`),
  94. UNIQUE KEY `APPID` (`member_miniapp_id`)
  95. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  96. -- ----------------------------
  97. -- Table structure for ai_green_device
  98. -- ----------------------------
  99. DROP TABLE IF EXISTS `ai_green_device`;
  100. CREATE TABLE `ai_green_device` (
  101. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  102. `device_id` varchar(255) DEFAULT NULL,
  103. `operate_id` int(11) DEFAULT NULL,
  104. `member_miniapp_id` int(11) DEFAULT NULL,
  105. `manage_uid` int(11) DEFAULT NULL,
  106. `title` varchar(255) DEFAULT NULL,
  107. `address` varchar(255) DEFAULT NULL,
  108. `state` tinyint(1) DEFAULT '0',
  109. `type` tinyint(1) DEFAULT '0',
  110. `longitude` decimal(10,7) DEFAULT NULL COMMENT '地图坐标',
  111. `latitude` decimal(10,7) DEFAULT NULL,
  112. `ip` varchar(255) DEFAULT NULL,
  113. `port` varchar(255) DEFAULT NULL,
  114. `create_time` int(11) DEFAULT NULL,
  115. `update_time` int(11) DEFAULT NULL,
  116. PRIMARY KEY (`id`),
  117. KEY `CODEID` (`device_id`),
  118. KEY `APPID` (`member_miniapp_id`),
  119. KEY `CITYID` (`operate_id`)
  120. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  121. -- ----------------------------
  122. -- Table structure for ai_green_device_state
  123. -- ----------------------------
  124. DROP TABLE IF EXISTS `ai_green_device_state`;
  125. CREATE TABLE `ai_green_device_state` (
  126. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  127. `device_id` varchar(255) DEFAULT NULL,
  128. `uid` int(11) DEFAULT NULL,
  129. `state` tinyint(1) DEFAULT '0',
  130. `type` tinyint(1) DEFAULT NULL,
  131. `ip` varchar(255) DEFAULT NULL,
  132. `port` varchar(255) DEFAULT NULL,
  133. `user_content` varchar(255) DEFAULT NULL,
  134. `device_content` varchar(255) DEFAULT NULL,
  135. `end_content` varchar(255) DEFAULT NULL,
  136. `create_time` int(11) DEFAULT NULL,
  137. `update_time` int(11) DEFAULT NULL,
  138. `member_miniapp_id` int(11) DEFAULT NULL,
  139. PRIMARY KEY (`id`),
  140. KEY `CODEID` (`device_id`)
  141. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  142. -- ----------------------------
  143. -- Table structure for ai_green_job
  144. -- ----------------------------
  145. DROP TABLE IF EXISTS `ai_green_job`;
  146. CREATE TABLE `ai_green_job` (
  147. `id` int(11) NOT NULL AUTO_INCREMENT,
  148. `member_miniapp_id` int(11) DEFAULT NULL,
  149. `uid` int(11) DEFAULT NULL,
  150. `name` varchar(255) DEFAULT NULL,
  151. `city` varchar(50) DEFAULT NULL,
  152. `occupation` varchar(50) DEFAULT NULL,
  153. `card` varchar(50) DEFAULT NULL,
  154. `front` varchar(255) DEFAULT NULL,
  155. `back` varchar(255) DEFAULT '0',
  156. `create_time` int(11) DEFAULT NULL,
  157. PRIMARY KEY (`id`)
  158. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  159. -- ----------------------------
  160. -- Table structure for ai_green_member
  161. -- ----------------------------
  162. DROP TABLE IF EXISTS `ai_green_member`;
  163. CREATE TABLE `ai_green_member` (
  164. `id` int(11) NOT NULL AUTO_INCREMENT,
  165. `member_miniapp_id` int(11) DEFAULT NULL,
  166. `member_id` int(11) DEFAULT NULL,
  167. `operate_id` int(11) DEFAULT NULL,
  168. PRIMARY KEY (`id`)
  169. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  170. -- ----------------------------
  171. -- Table structure for ai_green_news
  172. -- ----------------------------
  173. DROP TABLE IF EXISTS `ai_green_news`;
  174. CREATE TABLE `ai_green_news` (
  175. `id` int(11) NOT NULL AUTO_INCREMENT,
  176. `member_miniapp_id` int(11) DEFAULT NULL,
  177. `cate_id` int(11) DEFAULT NULL,
  178. `cate_name` varchar(255) DEFAULT NULL,
  179. `types` tinyint(255) DEFAULT NULL,
  180. `title` varchar(255) DEFAULT NULL,
  181. `content` longtext,
  182. `desc` varchar(255) DEFAULT NULL,
  183. `img` varchar(255) DEFAULT NULL,
  184. `views` bigint(20) DEFAULT '0',
  185. `update_time` int(11) DEFAULT NULL,
  186. PRIMARY KEY (`id`)
  187. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  188. -- ----------------------------
  189. -- Table structure for ai_green_news_cate
  190. -- ----------------------------
  191. DROP TABLE IF EXISTS `ai_green_news_cate`;
  192. CREATE TABLE `ai_green_news_cate` (
  193. `id` int(11) NOT NULL AUTO_INCREMENT,
  194. `member_miniapp_id` int(11) DEFAULT NULL,
  195. `title` varchar(50) DEFAULT NULL,
  196. `name` varchar(50) DEFAULT NULL,
  197. `picture` varchar(100) DEFAULT NULL,
  198. `sort` int(11) DEFAULT '0',
  199. `update_time` int(11) DEFAULT NULL,
  200. `create_time` int(11) DEFAULT NULL,
  201. PRIMARY KEY (`id`),
  202. UNIQUE KEY `ID` (`id`) USING BTREE
  203. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='新闻分类';
  204. -- ----------------------------
  205. -- Table structure for ai_green_operate
  206. -- ----------------------------
  207. DROP TABLE IF EXISTS `ai_green_operate`;
  208. CREATE TABLE `ai_green_operate` (
  209. `id` int(11) NOT NULL AUTO_INCREMENT,
  210. `member_miniapp_id` int(11) DEFAULT NULL,
  211. `uid` bigint(20) DEFAULT NULL,
  212. `operate_name` varchar(100) DEFAULT NULL,
  213. `address` varchar(100) DEFAULT NULL,
  214. `tel` varchar(32) DEFAULT NULL,
  215. `is_lock` tinyint(1) DEFAULT '0',
  216. `company` varchar(255) DEFAULT NULL,
  217. `create_time` int(11) DEFAULT NULL,
  218. `longitude` decimal(10,7) DEFAULT NULL COMMENT '地图坐标',
  219. `latitude` decimal(10,7) DEFAULT NULL,
  220. PRIMARY KEY (`id`)
  221. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  222. -- ----------------------------
  223. -- Table structure for ai_green_order
  224. -- ----------------------------
  225. DROP TABLE IF EXISTS `ai_green_order`;
  226. CREATE TABLE `ai_green_order` (
  227. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  228. `member_miniapp_id` int(11) DEFAULT NULL,
  229. `user_id` int(11) DEFAULT NULL,
  230. `shop_id` int(11) DEFAULT NULL,
  231. `order_no` varchar(50) DEFAULT NULL,
  232. `is_del` tinyint(1) DEFAULT '0',
  233. `paid_at` tinyint(1) DEFAULT '0',
  234. `amount` decimal(10,2) DEFAULT '0.00' COMMENT '单商品价格总额',
  235. `points` bigint(11) DEFAULT NULL,
  236. `create_time` int(11) DEFAULT NULL,
  237. `paid_time` int(11) DEFAULT NULL,
  238. `paid_no` varchar(255) DEFAULT NULL,
  239. `message` varchar(255) DEFAULT NULL,
  240. `shop_cache` text,
  241. `express_status` tinyint(1) DEFAULT '0',
  242. `express_name` varchar(50) DEFAULT NULL,
  243. `express_phone` varchar(20) DEFAULT NULL,
  244. `express_address` varchar(255) DEFAULT NULL,
  245. `express_starttime` int(11) DEFAULT NULL,
  246. `express_company` varchar(100) DEFAULT NULL COMMENT '快递公司',
  247. `express_no` varchar(50) DEFAULT NULL COMMENT '快递单号',
  248. PRIMARY KEY (`id`),
  249. UNIQUE KEY `ORDER_NO` (`order_no`) USING BTREE,
  250. KEY `IS_DEL` (`is_del`) USING BTREE
  251. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  252. -- ----------------------------
  253. -- Table structure for ai_green_recruit
  254. -- ----------------------------
  255. DROP TABLE IF EXISTS `ai_green_recruit`;
  256. CREATE TABLE `ai_green_recruit` (
  257. `id` int(11) NOT NULL AUTO_INCREMENT,
  258. `member_miniapp_id` int(11) DEFAULT NULL,
  259. `title` varchar(50) DEFAULT NULL,
  260. `name` varchar(50) DEFAULT NULL,
  261. `state` tinyint(2) DEFAULT NULL,
  262. `news_id` int(11) DEFAULT NULL,
  263. `sort` int(11) DEFAULT '0',
  264. `update_time` int(11) DEFAULT NULL,
  265. `create_time` int(11) DEFAULT NULL,
  266. PRIMARY KEY (`id`),
  267. UNIQUE KEY `ID` (`id`) USING BTREE
  268. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='新闻分类';
  269. -- ----------------------------
  270. -- Table structure for ai_green_retrieve
  271. -- ----------------------------
  272. DROP TABLE IF EXISTS `ai_green_retrieve`;
  273. CREATE TABLE `ai_green_retrieve` (
  274. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  275. `member_miniapp_id` int(11) DEFAULT NULL,
  276. `uid` int(11) DEFAULT NULL,
  277. `realname` varchar(50) DEFAULT NULL,
  278. `phone` varchar(255) DEFAULT NULL,
  279. `address` varchar(255) DEFAULT NULL,
  280. `order_no` varchar(50) DEFAULT NULL,
  281. `message` varchar(255) DEFAULT NULL,
  282. `state` tinyint(1) DEFAULT '0',
  283. `create_time` int(11) DEFAULT NULL,
  284. `weight` int(11) DEFAULT NULL,
  285. `longitude` decimal(10,7) DEFAULT NULL COMMENT '地图坐标',
  286. `latitude` decimal(10,7) DEFAULT NULL,
  287. `date` int(11) DEFAULT NULL,
  288. `update_time` int(11) DEFAULT NULL,
  289. `operate_id` int(11) DEFAULT NULL,
  290. PRIMARY KEY (`id`),
  291. UNIQUE KEY `ORDER_NO` (`order_no`) USING BTREE,
  292. KEY `IS_DEL` (`state`) USING BTREE
  293. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  294. -- ----------------------------
  295. -- Table structure for ai_green_shop
  296. -- ----------------------------
  297. DROP TABLE IF EXISTS `ai_green_shop`;
  298. CREATE TABLE `ai_green_shop` (
  299. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  300. `member_miniapp_id` int(11) DEFAULT NULL,
  301. `category_id` bigint(20) DEFAULT NULL,
  302. `category_path_id` varchar(255) DEFAULT NULL,
  303. `is_sale` tinyint(1) DEFAULT '0' COMMENT '0:下架、1:上架,',
  304. `is_del` tinyint(1) DEFAULT '0',
  305. `name` varchar(255) DEFAULT NULL,
  306. `note` varchar(255) DEFAULT NULL,
  307. `points` int(11) DEFAULT '0',
  308. `imgs` text,
  309. `img` varchar(255) DEFAULT NULL,
  310. `content` mediumtext,
  311. `sort` int(11) DEFAULT NULL,
  312. `update_time` int(11) DEFAULT NULL,
  313. PRIMARY KEY (`id`),
  314. UNIQUE KEY `ID` (`id`) USING BTREE,
  315. KEY `IS_SALE` (`is_sale`) USING BTREE
  316. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品主表';
  317. -- ----------------------------
  318. -- Table structure for ai_green_sign
  319. -- ----------------------------
  320. DROP TABLE IF EXISTS `ai_green_sign`;
  321. CREATE TABLE `ai_green_sign` (
  322. `id` int(11) NOT NULL AUTO_INCREMENT,
  323. `uid` bigint(20) DEFAULT NULL,
  324. `startime` int(11) DEFAULT NULL,
  325. `signtime` int(11) DEFAULT NULL,
  326. `days` int(11) DEFAULT NULL,
  327. `points` int(11) DEFAULT NULL,
  328. `member_miniapp_id` int(11) DEFAULT NULL,
  329. PRIMARY KEY (`id`)
  330. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  331. -- ----------------------------
  332. -- Table structure for ai_green_sign_config
  333. -- ----------------------------
  334. DROP TABLE IF EXISTS `ai_green_sign_config`;
  335. CREATE TABLE `ai_green_sign_config` (
  336. `id` int(11) NOT NULL AUTO_INCREMENT,
  337. `member_miniapp_id` int(11) DEFAULT NULL,
  338. `config_id` int(11) DEFAULT '1',
  339. `point` int(11) DEFAULT NULL,
  340. PRIMARY KEY (`id`)
  341. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  342. -- ----------------------------
  343. -- Table structure for ai_green_staff
  344. -- ----------------------------
  345. DROP TABLE IF EXISTS `ai_green_staff`;
  346. CREATE TABLE `ai_green_staff` (
  347. `id` int(11) NOT NULL AUTO_INCREMENT,
  348. `member_miniapp_id` int(11) DEFAULT NULL,
  349. `uid` int(11) DEFAULT NULL,
  350. `title` varchar(50) DEFAULT NULL,
  351. `about` varchar(255) DEFAULT NULL,
  352. `sort` int(11) DEFAULT '0',
  353. `operate_id` int(11) DEFAULT NULL,
  354. `update_time` int(11) DEFAULT NULL,
  355. `create_time` int(11) DEFAULT NULL,
  356. PRIMARY KEY (`id`),
  357. UNIQUE KEY `ID` (`id`) USING BTREE
  358. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工程师';
  359. -- ----------------------------
  360. -- Table structure for ai_green_user
  361. -- ----------------------------
  362. DROP TABLE IF EXISTS `ai_green_user`;
  363. CREATE TABLE `ai_green_user` (
  364. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  365. `member_miniapp_id` int(11) DEFAULT NULL,
  366. `uid` int(11) DEFAULT NULL,
  367. `weight` bigint(20) DEFAULT NULL,
  368. `points` bigint(20) DEFAULT NULL,
  369. `update_time` int(11) DEFAULT NULL,
  370. `create_time` int(11) DEFAULT NULL,
  371. PRIMARY KEY (`id`),
  372. KEY `APPID` (`member_miniapp_id`) USING BTREE
  373. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  374. -- ----------------------------
  375. -- Table structure for ai_green_user_log
  376. -- ----------------------------
  377. DROP TABLE IF EXISTS `ai_green_user_log`;
  378. CREATE TABLE `ai_green_user_log` (
  379. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  380. `member_miniapp_id` int(11) DEFAULT NULL,
  381. `uid` int(11) DEFAULT NULL,
  382. `weight` decimal(10,0) DEFAULT NULL,
  383. `device_id` varchar(255) DEFAULT NULL,
  384. `create_time` int(11) DEFAULT NULL,
  385. PRIMARY KEY (`id`),
  386. KEY `APPID` (`member_miniapp_id`) USING BTREE
  387. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  388. SET FOREIGN_KEY_CHECKS=1;