install.sql 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : 本地开发
  4. Source Server Version : 50731
  5. Source Host : localhost:3306
  6. Source Database : wechat
  7. Target Server Type : MYSQL
  8. Target Server Version : 50731
  9. File Encoding : 65001
  10. Date: 2020-12-18 10:29:16
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for ai_ais_adwords
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `ai_ais_adwords`;
  17. CREATE TABLE `ai_ais_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_ais_bank
  32. -- ----------------------------
  33. DROP TABLE IF EXISTS `ai_ais_bank`;
  34. CREATE TABLE `ai_ais_bank` (
  35. `id` int(11) NOT NULL AUTO_INCREMENT,
  36. `member_miniapp_id` int(11) DEFAULT NULL,
  37. `uid` bigint(20) DEFAULT NULL,
  38. `money` decimal(10,2) DEFAULT '0.00' COMMENT '帐号余额',
  39. `tobo_paid` decimal(10,2) DEFAULT '0.00' COMMENT '锁定金额',
  40. `pledge_money` decimal(10,2) DEFAULT NULL,
  41. `point` bigint(20) DEFAULT '0' COMMENT '积分',
  42. `update_time` int(11) DEFAULT NULL,
  43. PRIMARY KEY (`id`)
  44. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  45. -- ----------------------------
  46. -- Table structure for ai_ais_bank_cash
  47. -- ----------------------------
  48. DROP TABLE IF EXISTS `ai_ais_bank_cash`;
  49. CREATE TABLE `ai_ais_bank_cash` (
  50. `id` int(11) NOT NULL AUTO_INCREMENT,
  51. `member_miniapp_id` int(11) DEFAULT NULL,
  52. `uid` bigint(20) DEFAULT NULL,
  53. `money` decimal(10,2) DEFAULT '0.00' COMMENT '申请金额',
  54. `realmoney` decimal(10,2) DEFAULT '0.00' COMMENT '实际到账',
  55. `update_time` int(11) DEFAULT NULL,
  56. `state` tinyint(1) DEFAULT '0' COMMENT '0新申请1通过-1不通过',
  57. `audit_time` int(11) DEFAULT NULL,
  58. `trade_no` varchar(100) DEFAULT NULL,
  59. `msg` varchar(255) DEFAULT NULL,
  60. PRIMARY KEY (`id`)
  61. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='提现申请列表';
  62. -- ----------------------------
  63. -- Table structure for ai_ais_bill
  64. -- ----------------------------
  65. DROP TABLE IF EXISTS `ai_ais_bill`;
  66. CREATE TABLE `ai_ais_bill` (
  67. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  68. `member_miniapp_id` int(11) DEFAULT NULL,
  69. `store_id` int(11) DEFAULT '0',
  70. `uid` bigint(20) DEFAULT '0',
  71. `pay_uid` bigint(20) DEFAULT '0',
  72. `money` decimal(10,2) DEFAULT '0.00',
  73. `message` tinytext,
  74. `update_time` int(11) DEFAULT NULL,
  75. PRIMARY KEY (`id`),
  76. KEY `id` (`id`) USING BTREE,
  77. KEY `id_2` (`id`) USING BTREE
  78. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='个人财务记录';
  79. -- ----------------------------
  80. -- Table structure for ai_ais_card
  81. -- ----------------------------
  82. DROP TABLE IF EXISTS `ai_ais_card`;
  83. CREATE TABLE `ai_ais_card` (
  84. `id` int(11) NOT NULL AUTO_INCREMENT,
  85. `member_miniapp_id` int(11) DEFAULT NULL,
  86. `is_lock` tinyint(1) DEFAULT '0',
  87. `is_end` tinyint(1) DEFAULT '0',
  88. `store_id` int(11) DEFAULT NULL,
  89. `name` varchar(255) DEFAULT NULL,
  90. `price` decimal(11,2) DEFAULT NULL,
  91. `tips` text,
  92. `coupon_id` bigint(20) DEFAULT NULL,
  93. `coupon_ids` text,
  94. `locktime` int(11) DEFAULT NULL,
  95. `create_time` int(11) DEFAULT NULL,
  96. `update_time` int(11) DEFAULT NULL,
  97. PRIMARY KEY (`id`)
  98. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  99. -- ----------------------------
  100. -- Table structure for ai_ais_card_order
  101. -- ----------------------------
  102. DROP TABLE IF EXISTS `ai_ais_card_order`;
  103. CREATE TABLE `ai_ais_card_order` (
  104. `id` int(11) NOT NULL AUTO_INCREMENT,
  105. `member_miniapp_id` int(11) DEFAULT NULL,
  106. `store_id` int(11) DEFAULT NULL,
  107. `uid` bigint(11) DEFAULT NULL,
  108. `card_id` int(11) DEFAULT NULL,
  109. `coupon_id` bigint(11) DEFAULT NULL,
  110. `user_card_id` int(11) DEFAULT NULL,
  111. `coupon_ids` varchar(255) DEFAULT NULL COMMENT '赠品列表',
  112. `state` tinyint(1) DEFAULT '0',
  113. `price` decimal(10,2) DEFAULT NULL,
  114. `amount` decimal(10,2) DEFAULT NULL,
  115. `order_no` varchar(255) DEFAULT NULL,
  116. `paid_time` int(11) DEFAULT NULL,
  117. `create_time` int(11) DEFAULT NULL,
  118. PRIMARY KEY (`id`),
  119. KEY `UID` (`uid`),
  120. KEY `APIID` (`member_miniapp_id`)
  121. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  122. -- ----------------------------
  123. -- Table structure for ai_ais_card_user
  124. -- ----------------------------
  125. DROP TABLE IF EXISTS `ai_ais_card_user`;
  126. CREATE TABLE `ai_ais_card_user` (
  127. `id` int(11) NOT NULL AUTO_INCREMENT,
  128. `member_miniapp_id` int(11) DEFAULT NULL,
  129. `uid` bigint(11) DEFAULT NULL,
  130. `user_coupon_id` bigint(11) DEFAULT '0',
  131. `store_id` int(11) DEFAULT NULL,
  132. `card_id` int(11) DEFAULT NULL,
  133. `amount` decimal(11,2) DEFAULT NULL,
  134. `create_time` int(11) DEFAULT NULL,
  135. `update_time` int(11) DEFAULT NULL,
  136. PRIMARY KEY (`id`),
  137. KEY `UID` (`uid`) USING BTREE,
  138. KEY `APIID` (`member_miniapp_id`) USING BTREE
  139. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  140. -- ----------------------------
  141. -- Table structure for ai_ais_city
  142. -- ----------------------------
  143. DROP TABLE IF EXISTS `ai_ais_city`;
  144. CREATE TABLE `ai_ais_city` (
  145. `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
  146. `code` bigint(12) DEFAULT NULL COMMENT '行政区划代码',
  147. `name` varchar(32) DEFAULT NULL COMMENT '名称',
  148. `parent_id` bigint(11) DEFAULT NULL COMMENT '上级id',
  149. `level` varchar(32) DEFAULT NULL COMMENT 'level_id',
  150. `sort` int(11) DEFAULT '0',
  151. PRIMARY KEY (`id`)
  152. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  153. -- ----------------------------
  154. -- Table structure for ai_ais_config
  155. -- ----------------------------
  156. DROP TABLE IF EXISTS `ai_ais_config`;
  157. CREATE TABLE `ai_ais_config` (
  158. `member_miniapp_id` int(11) NOT NULL,
  159. `coupon_longtime` tinyint(4) DEFAULT '0',
  160. `coupon_is_pay_open` tinyint(2) DEFAULT NULL,
  161. `group_join` int(11) DEFAULT NULL,
  162. `group_member` int(11) DEFAULT NULL,
  163. `group_profit` int(11) DEFAULT NULL COMMENT '引流分润',
  164. `city_sharing_price` decimal(10,2) DEFAULT NULL,
  165. `city_only_price` decimal(10,2) DEFAULT NULL,
  166. `mchid` int(11) DEFAULT NULL,
  167. `charge` tinyint(3) DEFAULT NULL,
  168. `service_telephone` varchar(100) DEFAULT NULL,
  169. `qq_lbs_key` varchar(100) DEFAULT NULL,
  170. `sla` text,
  171. `writer` text,
  172. `info` text COMMENT '城市号配置',
  173. PRIMARY KEY (`member_miniapp_id`),
  174. UNIQUE KEY `APPID` (`member_miniapp_id`) USING BTREE
  175. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  176. -- ----------------------------
  177. -- Table structure for ai_ais_coupon
  178. -- ----------------------------
  179. DROP TABLE IF EXISTS `ai_ais_coupon`;
  180. CREATE TABLE `ai_ais_coupon` (
  181. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  182. `member_miniapp_id` int(11) DEFAULT NULL,
  183. `store_id` int(11) DEFAULT NULL,
  184. `citycode` int(6) DEFAULT NULL,
  185. `is_top` tinyint(1) DEFAULT '0',
  186. `is_lock` tinyint(1) DEFAULT '0' COMMENT '锁定',
  187. `is_end` tinyint(1) DEFAULT '0' COMMENT '是否过期失效或删除',
  188. `types` tinyint(1) DEFAULT '0' COMMENT '0满减/抵扣1满折/折扣/2兑换券3储值券',
  189. `discount` float(2,1) DEFAULT '0.0' COMMENT '折扣力度',
  190. `price` int(11) DEFAULT '0' COMMENT '满减代金券',
  191. `amount` int(11) DEFAULT '0' COMMENT '额度大小',
  192. `howmuch` int(10) DEFAULT '0' COMMENT '满多少用',
  193. `name` varchar(255) DEFAULT NULL,
  194. `tips` varchar(255) DEFAULT NULL,
  195. `sort` int(11) DEFAULT '0',
  196. `num` int(11) DEFAULT '0' COMMENT '发行数量',
  197. `update_time` int(11) DEFAULT NULL,
  198. `create_time` int(11) DEFAULT NULL COMMENT '0',
  199. PRIMARY KEY (`id`),
  200. KEY `APPID` (`member_miniapp_id`) USING BTREE,
  201. KEY `STOREID` (`store_id`) USING BTREE,
  202. KEY `CITYID` (`citycode`)
  203. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  204. -- ----------------------------
  205. -- Table structure for ai_ais_coupon_subsidize
  206. -- ----------------------------
  207. DROP TABLE IF EXISTS `ai_ais_coupon_subsidize`;
  208. CREATE TABLE `ai_ais_coupon_subsidize` (
  209. `id` int(11) NOT NULL AUTO_INCREMENT,
  210. `member_miniapp_id` int(11) DEFAULT NULL,
  211. `coupon_id` int(11) NOT NULL COMMENT '赠品ID',
  212. `how_much` decimal(10,2) DEFAULT NULL COMMENT '补贴金额',
  213. PRIMARY KEY (`id`)
  214. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='补贴优惠券';
  215. -- ----------------------------
  216. -- Table structure for ai_ais_coupon_user
  217. -- ----------------------------
  218. DROP TABLE IF EXISTS `ai_ais_coupon_user`;
  219. CREATE TABLE `ai_ais_coupon_user` (
  220. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  221. `member_miniapp_id` int(11) DEFAULT NULL,
  222. `store_id` int(11) DEFAULT NULL,
  223. `coupon_id` int(11) DEFAULT NULL,
  224. `parent_store_id` int(11) DEFAULT '0',
  225. `uid` bigint(20) DEFAULT NULL,
  226. `is_end` tinyint(1) DEFAULT '0',
  227. `types` tinyint(4) DEFAULT '0' COMMENT '0满减/抵扣1满折/折扣/2兑换券3储值券',
  228. `discount` float(2,1) DEFAULT NULL,
  229. `price` int(11) DEFAULT NULL COMMENT '分',
  230. `amount` int(11) DEFAULT NULL,
  231. `howmuch` int(10) DEFAULT NULL COMMENT '元',
  232. `name` varchar(255) DEFAULT NULL,
  233. `tips` varchar(255) DEFAULT NULL,
  234. `group_ids` varchar(11) DEFAULT '0',
  235. `money` decimal(10,2) DEFAULT '0.00' COMMENT '优惠多少钱',
  236. `update_time` int(11) DEFAULT NULL,
  237. `create_time` int(11) DEFAULT NULL,
  238. PRIMARY KEY (`id`),
  239. KEY `APPID` (`member_miniapp_id`) USING BTREE,
  240. KEY `STOREID` (`store_id`) USING BTREE
  241. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户的赠品';
  242. -- ----------------------------
  243. -- Table structure for ai_ais_fund
  244. -- ----------------------------
  245. DROP TABLE IF EXISTS `ai_ais_fund`;
  246. CREATE TABLE `ai_ais_fund` (
  247. `id` int(11) NOT NULL AUTO_INCREMENT,
  248. `member_miniapp_id` int(11) DEFAULT NULL,
  249. `balance` decimal(10,2) DEFAULT NULL,
  250. `subsidize` decimal(10,2) DEFAULT NULL,
  251. `subsidize_num` int(11) DEFAULT NULL,
  252. PRIMARY KEY (`id`)
  253. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='采购基金';
  254. -- ----------------------------
  255. -- Table structure for ai_ais_fund_bill
  256. -- ----------------------------
  257. DROP TABLE IF EXISTS `ai_ais_fund_bill`;
  258. CREATE TABLE `ai_ais_fund_bill` (
  259. `id` int(11) NOT NULL AUTO_INCREMENT,
  260. `member_miniapp_id` int(11) DEFAULT NULL,
  261. `store_id` int(11) DEFAULT NULL,
  262. `uid` int(11) DEFAULT NULL,
  263. `types` tinyint(13) DEFAULT NULL COMMENT '0入1出',
  264. `state` tinyint(2) DEFAULT '0' COMMENT '1成功 2失败',
  265. `money` decimal(10,2) DEFAULT NULL,
  266. `order_no` varchar(100) DEFAULT NULL,
  267. `message` varchar(255) DEFAULT NULL,
  268. `update_time` int(11) DEFAULT NULL,
  269. PRIMARY KEY (`id`)
  270. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='基金账单';
  271. -- ----------------------------
  272. -- Table structure for ai_ais_income
  273. -- ----------------------------
  274. DROP TABLE IF EXISTS `ai_ais_income`;
  275. CREATE TABLE `ai_ais_income` (
  276. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  277. `member_miniapp_id` int(11) DEFAULT NULL,
  278. `store_id` int(11) DEFAULT '0',
  279. `pay_uid` bigint(20) DEFAULT '0',
  280. `types` tinyint(1) DEFAULT '0' COMMENT '1买单2优选3会员4城市号',
  281. `money` decimal(10,2) DEFAULT '0.00',
  282. `update_time` int(11) DEFAULT NULL,
  283. PRIMARY KEY (`id`),
  284. KEY `id` (`id`) USING BTREE,
  285. KEY `id_2` (`id`) USING BTREE
  286. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收入账单';
  287. -- ----------------------------
  288. -- Table structure for ai_ais_info
  289. -- ----------------------------
  290. DROP TABLE IF EXISTS `ai_ais_info`;
  291. CREATE TABLE `ai_ais_info` (
  292. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  293. `uid` bigint(20) DEFAULT NULL,
  294. `cate_id` int(11) DEFAULT NULL,
  295. `citycode` int(6) DEFAULT NULL,
  296. `store_id` int(11) DEFAULT '0',
  297. `member_miniapp_id` int(11) DEFAULT NULL,
  298. `themes` text,
  299. `fields` text,
  300. `telphone` varchar(255) DEFAULT NULL,
  301. `url_slogan` varchar(255) DEFAULT NULL,
  302. `links` varchar(255) DEFAULT NULL,
  303. `is_get` tinyint(2) DEFAULT '0' COMMENT '是否获取用户信息',
  304. `price` decimal(10,2) DEFAULT '0.00' COMMENT '获取用户价格',
  305. `video` varchar(255) DEFAULT NULL,
  306. `images` text,
  307. `is_top` int(11) DEFAULT '0',
  308. `topday` int(11) DEFAULT NULL,
  309. `top_money` bigint(20) DEFAULT NULL,
  310. `order_no` varchar(100) DEFAULT NULL,
  311. `paid_at` tinyint(1) DEFAULT '0',
  312. `paid_time` int(11) DEFAULT '0',
  313. `paid_no` varchar(100) DEFAULT NULL,
  314. `sort` int(11) DEFAULT '0',
  315. `views` int(11) DEFAULT '0' COMMENT '阅读人数',
  316. `like` int(11) DEFAULT '0' COMMENT '点赞人数',
  317. `like_face` text,
  318. `reply_num` int(11) DEFAULT '0' COMMENT '评论人数',
  319. `is_lock` tinyint(1) DEFAULT '0',
  320. `create_time` int(11) DEFAULT NULL,
  321. PRIMARY KEY (`id`),
  322. KEY `UID` (`uid`),
  323. KEY `MID` (`member_miniapp_id`),
  324. KEY `CITYID` (`citycode`) USING BTREE
  325. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  326. -- ----------------------------
  327. -- Table structure for ai_ais_info_cate
  328. -- ----------------------------
  329. DROP TABLE IF EXISTS `ai_ais_info_cate`;
  330. CREATE TABLE `ai_ais_info_cate` (
  331. `id` int(11) NOT NULL AUTO_INCREMENT,
  332. `member_miniapp_id` int(11) DEFAULT NULL,
  333. `title` varchar(50) DEFAULT NULL,
  334. `name` varchar(50) DEFAULT NULL,
  335. `tpl_id` int(11) DEFAULT NULL,
  336. `sort` int(11) DEFAULT '0',
  337. `update_time` int(11) DEFAULT NULL,
  338. `create_time` int(11) DEFAULT NULL,
  339. PRIMARY KEY (`id`),
  340. UNIQUE KEY `ID` (`id`) USING BTREE
  341. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='信息栏目';
  342. -- ----------------------------
  343. -- Table structure for ai_ais_info_follow
  344. -- ----------------------------
  345. DROP TABLE IF EXISTS `ai_ais_info_follow`;
  346. CREATE TABLE `ai_ais_info_follow` (
  347. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  348. `uid` int(11) DEFAULT NULL,
  349. `like_uid` int(11) DEFAULT NULL,
  350. PRIMARY KEY (`id`)
  351. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='关注与取消';
  352. -- ----------------------------
  353. -- Table structure for ai_ais_info_mp
  354. -- ----------------------------
  355. DROP TABLE IF EXISTS `ai_ais_info_mp`;
  356. CREATE TABLE `ai_ais_info_mp` (
  357. `id` int(11) NOT NULL AUTO_INCREMENT,
  358. `member_miniapp_id` int(11) DEFAULT NULL,
  359. `uid` bigint(20) DEFAULT NULL,
  360. `logo` varchar(100) DEFAULT NULL,
  361. `skin` varchar(255) DEFAULT NULL,
  362. `title` varchar(100) DEFAULT NULL,
  363. `note` varchar(100) DEFAULT NULL,
  364. `is_vip` tinyint(1) DEFAULT '0',
  365. `is_apply` tinyint(1) DEFAULT '0',
  366. `vip_title` varchar(100) DEFAULT NULL,
  367. `vip_about` varchar(255) DEFAULT NULL,
  368. `vip_time` int(11) DEFAULT NULL,
  369. `reg_time` int(11) DEFAULT NULL,
  370. `is_lock` tinyint(1) DEFAULT '0',
  371. `fans` int(255) DEFAULT '0',
  372. PRIMARY KEY (`id`)
  373. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  374. -- ----------------------------
  375. -- Table structure for ai_ais_info_order
  376. -- ----------------------------
  377. DROP TABLE IF EXISTS `ai_ais_info_order`;
  378. CREATE TABLE `ai_ais_info_order` (
  379. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  380. `member_miniapp_id` int(11) DEFAULT NULL,
  381. `info_id` int(11) DEFAULT NULL,
  382. `info_uid` int(11) DEFAULT NULL,
  383. `uid` int(11) DEFAULT NULL,
  384. `status` tinyint(1) DEFAULT '0',
  385. `is_del` tinyint(1) DEFAULT '0',
  386. `phone` varchar(255) DEFAULT NULL,
  387. `amount` decimal(10,2) DEFAULT '0.00' COMMENT '单商品价格总额',
  388. `order_no` varchar(50) DEFAULT NULL,
  389. `paid_at` tinyint(1) DEFAULT '0',
  390. `paid_time` int(11) DEFAULT NULL,
  391. `paid_no` varchar(255) DEFAULT NULL,
  392. `message` varchar(255) DEFAULT NULL,
  393. `fields` text,
  394. `cache` text,
  395. `create_time` int(11) DEFAULT NULL,
  396. PRIMARY KEY (`id`),
  397. UNIQUE KEY `ORDER_NO` (`order_no`) USING BTREE,
  398. KEY `IS_DEL` (`is_del`) USING BTREE,
  399. KEY `STATUS` (`status`) USING BTREE
  400. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  401. -- ----------------------------
  402. -- Table structure for ai_ais_info_reply
  403. -- ----------------------------
  404. DROP TABLE IF EXISTS `ai_ais_info_reply`;
  405. CREATE TABLE `ai_ais_info_reply` (
  406. `id` int(11) NOT NULL AUTO_INCREMENT,
  407. `member_miniapp_id` int(11) DEFAULT NULL,
  408. `uid` bigint(20) DEFAULT NULL,
  409. `info_id` int(11) DEFAULT NULL,
  410. `reply` varchar(255) DEFAULT NULL,
  411. `like` int(11) DEFAULT '0',
  412. `create_time` int(11) DEFAULT NULL,
  413. `state` tinyint(1) DEFAULT '0',
  414. PRIMARY KEY (`id`)
  415. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  416. -- ----------------------------
  417. -- Table structure for ai_ais_info_tpl
  418. -- ----------------------------
  419. DROP TABLE IF EXISTS `ai_ais_info_tpl`;
  420. CREATE TABLE `ai_ais_info_tpl` (
  421. `id` int(11) NOT NULL AUTO_INCREMENT,
  422. `member_miniapp_id` int(11) DEFAULT NULL,
  423. `name` varchar(20) DEFAULT NULL,
  424. `is_shop` tinyint(1) DEFAULT '0',
  425. `button_name` varchar(20) DEFAULT NULL,
  426. `tips` varchar(255) DEFAULT NULL,
  427. `users` text,
  428. `fields` text,
  429. `update_time` int(11) DEFAULT NULL,
  430. PRIMARY KEY (`id`)
  431. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品规格';
  432. -- ----------------------------
  433. -- Table structure for ai_ais_order
  434. -- ----------------------------
  435. DROP TABLE IF EXISTS `ai_ais_order`;
  436. CREATE TABLE `ai_ais_order` (
  437. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  438. `member_miniapp_id` int(11) DEFAULT NULL,
  439. `store_id` int(11) DEFAULT '0' COMMENT '总店',
  440. `store_chain_id` int(11) DEFAULT '0' COMMENT '分店',
  441. `uid` bigint(20) DEFAULT NULL,
  442. `coupon_user_id` int(11) DEFAULT NULL,
  443. `parent_store_id` int(11) DEFAULT '0',
  444. `parent_store_price` decimal(10,2) DEFAULT '0.00',
  445. `amount` decimal(10,2) DEFAULT NULL COMMENT '应付金额',
  446. `price` decimal(10,2) DEFAULT NULL COMMENT '实付金额',
  447. `state` tinyint(2) DEFAULT '0',
  448. `order_no` varchar(255) DEFAULT NULL,
  449. `paid_time` int(11) DEFAULT NULL,
  450. `paid_no` varchar(255) DEFAULT NULL,
  451. `coupon_cache` text,
  452. `update_time` int(11) DEFAULT NULL,
  453. PRIMARY KEY (`id`)
  454. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  455. -- ----------------------------
  456. -- Table structure for ai_ais_queen
  457. -- ----------------------------
  458. DROP TABLE IF EXISTS `ai_ais_queen`;
  459. CREATE TABLE `ai_ais_queen` (
  460. `id` int(11) NOT NULL AUTO_INCREMENT,
  461. `member_miniapp_id` int(11) DEFAULT NULL,
  462. `types` tinyint(1) DEFAULT '0' COMMENT '0:open|1:mchid',
  463. `store_id` bigint(20) DEFAULT NULL,
  464. `uid` bigint(20) DEFAULT NULL,
  465. `mch_id` bigint(20) DEFAULT NULL,
  466. `amount` int(11) DEFAULT NULL,
  467. `transaction_id` varchar(64) DEFAULT NULL,
  468. `out_order_no` varchar(64) DEFAULT NULL,
  469. `order_id` varchar(64) DEFAULT NULL,
  470. `is_finish` tinyint(1) DEFAULT NULL COMMENT '0排队1失败2成',
  471. `msg` varchar(255) DEFAULT NULL,
  472. `sms` varchar(255) DEFAULT NULL,
  473. `update_time` int(11) DEFAULT NULL,
  474. PRIMARY KEY (`id`)
  475. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务队列';
  476. -- ----------------------------
  477. -- Table structure for ai_ais_shop
  478. -- ----------------------------
  479. DROP TABLE IF EXISTS `ai_ais_shop`;
  480. CREATE TABLE `ai_ais_shop` (
  481. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  482. `store_id` int(11) DEFAULT NULL,
  483. `citycode` int(6) DEFAULT NULL,
  484. `member_miniapp_id` int(11) NOT NULL,
  485. `category_id` bigint(20) DEFAULT NULL,
  486. `coupon_id` bigint(20) DEFAULT NULL,
  487. `is_sale` tinyint(1) DEFAULT '0' COMMENT '0:下架、1:上架',
  488. `is_del` tinyint(1) DEFAULT '0',
  489. `types` tinyint(1) DEFAULT '0',
  490. `name` varchar(255) DEFAULT NULL,
  491. `title` varchar(255) DEFAULT NULL,
  492. `cost_price` decimal(10,2) DEFAULT NULL,
  493. `sell_price` decimal(10,2) DEFAULT '0.00',
  494. `market_price` decimal(10,2) DEFAULT '0.00',
  495. `vip_price` decimal(10,2) DEFAULT NULL,
  496. `points_price` int(11) DEFAULT NULL,
  497. `warehouse_num` int(11) DEFAULT '0',
  498. `warehouse_sellnum` int(11) DEFAULT '0',
  499. `imgs` text,
  500. `img` varchar(255) DEFAULT NULL,
  501. `group_title` varchar(255) DEFAULT NULL,
  502. `group_note` varchar(255) DEFAULT NULL,
  503. `group_img` varchar(255) DEFAULT NULL,
  504. `keyword` varchar(255) DEFAULT NULL,
  505. `notice` text,
  506. `like` int(11) DEFAULT '0',
  507. `share_ids` text,
  508. `share_price` int(11) DEFAULT NULL,
  509. `share_vip_price` int(11) DEFAULT NULL,
  510. `content` mediumtext,
  511. `sort` int(11) DEFAULT '0',
  512. `end_time` int(11) DEFAULT NULL,
  513. `update_time` int(11) DEFAULT NULL,
  514. PRIMARY KEY (`id`,`member_miniapp_id`),
  515. UNIQUE KEY `ID` (`id`) USING BTREE,
  516. KEY `IS_SALE` (`is_sale`) USING BTREE,
  517. KEY `CITYID` (`citycode`)
  518. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品主表';
  519. -- ----------------------------
  520. -- Table structure for ai_ais_shop_cate
  521. -- ----------------------------
  522. DROP TABLE IF EXISTS `ai_ais_shop_cate`;
  523. CREATE TABLE `ai_ais_shop_cate` (
  524. `id` int(11) NOT NULL AUTO_INCREMENT,
  525. `member_miniapp_id` int(11) DEFAULT NULL,
  526. `types` tinyint(1) DEFAULT '0',
  527. `show_type` tinyint(1) DEFAULT '0',
  528. `title` varchar(50) DEFAULT NULL,
  529. `content` varchar(255) DEFAULT NULL,
  530. `picture` varchar(100) DEFAULT NULL,
  531. `sort` int(11) DEFAULT '0',
  532. `update_time` int(11) DEFAULT NULL,
  533. `create_time` int(11) DEFAULT NULL,
  534. PRIMARY KEY (`id`),
  535. UNIQUE KEY `ID` (`id`) USING BTREE
  536. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品目录';
  537. -- ----------------------------
  538. -- Table structure for ai_ais_shop_coupon
  539. -- ----------------------------
  540. DROP TABLE IF EXISTS `ai_ais_shop_coupon`;
  541. CREATE TABLE `ai_ais_shop_coupon` (
  542. `id` int(11) NOT NULL AUTO_INCREMENT,
  543. `member_miniapp_id` int(11) DEFAULT NULL,
  544. `coupon_id` int(11) DEFAULT NULL,
  545. `shop_id` int(11) DEFAULT NULL,
  546. `create_time` int(11) DEFAULT NULL,
  547. PRIMARY KEY (`id`),
  548. KEY `STOREID` (`coupon_id`)
  549. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='支付有礼';
  550. -- ----------------------------
  551. -- Table structure for ai_ais_shop_order
  552. -- ----------------------------
  553. DROP TABLE IF EXISTS `ai_ais_shop_order`;
  554. CREATE TABLE `ai_ais_shop_order` (
  555. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  556. `member_miniapp_id` int(11) DEFAULT NULL,
  557. `store_id` int(11) DEFAULT NULL,
  558. `uid` int(11) DEFAULT NULL,
  559. `share_uid` int(11) DEFAULT NULL,
  560. `phone` varchar(255) DEFAULT NULL,
  561. `shop_id` int(11) DEFAULT NULL,
  562. `order_no` varchar(50) DEFAULT NULL,
  563. `status` tinyint(1) DEFAULT '0',
  564. `is_del` tinyint(1) DEFAULT '0',
  565. `sell_price` decimal(10,2) DEFAULT '0.00',
  566. `amount` decimal(10,2) DEFAULT '0.00' COMMENT '单商品价格总额',
  567. `points` int(11) DEFAULT NULL,
  568. `thrifty` decimal(10,2) DEFAULT NULL,
  569. `create_time` int(11) DEFAULT NULL,
  570. `paid_at` tinyint(1) DEFAULT '0',
  571. `paid_time` int(11) DEFAULT NULL,
  572. `paid_no` varchar(255) DEFAULT NULL,
  573. `message` varchar(255) DEFAULT NULL,
  574. `shop_cache` text,
  575. PRIMARY KEY (`id`),
  576. UNIQUE KEY `ORDER_NO` (`order_no`) USING BTREE,
  577. KEY `IS_DEL` (`is_del`) USING BTREE,
  578. KEY `STATUS` (`status`) USING BTREE
  579. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  580. -- ----------------------------
  581. -- Table structure for ai_ais_store
  582. -- ----------------------------
  583. DROP TABLE IF EXISTS `ai_ais_store`;
  584. CREATE TABLE `ai_ais_store` (
  585. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  586. `member_miniapp_id` int(11) DEFAULT NULL,
  587. `manage_uid` int(11) DEFAULT '0',
  588. `citypath` varchar(255) DEFAULT NULL,
  589. `citycode` int(6) DEFAULT NULL,
  590. `mch_id` int(11) DEFAULT NULL,
  591. `cate_id` int(11) DEFAULT NULL,
  592. `cate_sid` int(11) DEFAULT NULL,
  593. `name` varchar(255) DEFAULT NULL,
  594. `img` varchar(255) DEFAULT NULL,
  595. `imgs` text,
  596. `address` varchar(255) DEFAULT NULL,
  597. `telphone` varchar(255) DEFAULT NULL,
  598. `longitude` decimal(10,7) DEFAULT NULL COMMENT '地图坐标',
  599. `latitude` decimal(10,7) DEFAULT NULL,
  600. `charge` int(10) DEFAULT '0',
  601. `tags` text,
  602. `sort` int(11) DEFAULT '0',
  603. `is_top` tinyint(1) DEFAULT '0',
  604. `is_lock` tinyint(1) DEFAULT '0',
  605. `create_time` int(11) DEFAULT NULL,
  606. `views` int(11) DEFAULT '0',
  607. `likes` int(11) DEFAULT '0',
  608. PRIMARY KEY (`id`),
  609. KEY `APPID` (`member_miniapp_id`) USING BTREE,
  610. KEY `CID` (`cate_id`) USING BTREE,
  611. KEY `CITYID` (`citycode`)
  612. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  613. -- ----------------------------
  614. -- Table structure for ai_ais_store_bill
  615. -- ----------------------------
  616. DROP TABLE IF EXISTS `ai_ais_store_bill`;
  617. CREATE TABLE `ai_ais_store_bill` (
  618. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  619. `member_miniapp_id` int(11) DEFAULT NULL,
  620. `store_id` int(11) DEFAULT '0',
  621. `store_chain_id` int(11) DEFAULT '0',
  622. `pay_uid` bigint(20) DEFAULT '0',
  623. `money` decimal(10,2) DEFAULT '0.00',
  624. `message` tinytext,
  625. `update_time` int(11) DEFAULT NULL,
  626. PRIMARY KEY (`id`),
  627. UNIQUE KEY `ID` (`id`) USING BTREE,
  628. KEY `STORE_ID` (`store_id`) USING BTREE,
  629. KEY `UID` (`pay_uid`) USING BTREE
  630. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='好店账单';
  631. -- ----------------------------
  632. -- Table structure for ai_ais_store_cate
  633. -- ----------------------------
  634. DROP TABLE IF EXISTS `ai_ais_store_cate`;
  635. CREATE TABLE `ai_ais_store_cate` (
  636. `id` int(11) NOT NULL AUTO_INCREMENT,
  637. `member_miniapp_id` int(11) DEFAULT NULL,
  638. `parent_id` int(11) DEFAULT '0',
  639. `root_id` int(11) DEFAULT NULL,
  640. `title` varchar(50) DEFAULT NULL,
  641. `name` varchar(50) DEFAULT NULL,
  642. `picture` varchar(100) DEFAULT NULL,
  643. `sort` int(11) DEFAULT '0',
  644. `update_time` int(11) DEFAULT NULL,
  645. `create_time` int(11) DEFAULT NULL,
  646. PRIMARY KEY (`id`),
  647. UNIQUE KEY `ID` (`id`) USING BTREE,
  648. KEY `PARENT_ID` (`parent_id`,`root_id`) USING BTREE
  649. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分类信息栏目';
  650. -- ----------------------------
  651. -- Table structure for ai_ais_store_chain
  652. -- ----------------------------
  653. DROP TABLE IF EXISTS `ai_ais_store_chain`;
  654. CREATE TABLE `ai_ais_store_chain` (
  655. `id` int(11) NOT NULL AUTO_INCREMENT,
  656. `member_miniapp_id` int(11) DEFAULT NULL,
  657. `store_id` int(11) DEFAULT NULL,
  658. `title` varchar(100) DEFAULT NULL,
  659. `address` varchar(255) DEFAULT NULL,
  660. `telphone` varchar(50) DEFAULT NULL,
  661. `longitude` varchar(20) DEFAULT NULL,
  662. `latitude` varchar(20) DEFAULT NULL,
  663. `sort` int(11) DEFAULT '0',
  664. `update_time` int(11) DEFAULT NULL,
  665. PRIMARY KEY (`id`)
  666. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='连锁门店';
  667. -- ----------------------------
  668. -- Table structure for ai_ais_store_group
  669. -- ----------------------------
  670. DROP TABLE IF EXISTS `ai_ais_store_group`;
  671. CREATE TABLE `ai_ais_store_group` (
  672. `id` int(11) NOT NULL AUTO_INCREMENT,
  673. `member_miniapp_id` int(11) DEFAULT NULL,
  674. `title` varchar(50) DEFAULT NULL,
  675. `content` varchar(255) DEFAULT NULL,
  676. `face` varchar(255) DEFAULT NULL,
  677. `uid` int(11) DEFAULT NULL,
  678. `create_time` int(11) DEFAULT NULL,
  679. `update_time` int(11) DEFAULT NULL,
  680. PRIMARY KEY (`id`),
  681. UNIQUE KEY `ID` (`id`) USING BTREE
  682. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商圈';
  683. -- ----------------------------
  684. -- Table structure for ai_ais_store_union
  685. -- ----------------------------
  686. DROP TABLE IF EXISTS `ai_ais_store_union`;
  687. CREATE TABLE `ai_ais_store_union` (
  688. `id` int(11) NOT NULL AUTO_INCREMENT,
  689. `member_miniapp_id` int(11) DEFAULT NULL,
  690. `store_id` int(11) DEFAULT NULL,
  691. `group_id` int(11) DEFAULT NULL,
  692. `type` tinyint(2) DEFAULT NULL COMMENT '0正常 1待审核 2拒绝 3退出 4 踢出',
  693. `create_time` int(11) DEFAULT NULL,
  694. `update_time` int(11) DEFAULT NULL,
  695. PRIMARY KEY (`id`)
  696. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商家和圈关联';
  697. -- ----------------------------
  698. -- Table structure for ai_ais_store_worker
  699. -- ----------------------------
  700. DROP TABLE IF EXISTS `ai_ais_store_worker`;
  701. CREATE TABLE `ai_ais_store_worker` (
  702. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  703. `member_miniapp_id` int(11) DEFAULT NULL,
  704. `store_id` int(11) DEFAULT NULL,
  705. `uid` bigint(20) DEFAULT NULL,
  706. `is_cashier` tinyint(1) DEFAULT '0' COMMENT '是否收银员',
  707. PRIMARY KEY (`id`)
  708. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工作人员';
  709. -- ----------------------------
  710. -- Table structure for ai_ais_vip
  711. -- ----------------------------
  712. DROP TABLE IF EXISTS `ai_ais_vip`;
  713. CREATE TABLE `ai_ais_vip` (
  714. `id` int(11) NOT NULL AUTO_INCREMENT,
  715. `member_miniapp_id` int(11) DEFAULT NULL,
  716. `is_lock` tinyint(1) DEFAULT '0',
  717. `is_auto_up` tinyint(1) DEFAULT '0',
  718. `name` varchar(255) DEFAULT NULL,
  719. `rule` text,
  720. `price` decimal(10,2) DEFAULT NULL,
  721. `open_vip_num` int(11) DEFAULT NULL,
  722. `open_store_num` int(11) DEFAULT NULL,
  723. `pay_share_reward` tinyint(4) DEFAULT NULL,
  724. `pay_queue_reward` tinyint(4) DEFAULT NULL,
  725. `open_share_reward` decimal(10,2) DEFAULT NULL,
  726. `open_queue_reward` decimal(10,2) DEFAULT NULL,
  727. `icp_award` int(4) DEFAULT '0',
  728. `fund` decimal(10,2) DEFAULT NULL,
  729. `coupon_ids` varchar(255) DEFAULT NULL,
  730. `sort` int(11) DEFAULT '0',
  731. `update_time` int(11) DEFAULT NULL,
  732. PRIMARY KEY (`id`)
  733. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  734. -- ----------------------------
  735. -- Table structure for ai_ais_vip_order
  736. -- ----------------------------
  737. DROP TABLE IF EXISTS `ai_ais_vip_order`;
  738. CREATE TABLE `ai_ais_vip_order` (
  739. `id` int(11) NOT NULL AUTO_INCREMENT,
  740. `member_miniapp_id` int(11) DEFAULT NULL,
  741. `uid` int(11) DEFAULT '0',
  742. `vip_id` int(11) DEFAULT NULL,
  743. `amount` decimal(10,2) DEFAULT NULL,
  744. `state` tinyint(1) DEFAULT '0',
  745. `order_no` varchar(255) DEFAULT NULL,
  746. `paid_time` int(11) DEFAULT NULL,
  747. `paid_no` varchar(255) DEFAULT NULL,
  748. `coupon_ids` varchar(255) DEFAULT NULL,
  749. `create_time` int(11) DEFAULT NULL,
  750. PRIMARY KEY (`id`)
  751. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  752. -- ----------------------------
  753. -- Table structure for ai_ais_vip_user
  754. -- ----------------------------
  755. DROP TABLE IF EXISTS `ai_ais_vip_user`;
  756. CREATE TABLE `ai_ais_vip_user` (
  757. `id` int(11) NOT NULL AUTO_INCREMENT,
  758. `member_miniapp_id` int(11) DEFAULT NULL,
  759. `uid` int(11) DEFAULT '0',
  760. `vip_id` int(11) DEFAULT '0',
  761. `update_time` int(11) DEFAULT NULL,
  762. `point` int(11) DEFAULT NULL,
  763. `is_lock` tinyint(1) DEFAULT '0',
  764. PRIMARY KEY (`id`)
  765. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  766. SET FOREIGN_KEY_CHECKS=1;