install.sql 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339
  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:28:52
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for ai_allwin_adwords
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `ai_allwin_adwords`;
  17. CREATE TABLE `ai_allwin_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_allwin_bank
  32. -- ----------------------------
  33. DROP TABLE IF EXISTS `ai_allwin_bank`;
  34. CREATE TABLE `ai_allwin_bank` (
  35. `id` int(11) NOT NULL AUTO_INCREMENT,
  36. `member_miniapp_id` int(11) DEFAULT NULL,
  37. `user_id` bigint(20) DEFAULT NULL,
  38. `money` bigint(20) DEFAULT '0' COMMENT '帐号余额',
  39. `lack_money` bigint(20) DEFAULT '0' COMMENT '锁定金额',
  40. `due_money` bigint(20) DEFAULT '0' COMMENT '应付款',
  41. `shop_money` bigint(20) DEFAULT '0' COMMENT '购物积分',
  42. `income_money` bigint(20) DEFAULT '0' COMMENT '累计收益',
  43. `save_money` bigint(20) DEFAULT NULL,
  44. `update_time` int(11) DEFAULT NULL,
  45. PRIMARY KEY (`id`)
  46. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  47. -- ----------------------------
  48. -- Table structure for ai_allwin_bank_bill
  49. -- ----------------------------
  50. DROP TABLE IF EXISTS `ai_allwin_bank_bill`;
  51. CREATE TABLE `ai_allwin_bank_bill` (
  52. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  53. `member_miniapp_id` int(11) DEFAULT NULL,
  54. `store_id` int(11) DEFAULT '0',
  55. `user_id` bigint(20) DEFAULT '0',
  56. `pay_uid` bigint(20) DEFAULT '0',
  57. `money` decimal(10,2) DEFAULT '0.00',
  58. `message` tinytext,
  59. `update_time` int(11) DEFAULT NULL,
  60. PRIMARY KEY (`id`),
  61. KEY `id` (`id`),
  62. KEY `id_2` (`id`)
  63. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='个人财务记录';
  64. -- ----------------------------
  65. -- Table structure for ai_allwin_bank_cash
  66. -- ----------------------------
  67. DROP TABLE IF EXISTS `ai_allwin_bank_cash`;
  68. CREATE TABLE `ai_allwin_bank_cash` (
  69. `id` int(11) NOT NULL AUTO_INCREMENT,
  70. `member_miniapp_id` int(11) DEFAULT NULL,
  71. `user_id` bigint(20) DEFAULT NULL,
  72. `money` decimal(10,2) DEFAULT '0.00' COMMENT '申请金额',
  73. `realmoney` decimal(10,2) DEFAULT '0.00' COMMENT '实际到账',
  74. `update_time` int(11) DEFAULT NULL,
  75. `state` tinyint(1) DEFAULT '0' COMMENT '0新申请1通过-1不通过',
  76. `audit_time` int(11) DEFAULT NULL,
  77. `trade_no` varchar(100) DEFAULT NULL,
  78. `msg` varchar(255) DEFAULT NULL,
  79. PRIMARY KEY (`id`)
  80. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='提现申请列表';
  81. -- ----------------------------
  82. -- Table structure for ai_allwin_bank_recharge
  83. -- ----------------------------
  84. DROP TABLE IF EXISTS `ai_allwin_bank_recharge`;
  85. CREATE TABLE `ai_allwin_bank_recharge` (
  86. `id` int(11) NOT NULL AUTO_INCREMENT,
  87. `member_miniapp_id` int(11) DEFAULT NULL,
  88. `user_id` int(11) DEFAULT NULL,
  89. `money` decimal(10,2) DEFAULT NULL,
  90. `state` tinyint(1) DEFAULT '0',
  91. `order_no` varchar(255) DEFAULT NULL,
  92. `update_time` int(11) DEFAULT NULL,
  93. `paid_time` int(11) DEFAULT NULL,
  94. `paid_no` varchar(255) DEFAULT NULL,
  95. PRIMARY KEY (`id`)
  96. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  97. -- ----------------------------
  98. -- Table structure for ai_allwin_card
  99. -- ----------------------------
  100. DROP TABLE IF EXISTS `ai_allwin_card`;
  101. CREATE TABLE `ai_allwin_card` (
  102. `id` int(11) NOT NULL AUTO_INCREMENT,
  103. `is_lock` tinyint(1) DEFAULT '0',
  104. `member_miniapp_id` int(11) DEFAULT NULL,
  105. `coupon_num` int(11) DEFAULT '0',
  106. `store_id` int(11) DEFAULT NULL,
  107. `name` varchar(255) DEFAULT NULL,
  108. `price` decimal(11,2) DEFAULT NULL,
  109. `tips` text,
  110. `coupon_id` bigint(20) DEFAULT NULL,
  111. `coupon_ids` text,
  112. `locktime` int(11) DEFAULT NULL,
  113. `create_time` int(11) DEFAULT NULL,
  114. `update_time` int(11) DEFAULT NULL,
  115. PRIMARY KEY (`id`)
  116. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  117. -- ----------------------------
  118. -- Table structure for ai_allwin_card_user
  119. -- ----------------------------
  120. DROP TABLE IF EXISTS `ai_allwin_card_user`;
  121. CREATE TABLE `ai_allwin_card_user` (
  122. `id` int(11) NOT NULL AUTO_INCREMENT,
  123. `member_miniapp_id` int(11) DEFAULT NULL,
  124. `user_coupon_id` bigint(11) DEFAULT '0',
  125. `store_id` int(11) DEFAULT NULL,
  126. `card_id` int(11) DEFAULT NULL,
  127. `user_id` bigint(11) DEFAULT NULL,
  128. `amount` decimal(11,2) DEFAULT NULL,
  129. `create_time` int(11) DEFAULT NULL,
  130. `update_time` int(11) DEFAULT NULL,
  131. PRIMARY KEY (`id`),
  132. KEY `UID` (`user_id`) USING BTREE,
  133. KEY `APIID` (`member_miniapp_id`) USING BTREE
  134. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  135. -- ----------------------------
  136. -- Table structure for ai_allwin_card_user_order
  137. -- ----------------------------
  138. DROP TABLE IF EXISTS `ai_allwin_card_user_order`;
  139. CREATE TABLE `ai_allwin_card_user_order` (
  140. `id` int(11) NOT NULL AUTO_INCREMENT,
  141. `member_miniapp_id` int(11) DEFAULT NULL,
  142. `store_id` int(11) DEFAULT NULL,
  143. `user_id` bigint(11) DEFAULT NULL,
  144. `card_id` int(11) DEFAULT NULL,
  145. `coupon_id` bigint(11) DEFAULT NULL,
  146. `user_card_id` int(11) DEFAULT NULL,
  147. `coupon_ids` varchar(255) DEFAULT NULL COMMENT '赠品列表',
  148. `state` tinyint(1) DEFAULT '0',
  149. `amount` decimal(10,2) DEFAULT NULL,
  150. `order_no` varchar(255) DEFAULT NULL,
  151. `paid_time` int(11) DEFAULT NULL,
  152. `create_time` int(11) DEFAULT NULL,
  153. PRIMARY KEY (`id`),
  154. KEY `UID` (`user_id`),
  155. KEY `APIID` (`member_miniapp_id`)
  156. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  157. -- ----------------------------
  158. -- Table structure for ai_allwin_config
  159. -- ----------------------------
  160. DROP TABLE IF EXISTS `ai_allwin_config`;
  161. CREATE TABLE `ai_allwin_config` (
  162. `member_miniapp_id` int(11) NOT NULL,
  163. `service_telephone` varchar(100) DEFAULT NULL,
  164. `default_charges` tinyint(4) DEFAULT '0',
  165. `cash_charges` tinyint(4) DEFAULT '0',
  166. `agent_rebate` tinyint(4) DEFAULT '0' COMMENT '代理',
  167. `store_rebate` tinyint(4) DEFAULT '0' COMMENT '好店',
  168. `company_rebate` tinyint(4) DEFAULT '0' COMMENT '分公司',
  169. `workers_rebate` tinyint(4) DEFAULT '0' COMMENT '分公司员工',
  170. `workers_on_amount` decimal(10,2) DEFAULT NULL,
  171. `is_dopay_on_vip` tinyint(1) DEFAULT '0' COMMENT '买单开通拓客',
  172. `is_fees_types` tinyint(1) DEFAULT '0' COMMENT '买单收费模式',
  173. `is_psp` tinyint(1) DEFAULT NULL,
  174. `is_wechat_profitsharing` tinyint(1) DEFAULT '0' COMMENT '是否微信分账',
  175. `is_wechat_touser` tinyint(1) DEFAULT NULL,
  176. `is_wechat_redpacket` tinyint(1) DEFAULT NULL,
  177. `tplmsg_order` varchar(100) DEFAULT NULL COMMENT '支付成功通知',
  178. `tplmsg_point` varchar(100) DEFAULT NULL COMMENT '积分兑换通知',
  179. `workers_on_store` decimal(10,2) DEFAULT NULL,
  180. `workers_discount` decimal(10,2) DEFAULT NULL,
  181. `sla` text,
  182. `agent_on_amount` decimal(10,2) DEFAULT NULL,
  183. `article` text,
  184. PRIMARY KEY (`member_miniapp_id`),
  185. UNIQUE KEY `APPID` (`member_miniapp_id`)
  186. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  187. -- ----------------------------
  188. -- Table structure for ai_allwin_coupon
  189. -- ----------------------------
  190. DROP TABLE IF EXISTS `ai_allwin_coupon`;
  191. CREATE TABLE `ai_allwin_coupon` (
  192. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  193. `member_miniapp_id` int(11) DEFAULT NULL,
  194. `store_id` int(11) DEFAULT NULL,
  195. `cate_sid` int(11) DEFAULT NULL,
  196. `is_top` tinyint(1) DEFAULT NULL,
  197. `is_lock` tinyint(1) DEFAULT '0',
  198. `is_platform` tinyint(1) DEFAULT '0' COMMENT '是否平台卷1是',
  199. `is_check` tinyint(1) DEFAULT '0',
  200. `is_shop` tinyint(1) DEFAULT '0',
  201. `is_vip` tinyint(1) DEFAULT '0',
  202. `is_end` tinyint(1) DEFAULT '0' COMMENT '是否过期失效',
  203. `cate_id` int(11) DEFAULT NULL,
  204. `longtime` int(10) DEFAULT '0' COMMENT '使用间隔',
  205. `daynum` int(11) DEFAULT '1' COMMENT '每次几次',
  206. `ontypes` tinyint(1) DEFAULT '0' COMMENT '生效方式[0立即生效]',
  207. `types` tinyint(1) DEFAULT '0' COMMENT '0满减1打折卷',
  208. `num` int(10) DEFAULT NULL COMMENT '发现总量',
  209. `num_of` int(10) DEFAULT '1',
  210. `theme` varchar(20) DEFAULT NULL,
  211. `img` varchar(255) DEFAULT NULL,
  212. `name` varchar(255) DEFAULT NULL,
  213. `size` decimal(10,2) DEFAULT NULL,
  214. `pay_price` decimal(10,2) DEFAULT '2.00' COMMENT '元',
  215. `shop_price` decimal(10,2) DEFAULT NULL,
  216. `price` decimal(10,2) DEFAULT NULL COMMENT '分',
  217. `discount` int(5) DEFAULT '0',
  218. `weekday` varchar(100) DEFAULT NULL,
  219. `howmuch` int(10) DEFAULT NULL COMMENT '分',
  220. `starttime` int(11) DEFAULT NULL,
  221. `endtime` int(11) DEFAULT NULL,
  222. `tips` varchar(255) DEFAULT NULL,
  223. `sort` int(11) DEFAULT '0',
  224. `update_time` int(11) DEFAULT NULL,
  225. `create_time` int(11) DEFAULT NULL COMMENT '0',
  226. PRIMARY KEY (`id`),
  227. KEY `APPID` (`member_miniapp_id`),
  228. KEY `STOREID` (`store_id`)
  229. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  230. -- ----------------------------
  231. -- Table structure for ai_allwin_coupon_log
  232. -- ----------------------------
  233. DROP TABLE IF EXISTS `ai_allwin_coupon_log`;
  234. CREATE TABLE `ai_allwin_coupon_log` (
  235. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  236. `member_miniapp_id` int(11) DEFAULT NULL,
  237. `uid` bigint(20) DEFAULT NULL,
  238. `coupon_id` int(11) DEFAULT NULL,
  239. `amount` decimal(10,2) DEFAULT NULL,
  240. `times` int(11) DEFAULT NULL,
  241. PRIMARY KEY (`id`)
  242. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='赠品使用日志';
  243. -- ----------------------------
  244. -- Table structure for ai_allwin_coupon_order
  245. -- ----------------------------
  246. DROP TABLE IF EXISTS `ai_allwin_coupon_order`;
  247. CREATE TABLE `ai_allwin_coupon_order` (
  248. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  249. `member_miniapp_id` int(11) DEFAULT NULL,
  250. `user_id` int(11) DEFAULT NULL,
  251. `store_id` int(11) DEFAULT NULL,
  252. `coupon_ids` varchar(255) DEFAULT NULL,
  253. `order_no` varchar(255) DEFAULT NULL,
  254. `amount` decimal(10,2) DEFAULT NULL,
  255. `state` tinyint(1) DEFAULT '0',
  256. `paid_time` int(11) DEFAULT NULL,
  257. `paid_no` varchar(255) DEFAULT NULL,
  258. `update_time` int(11) DEFAULT NULL,
  259. PRIMARY KEY (`id`)
  260. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='赠品购买订单';
  261. -- ----------------------------
  262. -- Table structure for ai_allwin_coupon_subsidize
  263. -- ----------------------------
  264. DROP TABLE IF EXISTS `ai_allwin_coupon_subsidize`;
  265. CREATE TABLE `ai_allwin_coupon_subsidize` (
  266. `id` int(11) NOT NULL AUTO_INCREMENT,
  267. `member_miniapp_id` int(11) DEFAULT NULL,
  268. `coupon_id` int(11) NOT NULL COMMENT '赠品ID',
  269. `how_much` decimal(10,2) DEFAULT NULL COMMENT '补贴金额',
  270. PRIMARY KEY (`id`)
  271. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='平台补贴的赠品';
  272. -- ----------------------------
  273. -- Table structure for ai_allwin_coupon_user
  274. -- ----------------------------
  275. DROP TABLE IF EXISTS `ai_allwin_coupon_user`;
  276. CREATE TABLE `ai_allwin_coupon_user` (
  277. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  278. `member_miniapp_id` int(11) DEFAULT NULL,
  279. `store_id` int(11) DEFAULT NULL,
  280. `coupon_id` int(11) DEFAULT NULL,
  281. `uid` bigint(20) DEFAULT NULL,
  282. `is_end` tinyint(1) DEFAULT '0',
  283. `longtime` int(10) DEFAULT NULL COMMENT '使用间隔',
  284. `daynum` int(11) DEFAULT '1' COMMENT '每次几次',
  285. `ontypes` tinyint(1) DEFAULT '0' COMMENT '生效方式[0立即生效]',
  286. `types` tinyint(4) DEFAULT '0' COMMENT '0满减1打折卷',
  287. `starttime` int(11) DEFAULT NULL,
  288. `endtime` int(11) DEFAULT NULL,
  289. `name` varchar(255) DEFAULT NULL,
  290. `size` decimal(10,2) DEFAULT NULL,
  291. `user_size` decimal(10,2) DEFAULT '0.00',
  292. `price` decimal(10,2) DEFAULT NULL COMMENT '分',
  293. `discount` int(5) DEFAULT NULL,
  294. `weekday` varchar(100) DEFAULT NULL,
  295. `howmuch` int(10) DEFAULT NULL COMMENT '元',
  296. `tips` varchar(255) DEFAULT NULL,
  297. `update_time` int(11) DEFAULT NULL,
  298. `create_time` int(11) DEFAULT NULL,
  299. PRIMARY KEY (`id`),
  300. KEY `APPID` (`member_miniapp_id`),
  301. KEY `STOREID` (`store_id`)
  302. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户的赠品';
  303. -- ----------------------------
  304. -- Table structure for ai_allwin_ecard
  305. -- ----------------------------
  306. DROP TABLE IF EXISTS `ai_allwin_ecard`;
  307. CREATE TABLE `ai_allwin_ecard` (
  308. `id` int(11) NOT NULL AUTO_INCREMENT,
  309. `member_miniapp_id` int(11) DEFAULT NULL,
  310. `brand_name` varchar(255) DEFAULT NULL,
  311. `title` varchar(255) DEFAULT NULL,
  312. `notice` varchar(255) DEFAULT NULL,
  313. `description` varchar(255) DEFAULT NULL,
  314. `prerogative` varchar(255) DEFAULT NULL,
  315. `quantity` int(11) DEFAULT NULL,
  316. `color` varchar(50) DEFAULT NULL,
  317. `picture` varchar(100) DEFAULT NULL,
  318. `card_id` varchar(255) DEFAULT NULL,
  319. `start_time` int(11) DEFAULT NULL,
  320. `end_time` int(11) DEFAULT NULL,
  321. `gh_id` varchar(255) DEFAULT NULL,
  322. `annual_fee` decimal(10,2) DEFAULT NULL,
  323. `ids` varchar(255) DEFAULT NULL,
  324. `create_time` int(11) DEFAULT NULL,
  325. PRIMARY KEY (`id`),
  326. UNIQUE KEY `ID` (`id`) USING BTREE
  327. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分类信息栏目';
  328. -- ----------------------------
  329. -- Table structure for ai_allwin_ecard_order
  330. -- ----------------------------
  331. DROP TABLE IF EXISTS `ai_allwin_ecard_order`;
  332. CREATE TABLE `ai_allwin_ecard_order` (
  333. `id` int(11) NOT NULL AUTO_INCREMENT,
  334. `member_miniapp_id` int(11) DEFAULT NULL,
  335. `card_id` varchar(255) DEFAULT NULL,
  336. `uid` int(11) DEFAULT NULL,
  337. `order_no` varchar(50) DEFAULT NULL,
  338. `status` tinyint(2) DEFAULT '0',
  339. `create_time` int(11) DEFAULT NULL,
  340. `amount` decimal(10,2) DEFAULT NULL,
  341. `paid_at` tinyint(1) DEFAULT '0',
  342. `paid_time` int(11) DEFAULT NULL,
  343. `paid_no` varchar(255) DEFAULT NULL,
  344. PRIMARY KEY (`id`),
  345. UNIQUE KEY `ID` (`id`) USING BTREE
  346. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分类信息栏目';
  347. -- ----------------------------
  348. -- Table structure for ai_allwin_ecard_user
  349. -- ----------------------------
  350. DROP TABLE IF EXISTS `ai_allwin_ecard_user`;
  351. CREATE TABLE `ai_allwin_ecard_user` (
  352. `id` int(11) NOT NULL AUTO_INCREMENT,
  353. `member_miniapp_id` int(11) DEFAULT NULL,
  354. `card_id` varchar(255) DEFAULT NULL,
  355. `code` varchar(255) DEFAULT NULL,
  356. `uid` int(11) DEFAULT NULL,
  357. `outer_str` varchar(255) DEFAULT NULL,
  358. `is_del` tinyint(2) DEFAULT '0',
  359. `create_time` int(11) DEFAULT NULL,
  360. PRIMARY KEY (`id`),
  361. UNIQUE KEY `ID` (`id`) USING BTREE
  362. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分类信息栏目';
  363. -- ----------------------------
  364. -- Table structure for ai_allwin_fund
  365. -- ----------------------------
  366. DROP TABLE IF EXISTS `ai_allwin_fund`;
  367. CREATE TABLE `ai_allwin_fund` (
  368. `id` int(11) NOT NULL AUTO_INCREMENT,
  369. `member_miniapp_id` int(11) DEFAULT NULL,
  370. `balance` decimal(10,2) DEFAULT NULL,
  371. `subsidize` decimal(10,2) DEFAULT NULL,
  372. `subsidize_num` int(11) DEFAULT NULL,
  373. PRIMARY KEY (`id`)
  374. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='采购基金';
  375. -- ----------------------------
  376. -- Table structure for ai_allwin_fund_bill
  377. -- ----------------------------
  378. DROP TABLE IF EXISTS `ai_allwin_fund_bill`;
  379. CREATE TABLE `ai_allwin_fund_bill` (
  380. `id` int(11) NOT NULL AUTO_INCREMENT,
  381. `member_miniapp_id` int(11) DEFAULT NULL,
  382. `store_id` int(11) DEFAULT NULL,
  383. `uid` int(11) DEFAULT NULL,
  384. `types` tinyint(13) DEFAULT NULL COMMENT '0入1出',
  385. `money` decimal(10,2) DEFAULT NULL,
  386. `order_no` varchar(100) DEFAULT NULL,
  387. `update_time` int(11) DEFAULT NULL,
  388. PRIMARY KEY (`id`)
  389. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='基金账单';
  390. -- ----------------------------
  391. -- Table structure for ai_allwin_gift
  392. -- ----------------------------
  393. DROP TABLE IF EXISTS `ai_allwin_gift`;
  394. CREATE TABLE `ai_allwin_gift` (
  395. `id` int(11) NOT NULL AUTO_INCREMENT,
  396. `member_miniapp_id` int(11) DEFAULT NULL,
  397. `types` varchar(255) DEFAULT '0',
  398. `pay_num` int(11) DEFAULT '0',
  399. `pay_amount` varchar(255) DEFAULT '0',
  400. `coupon_id` int(11) DEFAULT '0',
  401. `title` varchar(255) DEFAULT NULL,
  402. `share_img` varchar(255) DEFAULT NULL,
  403. `share_title` varchar(50) DEFAULT NULL,
  404. `share_text` varchar(100) DEFAULT NULL,
  405. `note` text,
  406. `start_time` int(11) DEFAULT NULL,
  407. `end_time` int(11) DEFAULT NULL,
  408. `views` int(11) DEFAULT '0',
  409. `is_lock` tinyint(1) DEFAULT '0',
  410. PRIMARY KEY (`id`)
  411. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='支付有礼';
  412. -- ----------------------------
  413. -- Table structure for ai_allwin_gift_data
  414. -- ----------------------------
  415. DROP TABLE IF EXISTS `ai_allwin_gift_data`;
  416. CREATE TABLE `ai_allwin_gift_data` (
  417. `id` int(11) NOT NULL AUTO_INCREMENT,
  418. `uid` int(11) DEFAULT NULL,
  419. `gift_id` int(11) DEFAULT NULL,
  420. `pay_num` int(11) DEFAULT '0',
  421. `pay_amount` decimal(10,2) DEFAULT '0.00',
  422. `coupon_id` int(11) DEFAULT '0',
  423. `update_time` int(11) DEFAULT NULL COMMENT '获增时间',
  424. `is_take` tinyint(1) DEFAULT '0',
  425. `take_time` int(11) DEFAULT NULL,
  426. PRIMARY KEY (`id`),
  427. KEY `GIFTID` (`gift_id`),
  428. KEY `UID` (`uid`)
  429. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='支付有礼';
  430. -- ----------------------------
  431. -- Table structure for ai_allwin_gift_store
  432. -- ----------------------------
  433. DROP TABLE IF EXISTS `ai_allwin_gift_store`;
  434. CREATE TABLE `ai_allwin_gift_store` (
  435. `id` int(11) NOT NULL AUTO_INCREMENT,
  436. `member_miniapp_id` int(11) DEFAULT NULL,
  437. `is_lock` tinyint(1) DEFAULT '0',
  438. `gift_id` int(11) DEFAULT NULL,
  439. `store_id` int(11) DEFAULT NULL,
  440. PRIMARY KEY (`id`),
  441. KEY `STOREID` (`is_lock`,`gift_id`)
  442. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='支付有礼';
  443. -- ----------------------------
  444. -- Table structure for ai_allwin_info
  445. -- ----------------------------
  446. DROP TABLE IF EXISTS `ai_allwin_info`;
  447. CREATE TABLE `ai_allwin_info` (
  448. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  449. `cate_id` int(11) DEFAULT NULL,
  450. `store_id` int(11) DEFAULT '0',
  451. `user_id` bigint(20) DEFAULT NULL,
  452. `member_miniapp_id` int(11) DEFAULT NULL,
  453. `themes` text,
  454. `fields` text,
  455. `telphone` varchar(255) DEFAULT NULL,
  456. `url_slogan` varchar(255) DEFAULT NULL,
  457. `links` varchar(255) DEFAULT NULL,
  458. `is_get` tinyint(2) DEFAULT '0' COMMENT '是否获取用户信息',
  459. `price` decimal(10,2) DEFAULT '0.00' COMMENT '获取用户价格',
  460. `video` varchar(255) DEFAULT NULL,
  461. `images` text,
  462. `is_top` int(11) DEFAULT '0',
  463. `topday` int(11) DEFAULT NULL,
  464. `top_money` bigint(20) DEFAULT NULL,
  465. `is_pay` tinyint(1) DEFAULT '0',
  466. `is_lock` tinyint(1) DEFAULT '0',
  467. `is_pay_time` int(11) DEFAULT '0',
  468. `order_no` varchar(100) DEFAULT NULL,
  469. `sort` int(11) DEFAULT '0',
  470. `views` int(11) DEFAULT '0' COMMENT '阅读人数',
  471. `like` int(11) DEFAULT '0' COMMENT '点赞人数',
  472. `like_face` text,
  473. `reply_num` int(11) DEFAULT '0' COMMENT '评论人数',
  474. `create_time` int(11) DEFAULT NULL,
  475. PRIMARY KEY (`id`)
  476. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  477. -- ----------------------------
  478. -- Table structure for ai_allwin_info_cate
  479. -- ----------------------------
  480. DROP TABLE IF EXISTS `ai_allwin_info_cate`;
  481. CREATE TABLE `ai_allwin_info_cate` (
  482. `id` int(11) NOT NULL AUTO_INCREMENT,
  483. `member_miniapp_id` int(11) DEFAULT NULL,
  484. `title` varchar(50) DEFAULT NULL,
  485. `name` varchar(50) DEFAULT NULL,
  486. `picture` varchar(100) DEFAULT NULL,
  487. `tpl_id` int(11) DEFAULT NULL,
  488. `sort` int(11) DEFAULT '0',
  489. `update_time` int(11) DEFAULT NULL,
  490. `create_time` int(11) DEFAULT NULL,
  491. PRIMARY KEY (`id`),
  492. UNIQUE KEY `ID` (`id`) USING BTREE
  493. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='信息栏目';
  494. -- ----------------------------
  495. -- Table structure for ai_allwin_info_config
  496. -- ----------------------------
  497. DROP TABLE IF EXISTS `ai_allwin_info_config`;
  498. CREATE TABLE `ai_allwin_info_config` (
  499. `id` int(11) NOT NULL AUTO_INCREMENT,
  500. `member_miniapp_id` int(11) DEFAULT NULL,
  501. `topday` varchar(255) DEFAULT NULL COMMENT '置顶',
  502. `charge` tinyint(4) DEFAULT '0',
  503. `bring` tinyint(4) DEFAULT NULL,
  504. `reward` tinyint(4) DEFAULT NULL,
  505. PRIMARY KEY (`id`)
  506. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  507. -- ----------------------------
  508. -- Table structure for ai_allwin_info_follow
  509. -- ----------------------------
  510. DROP TABLE IF EXISTS `ai_allwin_info_follow`;
  511. CREATE TABLE `ai_allwin_info_follow` (
  512. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  513. `uid` int(11) DEFAULT NULL,
  514. `like_uid` int(11) DEFAULT NULL,
  515. PRIMARY KEY (`id`)
  516. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='关注与取消';
  517. -- ----------------------------
  518. -- Table structure for ai_allwin_info_mp
  519. -- ----------------------------
  520. DROP TABLE IF EXISTS `ai_allwin_info_mp`;
  521. CREATE TABLE `ai_allwin_info_mp` (
  522. `id` int(11) NOT NULL AUTO_INCREMENT,
  523. `member_miniapp_id` int(11) DEFAULT NULL,
  524. `uid` bigint(20) DEFAULT NULL,
  525. `logo` varchar(100) DEFAULT NULL,
  526. `skin` varchar(255) DEFAULT NULL,
  527. `title` varchar(100) DEFAULT NULL,
  528. `note` varchar(100) DEFAULT NULL,
  529. `is_vip` tinyint(1) DEFAULT '0',
  530. `is_apply` tinyint(1) DEFAULT '0',
  531. `vip_title` varchar(100) DEFAULT NULL,
  532. `vip_about` varchar(255) DEFAULT NULL,
  533. `vip_time` int(11) DEFAULT NULL,
  534. `reg_time` int(11) DEFAULT NULL,
  535. `is_lock` tinyint(1) DEFAULT '0',
  536. `fans` int(255) DEFAULT '0',
  537. PRIMARY KEY (`id`)
  538. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  539. -- ----------------------------
  540. -- Table structure for ai_allwin_info_order
  541. -- ----------------------------
  542. DROP TABLE IF EXISTS `ai_allwin_info_order`;
  543. CREATE TABLE `ai_allwin_info_order` (
  544. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  545. `member_miniapp_id` int(11) DEFAULT NULL,
  546. `info_id` int(11) DEFAULT NULL,
  547. `info_uid` int(11) DEFAULT NULL,
  548. `uid` int(11) DEFAULT NULL,
  549. `status` tinyint(1) DEFAULT '0',
  550. `is_del` tinyint(1) DEFAULT '0',
  551. `phone` varchar(255) DEFAULT NULL,
  552. `amount` decimal(10,2) DEFAULT '0.00' COMMENT '单商品价格总额',
  553. `order_no` varchar(50) DEFAULT NULL,
  554. `paid_at` tinyint(1) DEFAULT '0',
  555. `paid_time` int(11) DEFAULT NULL,
  556. `paid_no` varchar(255) DEFAULT NULL,
  557. `message` varchar(255) DEFAULT NULL,
  558. `fields` text,
  559. `cache` text,
  560. `create_time` int(11) DEFAULT NULL,
  561. PRIMARY KEY (`id`),
  562. UNIQUE KEY `ORDER_NO` (`order_no`) USING BTREE,
  563. KEY `IS_DEL` (`is_del`) USING BTREE,
  564. KEY `STATUS` (`status`) USING BTREE
  565. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  566. -- ----------------------------
  567. -- Table structure for ai_allwin_info_reply
  568. -- ----------------------------
  569. DROP TABLE IF EXISTS `ai_allwin_info_reply`;
  570. CREATE TABLE `ai_allwin_info_reply` (
  571. `id` int(11) NOT NULL AUTO_INCREMENT,
  572. `member_miniapp_id` int(11) DEFAULT NULL,
  573. `user_id` bigint(20) DEFAULT NULL,
  574. `info_id` int(11) DEFAULT NULL,
  575. `reply` varchar(255) DEFAULT NULL,
  576. `like` int(11) DEFAULT '0',
  577. `create_time` int(11) DEFAULT NULL,
  578. `state` tinyint(1) DEFAULT '0',
  579. PRIMARY KEY (`id`)
  580. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  581. -- ----------------------------
  582. -- Table structure for ai_allwin_info_share
  583. -- ----------------------------
  584. DROP TABLE IF EXISTS `ai_allwin_info_share`;
  585. CREATE TABLE `ai_allwin_info_share` (
  586. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  587. `uid` bigint(20) DEFAULT NULL,
  588. `info_id` bigint(20) DEFAULT NULL,
  589. `views` int(11) DEFAULT NULL,
  590. `times` int(11) DEFAULT NULL,
  591. PRIMARY KEY (`id`)
  592. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  593. -- ----------------------------
  594. -- Table structure for ai_allwin_info_tpl
  595. -- ----------------------------
  596. DROP TABLE IF EXISTS `ai_allwin_info_tpl`;
  597. CREATE TABLE `ai_allwin_info_tpl` (
  598. `id` int(11) NOT NULL AUTO_INCREMENT,
  599. `member_miniapp_id` int(11) DEFAULT NULL,
  600. `name` varchar(20) DEFAULT NULL,
  601. `is_shop` tinyint(1) DEFAULT '0',
  602. `button_name` varchar(20) DEFAULT NULL,
  603. `tips` varchar(255) DEFAULT NULL,
  604. `users` text,
  605. `fields` text,
  606. `update_time` int(11) DEFAULT NULL,
  607. PRIMARY KEY (`id`)
  608. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品规格';
  609. -- ----------------------------
  610. -- Table structure for ai_allwin_mch
  611. -- ----------------------------
  612. DROP TABLE IF EXISTS `ai_allwin_mch`;
  613. CREATE TABLE `ai_allwin_mch` (
  614. `id` int(11) NOT NULL AUTO_INCREMENT,
  615. `member_miniapp_id` int(11) DEFAULT NULL,
  616. `member_id` int(11) DEFAULT NULL,
  617. `mchid` bigint(20) DEFAULT NULL,
  618. `store_name` varchar(255) DEFAULT NULL,
  619. `merchant_shortname` varchar(100) DEFAULT NULL,
  620. `store_street` varchar(255) DEFAULT NULL,
  621. `contact_phone` varchar(20) DEFAULT NULL,
  622. `applyment_id` varchar(100) DEFAULT NULL,
  623. `store_entrance_pic` varchar(255) DEFAULT NULL,
  624. `store_entrance_pic_media_id` varchar(255) DEFAULT NULL,
  625. `indoor_pic` varchar(255) DEFAULT NULL,
  626. `indoor_pic_media_id` varchar(255) DEFAULT NULL,
  627. `product_desc` varchar(255) DEFAULT NULL,
  628. `id_card_valid_time` varchar(255) DEFAULT NULL,
  629. `id_card_name` varchar(30) DEFAULT NULL,
  630. `id_card_number` varchar(30) DEFAULT NULL,
  631. `id_card_copy` varchar(255) DEFAULT NULL,
  632. `id_card_copy_media_id` varchar(255) DEFAULT NULL,
  633. `id_card_national` varchar(255) DEFAULT NULL,
  634. `id_card_national_media_id` varchar(255) DEFAULT NULL,
  635. `id_card_start_time` varchar(100) DEFAULT NULL,
  636. `id_card_end_time` varchar(100) DEFAULT NULL,
  637. `account_bank` varchar(100) DEFAULT NULL,
  638. `account_number` varchar(50) DEFAULT NULL,
  639. `bank_address_code` varchar(30) DEFAULT NULL,
  640. `business_code` varchar(50) DEFAULT NULL,
  641. `is_types` tinyint(1) DEFAULT '0' COMMENT '0普通商户1小微商户',
  642. `is_default` tinyint(1) DEFAULT '0' COMMENT '1默认',
  643. `is_pass` tinyint(1) DEFAULT '0' COMMENT '0待提审1审核中2通过-1失败',
  644. `is_delete` tinyint(1) DEFAULT '0' COMMENT '允许删除0允许 1不允许',
  645. `status` tinyint(1) DEFAULT '0' COMMENT '1锁定0正常',
  646. `create_time` int(11) DEFAULT NULL,
  647. `update_time` int(11) DEFAULT NULL,
  648. PRIMARY KEY (`id`)
  649. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  650. -- ----------------------------
  651. -- Table structure for ai_allwin_mch_queen
  652. -- ----------------------------
  653. DROP TABLE IF EXISTS `ai_allwin_mch_queen`;
  654. CREATE TABLE `ai_allwin_mch_queen` (
  655. `id` int(11) NOT NULL AUTO_INCREMENT,
  656. `member_miniapp_id` int(11) DEFAULT NULL,
  657. `types` tinyint(1) DEFAULT '0' COMMENT '0:open|1:mchid',
  658. `store_id` bigint(20) DEFAULT NULL,
  659. `uid` bigint(20) DEFAULT NULL,
  660. `mch_id` bigint(20) DEFAULT NULL,
  661. `amount` int(11) DEFAULT NULL,
  662. `transaction_id` varchar(64) DEFAULT NULL,
  663. `out_order_no` varchar(64) DEFAULT NULL,
  664. `order_id` varchar(64) DEFAULT NULL,
  665. `is_finish` tinyint(1) DEFAULT NULL COMMENT '0排队1失败2成',
  666. `msg` varchar(255) DEFAULT NULL,
  667. `sms` varchar(255) DEFAULT NULL,
  668. `update_time` int(11) DEFAULT NULL,
  669. PRIMARY KEY (`id`)
  670. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  671. -- ----------------------------
  672. -- Table structure for ai_allwin_mch_user
  673. -- ----------------------------
  674. DROP TABLE IF EXISTS `ai_allwin_mch_user`;
  675. CREATE TABLE `ai_allwin_mch_user` (
  676. `id` int(11) NOT NULL AUTO_INCREMENT,
  677. `member_miniapp_id` int(11) DEFAULT NULL,
  678. `store_id` int(11) DEFAULT NULL,
  679. `types` tinyint(1) DEFAULT '0' COMMENT '0:open|1:mchid',
  680. `mch_id` bigint(20) DEFAULT NULL,
  681. `uid` bigint(20) DEFAULT NULL,
  682. `openid` varchar(100) DEFAULT NULL,
  683. `receiver` text,
  684. PRIMARY KEY (`id`)
  685. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  686. -- ----------------------------
  687. -- Table structure for ai_allwin_member
  688. -- ----------------------------
  689. DROP TABLE IF EXISTS `ai_allwin_member`;
  690. CREATE TABLE `ai_allwin_member` (
  691. `id` int(11) NOT NULL AUTO_INCREMENT,
  692. `member_miniapp_id` int(11) DEFAULT NULL,
  693. `member_id` int(11) DEFAULT NULL,
  694. PRIMARY KEY (`id`)
  695. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  696. -- ----------------------------
  697. -- Table structure for ai_allwin_netdata
  698. -- ----------------------------
  699. DROP TABLE IF EXISTS `ai_allwin_netdata`;
  700. CREATE TABLE `ai_allwin_netdata` (
  701. `id` int(11) NOT NULL AUTO_INCREMENT,
  702. `member_miniapp_id` int(11) DEFAULT NULL,
  703. `views` bigint(20) DEFAULT '0',
  704. `info` bigint(20) DEFAULT '0',
  705. `store` bigint(20) DEFAULT '0',
  706. PRIMARY KEY (`id`)
  707. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  708. -- ----------------------------
  709. -- Table structure for ai_allwin_news
  710. -- ----------------------------
  711. DROP TABLE IF EXISTS `ai_allwin_news`;
  712. CREATE TABLE `ai_allwin_news` (
  713. `id` int(11) NOT NULL AUTO_INCREMENT,
  714. `member_miniapp_id` int(11) DEFAULT NULL,
  715. `cate_id` int(11) DEFAULT NULL,
  716. `cate_name` varchar(255) DEFAULT NULL,
  717. `types` tinyint(255) DEFAULT NULL,
  718. `title` varchar(255) DEFAULT NULL,
  719. `content` longtext,
  720. `desc` varchar(255) DEFAULT NULL,
  721. `img` varchar(255) DEFAULT NULL,
  722. `views` bigint(20) DEFAULT '0',
  723. `update_time` int(11) DEFAULT NULL,
  724. PRIMARY KEY (`id`)
  725. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  726. -- ----------------------------
  727. -- Table structure for ai_allwin_news_cate
  728. -- ----------------------------
  729. DROP TABLE IF EXISTS `ai_allwin_news_cate`;
  730. CREATE TABLE `ai_allwin_news_cate` (
  731. `id` int(11) NOT NULL AUTO_INCREMENT,
  732. `member_miniapp_id` int(11) DEFAULT NULL,
  733. `title` varchar(50) DEFAULT NULL,
  734. `name` varchar(50) DEFAULT NULL,
  735. `picture` varchar(100) DEFAULT NULL,
  736. `sort` int(11) DEFAULT '0',
  737. `update_time` int(11) DEFAULT NULL,
  738. `create_time` int(11) DEFAULT NULL,
  739. PRIMARY KEY (`id`),
  740. UNIQUE KEY `ID` (`id`) USING BTREE
  741. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='新闻分类';
  742. -- ----------------------------
  743. -- Table structure for ai_allwin_order
  744. -- ----------------------------
  745. DROP TABLE IF EXISTS `ai_allwin_order`;
  746. CREATE TABLE `ai_allwin_order` (
  747. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  748. `member_miniapp_id` int(11) DEFAULT NULL,
  749. `store_id` int(11) DEFAULT NULL,
  750. `uid` bigint(20) DEFAULT NULL,
  751. `coupon_user_id` int(11) DEFAULT NULL,
  752. `coupon_ids` varchar(255) DEFAULT NULL,
  753. `order_no` varchar(255) DEFAULT NULL,
  754. `user_amount` decimal(10,2) DEFAULT NULL COMMENT '输入金额',
  755. `coupon_price` decimal(10,2) DEFAULT NULL COMMENT '优惠金额',
  756. `platform_amount` decimal(10,2) DEFAULT NULL COMMENT '领赠品金额',
  757. `store_amount` decimal(10,2) DEFAULT NULL COMMENT '好店应收',
  758. `order_amount` decimal(10,2) DEFAULT NULL COMMENT '实支付金额',
  759. `state` tinyint(2) DEFAULT '0',
  760. `paid_time` int(11) DEFAULT NULL,
  761. `paid_no` varchar(255) DEFAULT NULL,
  762. `update_time` int(11) DEFAULT NULL,
  763. PRIMARY KEY (`id`)
  764. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  765. -- ----------------------------
  766. -- Table structure for ai_allwin_platform
  767. -- ----------------------------
  768. DROP TABLE IF EXISTS `ai_allwin_platform`;
  769. CREATE TABLE `ai_allwin_platform` (
  770. `id` int(11) NOT NULL AUTO_INCREMENT,
  771. `member_miniapp_id` int(11) DEFAULT NULL,
  772. `platform` decimal(10,2) DEFAULT NULL,
  773. `company` decimal(10,2) DEFAULT NULL,
  774. PRIMARY KEY (`id`)
  775. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  776. -- ----------------------------
  777. -- Table structure for ai_allwin_shop
  778. -- ----------------------------
  779. DROP TABLE IF EXISTS `ai_allwin_shop`;
  780. CREATE TABLE `ai_allwin_shop` (
  781. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  782. `store_id` int(11) DEFAULT NULL,
  783. `member_miniapp_id` int(11) DEFAULT NULL,
  784. `category_id` bigint(20) DEFAULT NULL,
  785. `coupon_id` bigint(20) DEFAULT NULL,
  786. `is_sale` tinyint(1) DEFAULT '0' COMMENT '0:下架、1:上架',
  787. `is_del` tinyint(1) DEFAULT '0',
  788. `name` varchar(255) DEFAULT NULL,
  789. `title` varchar(255) DEFAULT NULL,
  790. `sell_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  791. `market_price` decimal(10,2) DEFAULT '0.00',
  792. `cost_price` decimal(10,2) DEFAULT '0.00',
  793. `vip_price` decimal(10,2) DEFAULT NULL,
  794. `warehouse_num` int(11) DEFAULT '0',
  795. `warehouse_sellnum` int(11) DEFAULT '0',
  796. `points` int(11) DEFAULT NULL,
  797. `imgs` text,
  798. `img` varchar(255) DEFAULT NULL,
  799. `group_title` varchar(255) DEFAULT NULL,
  800. `group_note` varchar(255) DEFAULT NULL,
  801. `group_img` varchar(255) DEFAULT NULL,
  802. `keyword` varchar(255) DEFAULT NULL,
  803. `notice` text,
  804. `like` int(11) DEFAULT '0',
  805. `share_ids` text,
  806. `share_price` int(11) DEFAULT NULL,
  807. `detective_uid` int(11) DEFAULT NULL,
  808. `detective_price` int(11) DEFAULT NULL,
  809. `content` mediumtext,
  810. `sort` int(11) DEFAULT '0',
  811. `types` tinyint(1) DEFAULT '0',
  812. `end_time` int(11) DEFAULT NULL,
  813. `update_time` int(11) DEFAULT NULL,
  814. PRIMARY KEY (`id`),
  815. UNIQUE KEY `ID` (`id`) USING BTREE,
  816. KEY `IS_SALE` (`is_sale`) USING BTREE
  817. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品主表';
  818. -- ----------------------------
  819. -- Table structure for ai_allwin_shop_cate
  820. -- ----------------------------
  821. DROP TABLE IF EXISTS `ai_allwin_shop_cate`;
  822. CREATE TABLE `ai_allwin_shop_cate` (
  823. `id` int(11) NOT NULL AUTO_INCREMENT,
  824. `member_miniapp_id` int(11) DEFAULT NULL,
  825. `types` tinyint(1) DEFAULT '0',
  826. `title` varchar(50) DEFAULT NULL,
  827. `content` varchar(255) DEFAULT NULL,
  828. `picture` varchar(100) DEFAULT NULL,
  829. `sort` int(11) DEFAULT '0',
  830. `update_time` int(11) DEFAULT NULL,
  831. `create_time` int(11) DEFAULT NULL,
  832. PRIMARY KEY (`id`),
  833. UNIQUE KEY `ID` (`id`) USING BTREE
  834. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品目录';
  835. -- ----------------------------
  836. -- Table structure for ai_allwin_shop_coupon
  837. -- ----------------------------
  838. DROP TABLE IF EXISTS `ai_allwin_shop_coupon`;
  839. CREATE TABLE `ai_allwin_shop_coupon` (
  840. `id` int(11) NOT NULL AUTO_INCREMENT,
  841. `member_miniapp_id` int(11) DEFAULT NULL,
  842. `coupon_id` int(11) DEFAULT NULL,
  843. `shop_id` int(11) DEFAULT NULL,
  844. `create_time` int(11) DEFAULT NULL,
  845. PRIMARY KEY (`id`),
  846. KEY `STOREID` (`coupon_id`)
  847. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='支付有礼';
  848. -- ----------------------------
  849. -- Table structure for ai_allwin_shop_order
  850. -- ----------------------------
  851. DROP TABLE IF EXISTS `ai_allwin_shop_order`;
  852. CREATE TABLE `ai_allwin_shop_order` (
  853. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  854. `member_miniapp_id` int(11) DEFAULT NULL,
  855. `store_id` int(11) DEFAULT NULL,
  856. `user_id` int(11) DEFAULT NULL,
  857. `share_uid` int(11) DEFAULT NULL,
  858. `phone` varchar(255) DEFAULT NULL,
  859. `shop_id` int(11) DEFAULT NULL,
  860. `order_no` varchar(50) DEFAULT NULL,
  861. `status` tinyint(1) DEFAULT '0',
  862. `is_del` tinyint(1) DEFAULT '0',
  863. `sell_price` decimal(10,2) DEFAULT '0.00',
  864. `amount` decimal(10,2) DEFAULT '0.00' COMMENT '单商品价格总额',
  865. `points` int(11) DEFAULT NULL,
  866. `thrifty` decimal(10,2) DEFAULT NULL,
  867. `create_time` int(11) DEFAULT NULL,
  868. `paid_at` tinyint(1) DEFAULT '0',
  869. `paid_time` int(11) DEFAULT NULL,
  870. `paid_no` varchar(255) DEFAULT NULL,
  871. `message` varchar(255) DEFAULT NULL,
  872. `shop_cache` text,
  873. PRIMARY KEY (`id`),
  874. UNIQUE KEY `ORDER_NO` (`order_no`) USING BTREE,
  875. KEY `IS_DEL` (`is_del`) USING BTREE,
  876. KEY `STATUS` (`status`) USING BTREE
  877. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  878. -- ----------------------------
  879. -- Table structure for ai_allwin_store
  880. -- ----------------------------
  881. DROP TABLE IF EXISTS `ai_allwin_store`;
  882. CREATE TABLE `ai_allwin_store` (
  883. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  884. `code_id` char(12) DEFAULT NULL,
  885. `member_miniapp_id` int(11) DEFAULT NULL,
  886. `manage_uid` int(11) DEFAULT NULL,
  887. `mch_id` int(11) DEFAULT NULL,
  888. `charges` int(4) DEFAULT '0',
  889. `cate_id` int(11) DEFAULT NULL,
  890. `cate_sid` int(11) DEFAULT NULL,
  891. `money_coupon` int(11) DEFAULT NULL,
  892. `cate_name` varchar(255) DEFAULT NULL,
  893. `name` varchar(255) DEFAULT NULL,
  894. `img` varchar(255) DEFAULT NULL,
  895. `imgs` text,
  896. `work_time` varchar(50) DEFAULT NULL,
  897. `address` varchar(255) DEFAULT NULL,
  898. `telphone` varchar(255) DEFAULT NULL,
  899. `tips` varchar(255) DEFAULT NULL,
  900. `state` tinyint(1) DEFAULT '0',
  901. `state_text` varchar(50) DEFAULT NULL,
  902. `tags` varchar(255) DEFAULT NULL,
  903. `score` int(5) DEFAULT '0' COMMENT '评分',
  904. `rate_value` int(10) DEFAULT '3' COMMENT '推荐值',
  905. `sort` int(11) DEFAULT NULL,
  906. `views` int(11) DEFAULT '0',
  907. `longitude` decimal(10,7) DEFAULT NULL COMMENT '地图坐标',
  908. `latitude` decimal(10,7) DEFAULT NULL,
  909. `is_top` tinyint(1) DEFAULT NULL,
  910. `is_default` tinyint(1) DEFAULT '0' COMMENT '是否默认首页商铺',
  911. `is_lock` tinyint(1) DEFAULT '0',
  912. `quan_id` int(11) DEFAULT '0',
  913. `create_time` int(11) DEFAULT NULL,
  914. PRIMARY KEY (`id`),
  915. KEY `CODEID` (`code_id`),
  916. KEY `APPID` (`member_miniapp_id`),
  917. KEY `CID` (`cate_id`)
  918. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  919. -- ----------------------------
  920. -- Table structure for ai_allwin_store_bill
  921. -- ----------------------------
  922. DROP TABLE IF EXISTS `ai_allwin_store_bill`;
  923. CREATE TABLE `ai_allwin_store_bill` (
  924. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  925. `member_miniapp_id` int(11) DEFAULT NULL,
  926. `store_id` int(11) DEFAULT '0',
  927. `pay_uid` bigint(20) DEFAULT '0',
  928. `money` decimal(10,2) DEFAULT '0.00',
  929. `message` tinytext,
  930. `update_time` int(11) DEFAULT NULL,
  931. PRIMARY KEY (`id`),
  932. UNIQUE KEY `ID` (`id`) USING BTREE,
  933. KEY `STORE_ID` (`store_id`),
  934. KEY `UID` (`pay_uid`)
  935. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='好店收入账单';
  936. -- ----------------------------
  937. -- Table structure for ai_allwin_store_cate
  938. -- ----------------------------
  939. DROP TABLE IF EXISTS `ai_allwin_store_cate`;
  940. CREATE TABLE `ai_allwin_store_cate` (
  941. `id` int(11) NOT NULL AUTO_INCREMENT,
  942. `member_miniapp_id` int(11) DEFAULT NULL,
  943. `parent_id` int(11) DEFAULT '0',
  944. `root_id` int(11) DEFAULT NULL,
  945. `title` varchar(50) DEFAULT NULL,
  946. `name` varchar(50) DEFAULT NULL,
  947. `picture` varchar(100) DEFAULT NULL,
  948. `sort` int(11) DEFAULT '0',
  949. `update_time` int(11) DEFAULT NULL,
  950. `create_time` int(11) DEFAULT NULL,
  951. PRIMARY KEY (`id`),
  952. UNIQUE KEY `ID` (`id`) USING BTREE,
  953. KEY `PARENT_ID` (`parent_id`,`root_id`) USING BTREE
  954. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分类信息栏目';
  955. -- ----------------------------
  956. -- Table structure for ai_allwin_store_chain
  957. -- ----------------------------
  958. DROP TABLE IF EXISTS `ai_allwin_store_chain`;
  959. CREATE TABLE `ai_allwin_store_chain` (
  960. `id` int(11) NOT NULL AUTO_INCREMENT,
  961. `member_miniapp_id` int(11) DEFAULT NULL,
  962. `code_id` bigint(12) DEFAULT NULL,
  963. `types` tinyint(1) DEFAULT '0',
  964. `store_id` int(11) DEFAULT NULL,
  965. `title` varchar(100) DEFAULT NULL,
  966. `address` varchar(255) DEFAULT NULL,
  967. `telphone` varchar(50) DEFAULT NULL,
  968. `longitude` varchar(20) DEFAULT NULL,
  969. `latitude` varchar(20) DEFAULT NULL,
  970. `update_time` int(11) DEFAULT NULL,
  971. `sort` int(11) DEFAULT '0',
  972. PRIMARY KEY (`id`)
  973. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='连锁门店';
  974. -- ----------------------------
  975. -- Table structure for ai_allwin_store_quan
  976. -- ----------------------------
  977. DROP TABLE IF EXISTS `ai_allwin_store_quan`;
  978. CREATE TABLE `ai_allwin_store_quan` (
  979. `id` int(11) NOT NULL AUTO_INCREMENT,
  980. `member_miniapp_id` int(11) DEFAULT NULL,
  981. `title` varchar(50) DEFAULT NULL,
  982. `content` varchar(50) DEFAULT NULL,
  983. `picture` varchar(100) DEFAULT NULL,
  984. `create_time` int(11) DEFAULT NULL,
  985. PRIMARY KEY (`id`),
  986. UNIQUE KEY `ID` (`id`) USING BTREE
  987. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分类信息栏目';
  988. -- ----------------------------
  989. -- Table structure for ai_allwin_store_stats
  990. -- ----------------------------
  991. DROP TABLE IF EXISTS `ai_allwin_store_stats`;
  992. CREATE TABLE `ai_allwin_store_stats` (
  993. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  994. `member_miniapp_id` int(11) DEFAULT NULL,
  995. `store_id` int(11) DEFAULT NULL,
  996. `payment` decimal(10,2) DEFAULT '0.00',
  997. `coupon` decimal(10,2) DEFAULT '0.00',
  998. `card` decimal(10,2) DEFAULT '0.00',
  999. `vip` decimal(10,2) DEFAULT '0.00',
  1000. PRIMARY KEY (`id`)
  1001. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='店铺数据统计';
  1002. -- ----------------------------
  1003. -- Table structure for ai_allwin_store_union
  1004. -- ----------------------------
  1005. DROP TABLE IF EXISTS `ai_allwin_store_union`;
  1006. CREATE TABLE `ai_allwin_store_union` (
  1007. `id` int(11) NOT NULL AUTO_INCREMENT,
  1008. `store_id` int(11) DEFAULT NULL,
  1009. `store_union` varchar(255) DEFAULT NULL,
  1010. PRIMARY KEY (`id`)
  1011. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1012. -- ----------------------------
  1013. -- Table structure for ai_allwin_store_worker
  1014. -- ----------------------------
  1015. DROP TABLE IF EXISTS `ai_allwin_store_worker`;
  1016. CREATE TABLE `ai_allwin_store_worker` (
  1017. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  1018. `member_miniapp_id` int(11) DEFAULT NULL,
  1019. `store_id` int(11) DEFAULT NULL,
  1020. `uid` bigint(20) DEFAULT NULL,
  1021. `is_cashier` tinyint(1) DEFAULT '0' COMMENT '是否收银员',
  1022. PRIMARY KEY (`id`)
  1023. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工作人员';
  1024. -- ----------------------------
  1025. -- Table structure for ai_allwin_unmarket
  1026. -- ----------------------------
  1027. DROP TABLE IF EXISTS `ai_allwin_unmarket`;
  1028. CREATE TABLE `ai_allwin_unmarket` (
  1029. `id` int(11) NOT NULL AUTO_INCREMENT,
  1030. `uid` int(11) DEFAULT NULL,
  1031. `member_miniapp_id` int(11) DEFAULT NULL,
  1032. `bonus_types` tinyint(2) DEFAULT NULL,
  1033. `bonus_user_types` tinyint(2) DEFAULT NULL,
  1034. `share_ratio` int(10) DEFAULT NULL,
  1035. `share_ratio_user` int(10) DEFAULT NULL,
  1036. `price` decimal(10,2) DEFAULT NULL,
  1037. `title` varchar(255) DEFAULT NULL,
  1038. `share_img` varchar(100) DEFAULT NULL,
  1039. `share_title` varchar(50) DEFAULT NULL,
  1040. `share_text` varchar(100) DEFAULT NULL,
  1041. `music` varchar(255) DEFAULT NULL,
  1042. `note` text,
  1043. `img` varchar(255) DEFAULT NULL,
  1044. `imgs` text,
  1045. `start_time` int(11) DEFAULT NULL,
  1046. `end_time` int(11) DEFAULT NULL,
  1047. `telphone` varchar(100) DEFAULT NULL,
  1048. `mycode` varchar(255) DEFAULT NULL,
  1049. `tips` text,
  1050. `views` int(11) DEFAULT '0',
  1051. PRIMARY KEY (`id`)
  1052. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='团购联盟';
  1053. -- ----------------------------
  1054. -- Table structure for ai_allwin_unmarket_booking
  1055. -- ----------------------------
  1056. DROP TABLE IF EXISTS `ai_allwin_unmarket_booking`;
  1057. CREATE TABLE `ai_allwin_unmarket_booking` (
  1058. `id` int(11) NOT NULL AUTO_INCREMENT,
  1059. `member_miniapp_id` int(11) DEFAULT NULL,
  1060. `union_id` int(11) DEFAULT NULL,
  1061. `store_name` varchar(255) DEFAULT NULL,
  1062. `name` varchar(255) DEFAULT NULL,
  1063. `telphone` varchar(255) DEFAULT NULL,
  1064. `create_time` int(11) DEFAULT NULL,
  1065. PRIMARY KEY (`id`)
  1066. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='团购联盟';
  1067. -- ----------------------------
  1068. -- Table structure for ai_allwin_unmarket_order
  1069. -- ----------------------------
  1070. DROP TABLE IF EXISTS `ai_allwin_unmarket_order`;
  1071. CREATE TABLE `ai_allwin_unmarket_order` (
  1072. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  1073. `uid` bigint(20) DEFAULT NULL,
  1074. `share_uid` bigint(20) DEFAULT NULL,
  1075. `order_sn` varchar(255) NOT NULL,
  1076. `share_id` int(11) NOT NULL,
  1077. `order_time` int(11) NOT NULL,
  1078. `member_miniapp_id` int(11) NOT NULL,
  1079. `price` decimal(10,2) NOT NULL,
  1080. `redpack` decimal(10,2) DEFAULT NULL,
  1081. `state` tinyint(1) DEFAULT NULL,
  1082. `telname` varchar(255) DEFAULT NULL,
  1083. `telphone` varchar(255) DEFAULT NULL,
  1084. PRIMARY KEY (`id`),
  1085. KEY `ORDERSN` (`order_sn`)
  1086. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='团购联盟';
  1087. -- ----------------------------
  1088. -- Table structure for ai_allwin_unmarket_reward
  1089. -- ----------------------------
  1090. DROP TABLE IF EXISTS `ai_allwin_unmarket_reward`;
  1091. CREATE TABLE `ai_allwin_unmarket_reward` (
  1092. `id` int(11) NOT NULL AUTO_INCREMENT,
  1093. `member_miniapp_id` int(11) NOT NULL,
  1094. `union_id` int(11) DEFAULT NULL,
  1095. `uid` int(11) DEFAULT NULL,
  1096. `number` int(11) DEFAULT '0',
  1097. `money` decimal(10,2) DEFAULT NULL,
  1098. `update_time` int(11) DEFAULT NULL,
  1099. PRIMARY KEY (`id`)
  1100. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='团购联盟';
  1101. -- ----------------------------
  1102. -- Table structure for ai_allwin_unmarket_store
  1103. -- ----------------------------
  1104. DROP TABLE IF EXISTS `ai_allwin_unmarket_store`;
  1105. CREATE TABLE `ai_allwin_unmarket_store` (
  1106. `id` int(11) NOT NULL AUTO_INCREMENT,
  1107. `store_id` int(11) DEFAULT NULL,
  1108. `union_id` int(11) DEFAULT NULL,
  1109. `member_miniapp_id` int(11) NOT NULL,
  1110. `img` varchar(255) DEFAULT NULL,
  1111. `imgs` text,
  1112. `name` varchar(255) DEFAULT NULL,
  1113. `address` varchar(255) DEFAULT NULL,
  1114. `telphone` varchar(255) DEFAULT NULL,
  1115. `endtime` int(11) DEFAULT NULL,
  1116. `content` text,
  1117. `note` text,
  1118. `about` text,
  1119. `pictext` text,
  1120. PRIMARY KEY (`id`)
  1121. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='团购联盟';
  1122. -- ----------------------------
  1123. -- Table structure for ai_allwin_unmarket_verif
  1124. -- ----------------------------
  1125. DROP TABLE IF EXISTS `ai_allwin_unmarket_verif`;
  1126. CREATE TABLE `ai_allwin_unmarket_verif` (
  1127. `id` int(11) NOT NULL AUTO_INCREMENT,
  1128. `member_miniapp_id` int(11) NOT NULL,
  1129. `uid` int(11) DEFAULT NULL,
  1130. `union_id` int(11) DEFAULT NULL,
  1131. `store_id` int(11) DEFAULT NULL,
  1132. `times` int(11) DEFAULT NULL,
  1133. PRIMARY KEY (`id`)
  1134. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='团购联盟';
  1135. -- ----------------------------
  1136. -- Table structure for ai_allwin_user
  1137. -- ----------------------------
  1138. DROP TABLE IF EXISTS `ai_allwin_user`;
  1139. CREATE TABLE `ai_allwin_user` (
  1140. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  1141. `uid` bigint(20) DEFAULT NULL,
  1142. `store_id` bigint(20) DEFAULT NULL,
  1143. PRIMARY KEY (`id`),
  1144. UNIQUE KEY `UID` (`uid`)
  1145. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1146. -- ----------------------------
  1147. -- Table structure for ai_allwin_user_agent
  1148. -- ----------------------------
  1149. DROP TABLE IF EXISTS `ai_allwin_user_agent`;
  1150. CREATE TABLE `ai_allwin_user_agent` (
  1151. `id` int(11) NOT NULL AUTO_INCREMENT,
  1152. `member_miniapp_id` int(11) DEFAULT NULL,
  1153. `uid` bigint(11) DEFAULT NULL,
  1154. `is_type` tinyint(2) DEFAULT '0' COMMENT '0后台 1前台申请',
  1155. `is_pass` tinyint(2) DEFAULT NULL COMMENT '0',
  1156. `is_lock` tinyint(2) DEFAULT NULL COMMENT '0',
  1157. `price` decimal(10,2) DEFAULT NULL COMMENT '0',
  1158. `order_no` varchar(50) DEFAULT NULL COMMENT '订单号',
  1159. `wechat_order` varchar(50) DEFAULT NULL COMMENT '微信订单号',
  1160. `pay_state` tinyint(2) DEFAULT '0' COMMENT '0未支付 1支付 2免费',
  1161. `create_time` int(11) DEFAULT NULL,
  1162. `paid_time` int(11) DEFAULT NULL,
  1163. PRIMARY KEY (`id`)
  1164. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1165. -- ----------------------------
  1166. -- Table structure for ai_allwin_user_level
  1167. -- ----------------------------
  1168. DROP TABLE IF EXISTS `ai_allwin_user_level`;
  1169. CREATE TABLE `ai_allwin_user_level` (
  1170. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  1171. `user_id` bigint(20) NOT NULL DEFAULT '0',
  1172. `parent_id` bigint(20) NOT NULL DEFAULT '0',
  1173. `level` int(11) NOT NULL DEFAULT '0',
  1174. PRIMARY KEY (`id`),
  1175. KEY `level` (`level`),
  1176. KEY `parent_id` (`parent_id`),
  1177. KEY `user_id` (`user_id`)
  1178. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户关系表';
  1179. -- ----------------------------
  1180. -- Table structure for ai_allwin_user_worker
  1181. -- ----------------------------
  1182. DROP TABLE IF EXISTS `ai_allwin_user_worker`;
  1183. CREATE TABLE `ai_allwin_user_worker` (
  1184. `id` int(11) NOT NULL AUTO_INCREMENT,
  1185. `member_miniapp_id` int(11) DEFAULT NULL,
  1186. `uid` bigint(11) DEFAULT NULL,
  1187. `store_ids` varchar(255) DEFAULT NULL,
  1188. `is_pass` tinyint(2) DEFAULT NULL COMMENT '0待审核 1通过',
  1189. `is_lock` tinyint(2) DEFAULT NULL COMMENT '0正常 1锁定',
  1190. `is_type` tinyint(2) DEFAULT '0' COMMENT '0后台 1前台申请',
  1191. `price` decimal(10,2) DEFAULT NULL,
  1192. `order_no` varchar(50) DEFAULT NULL COMMENT '订单号',
  1193. `wechat_order` varchar(50) DEFAULT NULL COMMENT '微信订单号',
  1194. `pay_state` tinyint(2) DEFAULT NULL COMMENT '0未支付 1支付',
  1195. `create_time` int(11) DEFAULT NULL,
  1196. `paid_time` int(11) DEFAULT NULL,
  1197. PRIMARY KEY (`id`)
  1198. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公司员工';
  1199. -- ----------------------------
  1200. -- Table structure for ai_allwin_user_worker_store_order
  1201. -- ----------------------------
  1202. DROP TABLE IF EXISTS `ai_allwin_user_worker_store_order`;
  1203. CREATE TABLE `ai_allwin_user_worker_store_order` (
  1204. `id` int(11) NOT NULL AUTO_INCREMENT,
  1205. `member_miniapp_id` int(11) DEFAULT NULL,
  1206. `uid` bigint(11) DEFAULT NULL,
  1207. `store_id` int(11) DEFAULT NULL,
  1208. `is_type` tinyint(2) DEFAULT '0' COMMENT '0后台 1前台申请',
  1209. `price` decimal(10,2) DEFAULT NULL,
  1210. `total_price` decimal(10,2) DEFAULT NULL,
  1211. `order_no` varchar(50) DEFAULT NULL COMMENT '订单号',
  1212. `wechat_order` varchar(50) DEFAULT NULL COMMENT '微信订单号',
  1213. `pay_state` tinyint(2) DEFAULT '0' COMMENT '0未支付 1支付 2免费',
  1214. `create_time` int(11) DEFAULT NULL,
  1215. `paid_time` int(11) DEFAULT NULL,
  1216. PRIMARY KEY (`id`)
  1217. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='业务经理申请';
  1218. -- ----------------------------
  1219. -- Table structure for ai_allwin_vip
  1220. -- ----------------------------
  1221. DROP TABLE IF EXISTS `ai_allwin_vip`;
  1222. CREATE TABLE `ai_allwin_vip` (
  1223. `id` int(11) NOT NULL AUTO_INCREMENT,
  1224. `member_miniapp_id` int(11) DEFAULT NULL,
  1225. `user_id` int(11) DEFAULT NULL,
  1226. `store_id` int(11) DEFAULT '0',
  1227. `vipcard_id` int(11) DEFAULT NULL,
  1228. `is_up` tinyint(1) DEFAULT '0',
  1229. `is_diy` tinyint(1) DEFAULT '0',
  1230. `coupon_ids` varchar(255) DEFAULT NULL,
  1231. `order_no` varchar(255) DEFAULT NULL,
  1232. `amount` decimal(10,2) DEFAULT NULL,
  1233. `state` tinyint(1) DEFAULT '0',
  1234. `is_lock` tinyint(1) DEFAULT '0',
  1235. `paid_time` int(11) DEFAULT NULL,
  1236. `paid_no` varchar(255) DEFAULT NULL,
  1237. `update_time` int(11) DEFAULT NULL,
  1238. `from_ucode` varchar(20) DEFAULT NULL,
  1239. `is_divided` tinyint(1) DEFAULT '0' COMMENT '是否已经分润',
  1240. PRIMARY KEY (`id`)
  1241. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1242. -- ----------------------------
  1243. -- Table structure for ai_allwin_vipcard
  1244. -- ----------------------------
  1245. DROP TABLE IF EXISTS `ai_allwin_vipcard`;
  1246. CREATE TABLE `ai_allwin_vipcard` (
  1247. `id` int(11) NOT NULL AUTO_INCREMENT,
  1248. `city_id` int(11) DEFAULT NULL,
  1249. `member_miniapp_id` int(11) DEFAULT NULL,
  1250. `is_up` tinyint(1) DEFAULT '0',
  1251. `theme` varchar(255) DEFAULT NULL,
  1252. `name` varchar(255) DEFAULT NULL,
  1253. `coupon_num` int(11) DEFAULT NULL,
  1254. `price` decimal(10,2) DEFAULT NULL,
  1255. `tips` varchar(255) DEFAULT NULL,
  1256. `store_workers` decimal(10,2) DEFAULT NULL,
  1257. `store` decimal(10,2) DEFAULT NULL,
  1258. `company_workers` decimal(10,2) DEFAULT NULL,
  1259. `company` decimal(10,2) DEFAULT NULL,
  1260. `stock` decimal(10,2) DEFAULT NULL,
  1261. `group` decimal(10,2) DEFAULT NULL,
  1262. `coupon_ids` text,
  1263. `is_tax` tinyint(1) DEFAULT '0',
  1264. `rule` text,
  1265. `nominate` tinyint(4) DEFAULT '0',
  1266. `sort` int(11) DEFAULT '0',
  1267. `update_time` int(11) DEFAULT NULL,
  1268. PRIMARY KEY (`id`)
  1269. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1270. SET FOREIGN_KEY_CHECKS=1;