sql.php 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048
  1. <?php
  2. if (config('app.framework') == 'platform') {
  3. $create_dir = [
  4. '/bootstrap/cache',
  5. '/storage/framework/views',
  6. '/storage/logs/error',
  7. '/storage/logs/debug'
  8. ];
  9. } else {
  10. $create_dir = [
  11. '../addons/yun_shop/bootstrap/cache',
  12. '../addons/yun_shop/storage/framework/views',
  13. '../addons/yun_shop/storage/logs/error',
  14. '../addons/yun_shop/storage/logs/debug'
  15. ];
  16. }
  17. foreach ($create_dir as $dir_path) {
  18. if (!is_dir($dir_path)) {
  19. @mkdir($dir_path, 0755, true);
  20. }
  21. }
  22. $sql = "
  23. CREATE TABLE IF NOT EXISTS ims_yz_account_open_config (
  24. `config_id` int(11) NOT NULL,
  25. `uniacid` int(11) NOT NULL DEFAULT '0',
  26. `app_key` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  27. `app_secret` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  28. `type` tinyint(1) NOT NULL DEFAULT '0',
  29. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  30. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  31. `deleted_at` int(11) DEFAULT NULL,
  32. PRIMARY KEY (`config_id`)
  33. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  34. # Dump of table ims_yz_address
  35. # ------------------------------------------------------------
  36. CREATE TABLE IF NOT EXISTS ims_yz_address (
  37. `id` int(11) NOT NULL AUTO_INCREMENT,
  38. `areaname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  39. `parentid` int(11) DEFAULT NULL,
  40. `level` int(11) DEFAULT NULL,
  41. PRIMARY KEY (`id`)
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  43. # Dump of table ims_yz_balance
  44. # ------------------------------------------------------------
  45. CREATE TABLE IF NOT EXISTS ims_yz_balance (
  46. `id` int(11) NOT NULL AUTO_INCREMENT,
  47. `uniacid` int(11) DEFAULT NULL,
  48. `member_id` int(11) DEFAULT NULL,
  49. `old_money` decimal(14,2) DEFAULT NULL,
  50. `change_money` decimal(14,2) NOT NULL,
  51. `new_money` decimal(14,2) NOT NULL,
  52. `type` tinyint(3) NOT NULL,
  53. `service_type` tinyint(11) NOT NULL,
  54. `serial_number` varchar(45) NOT NULL DEFAULT '',
  55. `operator` int(11) NOT NULL,
  56. `operator_id` varchar(45) NOT NULL DEFAULT '',
  57. `remark` varchar(200) NOT NULL DEFAULT '',
  58. `created_at` int(11) NOT NULL,
  59. `updated_at` int(11) NOT NULL,
  60. PRIMARY KEY (`id`)
  61. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  62. # Dump of table ims_yz_balance_recharge
  63. # ------------------------------------------------------------
  64. CREATE TABLE IF NOT EXISTS ims_yz_balance_recharge (
  65. `id` int(11) NOT NULL AUTO_INCREMENT,
  66. `uniacid` int(11) DEFAULT NULL,
  67. `member_id` int(11) DEFAULT NULL,
  68. `old_money` decimal(14,2) DEFAULT NULL,
  69. `money` decimal(14,2) DEFAULT NULL,
  70. `new_money` decimal(14,2) DEFAULT NULL,
  71. `type` int(11) DEFAULT NULL,
  72. `created_at` int(11) DEFAULT NULL,
  73. `updated_at` int(11) DEFAULT NULL,
  74. `ordersn` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  75. `status` tinyint(1) DEFAULT '0',
  76. PRIMARY KEY (`id`)
  77. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  78. # Dump of table ims_yz_balance_transfer
  79. # ------------------------------------------------------------
  80. CREATE TABLE IF NOT EXISTS ims_yz_balance_transfer (
  81. `id` int(11) NOT NULL AUTO_INCREMENT,
  82. `uniacid` int(11) DEFAULT NULL,
  83. `transferor` int(11) DEFAULT NULL,
  84. `recipient` int(11) DEFAULT NULL,
  85. `money` decimal(14,2) DEFAULT NULL,
  86. `created_at` int(11) DEFAULT NULL,
  87. `status` tinyint(1) DEFAULT NULL,
  88. `updated_at` int(11) NOT NULL,
  89. PRIMARY KEY (`id`)
  90. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  91. # Dump of table ims_yz_brand
  92. # ------------------------------------------------------------
  93. CREATE TABLE IF NOT EXISTS ims_yz_brand (
  94. `id` int(11) NOT NULL AUTO_INCREMENT,
  95. `uniacid` int(11) NOT NULL,
  96. `name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
  97. `alias` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
  98. `logo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  99. `desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  100. `created_at` int(11) DEFAULT NULL,
  101. `updated_at` int(11) DEFAULT NULL,
  102. `deleted_at` int(11) DEFAULT NULL,
  103. PRIMARY KEY (`id`),
  104. KEY `idx_name` (`name`)
  105. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  106. # Dump of table ims_yz_brand
  107. # ------------------------------------------------------------
  108. CREATE TABLE IF NOT EXISTS ims_mc_member_address (
  109. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  110. `uniacid` int(10) unsigned NOT NULL,
  111. `uid` int(50) unsigned NOT NULL,
  112. `username` varchar(20) NOT NULL,
  113. `mobile` varchar(11) NOT NULL,
  114. `zipcode` varchar(6) NOT NULL,
  115. `province` varchar(32) NOT NULL,
  116. `city` varchar(32) NOT NULL,
  117. `district` varchar(32) NOT NULL,
  118. `address` varchar(512) NOT NULL,
  119. `isdefault` tinyint(1) unsigned NOT NULL,
  120. PRIMARY KEY (`id`),
  121. KEY `idx_uinacid` (`uniacid`),
  122. KEY `idx_uid` (`uid`)
  123. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  124. # Dump of table ims_mc_members
  125. # ------------------------------------------------------------
  126. CREATE TABLE IF NOT EXISTS ims_mc_members (
  127. `uid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  128. `uniacid` int(10) UNSIGNED NOT NULL,
  129. `mobile` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  130. `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  131. `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  132. `salt` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  133. `groupid` int(11) NOT NULL,
  134. `credit1` decimal(10, 2) UNSIGNED NOT NULL,
  135. `credit2` decimal(10, 2) UNSIGNED NOT NULL,
  136. `credit3` decimal(10, 2) UNSIGNED NOT NULL,
  137. `credit4` decimal(10, 2) UNSIGNED NOT NULL,
  138. `credit5` decimal(10, 2) UNSIGNED NOT NULL,
  139. `credit6` decimal(10, 2) NOT NULL,
  140. `createtime` int(10) UNSIGNED NOT NULL,
  141. `realname` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  142. `nickname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  143. `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  144. `qq` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  145. `vip` tinyint(3) UNSIGNED NOT NULL,
  146. `gender` tinyint(1) NOT NULL,
  147. `birthyear` smallint(6) UNSIGNED NOT NULL,
  148. `birthmonth` tinyint(3) UNSIGNED NOT NULL,
  149. `birthday` tinyint(3) UNSIGNED NOT NULL,
  150. `constellation` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  151. `zodiac` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  152. `telephone` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  153. `idcard` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  154. `studentid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  155. `grade` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  156. `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  157. `zipcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  158. `nationality` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  159. `resideprovince` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  160. `residecity` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  161. `residedist` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  162. `graduateschool` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  163. `company` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  164. `education` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  165. `occupation` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  166. `position` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  167. `revenue` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  168. `affectivestatus` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  169. `lookingfor` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  170. `bloodtype` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  171. `height` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  172. `weight` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  173. `alipay` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  174. `msn` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  175. `taobao` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  176. `site` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  177. `bio` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  178. `interest` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  179. `pay_password` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  180. PRIMARY KEY (`uid`) USING BTREE,
  181. INDEX `groupid`(`groupid`) USING BTREE,
  182. INDEX `uniacid`(`uniacid`) USING BTREE,
  183. INDEX `email`(`email`) USING BTREE,
  184. INDEX `mobile`(`mobile`) USING BTREE
  185. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
  186. # Dump of table ims_mc_mapping_fans
  187. # ------------------------------------------------------------
  188. CREATE TABLE IF NOT EXISTS ims_mc_mapping_fans (
  189. `fanid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  190. `acid` int(10) UNSIGNED NOT NULL,
  191. `uniacid` int(10) UNSIGNED NOT NULL,
  192. `uid` int(10) UNSIGNED NOT NULL,
  193. `openid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  194. `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  195. `groupid` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  196. `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  197. `follow` tinyint(1) UNSIGNED NOT NULL,
  198. `followtime` int(10) UNSIGNED NOT NULL,
  199. `unfollowtime` int(10) UNSIGNED NOT NULL,
  200. `tag` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  201. `updatetime` int(10) UNSIGNED NULL DEFAULT NULL,
  202. `unionid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  203. PRIMARY KEY (`fanid`) USING BTREE,
  204. UNIQUE INDEX `openid_2`(`openid`) USING BTREE,
  205. INDEX `acid`(`acid`) USING BTREE,
  206. INDEX `uniacid`(`uniacid`) USING BTREE,
  207. INDEX `nickname`(`nickname`) USING BTREE,
  208. INDEX `updatetime`(`updatetime`) USING BTREE,
  209. INDEX `uid`(`uid`) USING BTREE,
  210. INDEX `openid`(`openid`) USING BTREE
  211. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
  212. # Dump of table ims_mc_fans_groups
  213. # ------------------------------------------------------------
  214. CREATE TABLE IF NOT EXISTS ims_mc_fans_groups (
  215. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  216. `uniacid` int(10) unsigned NOT NULL,
  217. `acid` int(10) unsigned NOT NULL,
  218. `groups` varchar(10000) NOT NULL,
  219. PRIMARY KEY (`id`),
  220. KEY `uniacid` (`uniacid`)
  221. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  222. # Dump of table ims_mc_fans_tag_mapping
  223. # ------------------------------------------------------------
  224. CREATE TABLE IF NOT EXISTS ims_mc_fans_tag_mapping (
  225. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  226. `fanid` int(11) unsigned NOT NULL,
  227. `tagid` tinyint(3) unsigned NOT NULL,
  228. PRIMARY KEY (`id`),
  229. UNIQUE KEY `mapping` (`fanid`,`tagid`),
  230. KEY `fanid_index` (`fanid`),
  231. KEY `tagid_index` (`tagid`)
  232. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  233. # Dump of table ims_yz_mc_groups
  234. # ------------------------------------------------------------
  235. CREATE TABLE IF NOT EXISTS ims_yz_mc_groups (
  236. `groupid` int(11) NOT NULL AUTO_INCREMENT,
  237. `uniacid` int(11) NOT NULL,
  238. `title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  239. `credit` int(10) UNSIGNED NOT NULL,
  240. `isdefault` tinyint(4) NOT NULL,
  241. PRIMARY KEY (`groupid`) USING BTREE,
  242. INDEX `uniacid`(`uniacid`) USING BTREE
  243. ) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
  244. # Dump of table ims_yz_category
  245. # ------------------------------------------------------------
  246. CREATE TABLE IF NOT EXISTS ims_yz_category (
  247. `id` int(11) NOT NULL AUTO_INCREMENT,
  248. `uniacid` int(11) DEFAULT '0',
  249. `name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  250. `thumb` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  251. `parent_id` int(11) DEFAULT '0',
  252. `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  253. `display_order` tinyint(1) DEFAULT '0',
  254. `enabled` tinyint(1) DEFAULT '1',
  255. `is_home` tinyint(1) DEFAULT '0',
  256. `adv_img` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  257. `adv_url` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '',
  258. `level` tinyint(1) DEFAULT '0',
  259. `advimg_pc` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  260. `advurl_pc` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  261. `created_at` int(11) DEFAULT NULL,
  262. `updated_at` int(11) DEFAULT NULL,
  263. `deleted_at` int(11) DEFAULT NULL,
  264. PRIMARY KEY (`id`),
  265. KEY `idx_uniacid` (`uniacid`),
  266. KEY `idx_parentid` (`parent_id`),
  267. KEY `idx_displayorder` (`display_order`),
  268. KEY `idx_enabled` (`enabled`),
  269. KEY `idx_ishome` (`is_home`)
  270. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--分类表';
  271. # Dump of table ims_yz_comment
  272. # ------------------------------------------------------------
  273. CREATE TABLE IF NOT EXISTS ims_yz_comment (
  274. `id` int(11) NOT NULL AUTO_INCREMENT,
  275. `uniacid` int(11) NOT NULL DEFAULT '0',
  276. `order_id` int(11) DEFAULT '0',
  277. `goods_id` int(11) NOT NULL DEFAULT '0',
  278. `uid` int(11) DEFAULT '0',
  279. `nick_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
  280. `head_img_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  281. `content` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  282. `level` tinyint(1) DEFAULT '0',
  283. `images` text COLLATE utf8mb4_unicode_ci,
  284. `comment_id` int(11) DEFAULT '0',
  285. `reply_id` int(11) DEFAULT '0',
  286. `reply_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  287. `type` tinyint(3) DEFAULT '1',
  288. `created_at` int(11) NOT NULL DEFAULT '0',
  289. `updated_at` int(11) DEFAULT NULL,
  290. `deleted_at` int(11) DEFAULT NULL,
  291. PRIMARY KEY (`id`),
  292. KEY `idx_uniacid` (`uniacid`),
  293. KEY `idx_orderid` (`order_id`),
  294. KEY `idx_goodsid` (`goods_id`),
  295. KEY `idx_openid` (`uid`),
  296. KEY `idx_createtime` (`created_at`)
  297. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--评论表';
  298. # Dump of table ims_yz_coupon
  299. # ------------------------------------------------------------
  300. CREATE TABLE IF NOT EXISTS ims_yz_coupon (
  301. `id` int(11) NOT NULL AUTO_INCREMENT,
  302. `uniacid` int(11) DEFAULT '0',
  303. `cat_id` int(11) DEFAULT '0',
  304. `name` varchar(255) DEFAULT '',
  305. `get_type` tinyint(3) DEFAULT '0',
  306. `level_limit` int(11) NOT NULL DEFAULT '0',
  307. `get_max` int(11) DEFAULT '0',
  308. `use_type` tinyint(3) unsigned DEFAULT '0',
  309. `return_type` tinyint(3) DEFAULT '0',
  310. `bgcolor` varchar(255) DEFAULT '',
  311. `enough` int(11) NOT NULL DEFAULT '0',
  312. `coupon_type` tinyint(3) DEFAULT '0',
  313. `time_limit` tinyint(3) DEFAULT '0',
  314. `time_days` int(11) DEFAULT '0',
  315. `time_start` int(11) DEFAULT '0',
  316. `time_end` int(11) DEFAULT '0',
  317. `coupon_method` tinyint(4) DEFAULT NULL,
  318. `discount` decimal(10,2) DEFAULT '0.00',
  319. `deduct` decimal(10,2) DEFAULT '0.00',
  320. `back_type` tinyint(3) DEFAULT '0',
  321. `back_money` varchar(50) DEFAULT '',
  322. `back_credit` varchar(50) DEFAULT '',
  323. `back_redpack` varchar(50) DEFAULT '',
  324. `back_when` tinyint(3) DEFAULT '0',
  325. `thumb` varchar(255) DEFAULT '',
  326. `desc` text,
  327. `total` int(11) DEFAULT '0',
  328. `status` tinyint(3) DEFAULT '0',
  329. `money` decimal(10,2) DEFAULT '0.00',
  330. `resp_desc` text,
  331. `resp_thumb` varchar(255) DEFAULT '',
  332. `resp_title` varchar(255) DEFAULT '',
  333. `resp_url` varchar(255) DEFAULT '',
  334. `credit` int(11) DEFAULT '0',
  335. `usecredit2` tinyint(3) DEFAULT '0',
  336. `remark` varchar(1000) DEFAULT '',
  337. `descnoset` tinyint(3) DEFAULT '0',
  338. `display_order` int(11) DEFAULT '0',
  339. `supplier_uid` int(11) DEFAULT '0',
  340. `getcashier` tinyint(1) NOT NULL DEFAULT '0',
  341. `cashiersids` text,
  342. `cashiersnames` text,
  343. `category_ids` text,
  344. `categorynames` text,
  345. `goods_names` text,
  346. `goods_ids` text,
  347. `storeids` text,
  348. `storenames` text,
  349. `getstore` tinyint(1) NOT NULL DEFAULT '0',
  350. `getsupplier` tinyint(1) DEFAULT '0',
  351. `supplierids` text,
  352. `suppliernames` text,
  353. `createtime` int(11) DEFAULT '0',
  354. `created_at` int(10) unsigned DEFAULT NULL,
  355. `updated_at` int(10) unsigned DEFAULT NULL,
  356. `deleted_at` int(10) unsigned DEFAULT NULL,
  357. PRIMARY KEY (`id`),
  358. KEY `idx_catid` (`cat_id`)
  359. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--优惠券主表';
  360. # Dump of table ims_yz_coupon_category
  361. # ------------------------------------------------------------
  362. CREATE TABLE IF NOT EXISTS ims_yz_coupon_category (
  363. `id` int(11) NOT NULL AUTO_INCREMENT,
  364. `uniacid` int(11) DEFAULT '0',
  365. `name` varchar(255) DEFAULT '',
  366. `display_order` int(11) DEFAULT '0',
  367. `status` int(11) DEFAULT '0',
  368. PRIMARY KEY (`id`),
  369. KEY `idx_uniacid` (`uniacid`),
  370. KEY `idx_displayorder` (`display_order`),
  371. KEY `idx_status` (`status`)
  372. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  373. # Dump of table ims_yz_coupon_log
  374. # ------------------------------------------------------------
  375. CREATE TABLE IF NOT EXISTS ims_yz_coupon_log (
  376. `id` int(11) NOT NULL AUTO_INCREMENT,
  377. `uniacid` int(11) DEFAULT '0',
  378. `logno` varchar(255) DEFAULT '',
  379. `member_id` varchar(255) DEFAULT '',
  380. `couponid` int(11) DEFAULT '0',
  381. `status` int(11) DEFAULT '0',
  382. `paystatus` tinyint(3) DEFAULT '0',
  383. `creditstatus` tinyint(3) DEFAULT '0',
  384. `createtime` int(11) DEFAULT '0',
  385. `paytype` tinyint(3) DEFAULT '0',
  386. `getfrom` tinyint(3) DEFAULT '0',
  387. PRIMARY KEY (`id`),
  388. KEY `idx_uniacid` (`uniacid`),
  389. KEY `idx_couponid` (`couponid`),
  390. KEY `idx_status` (`status`),
  391. KEY `idx_paystatus` (`paystatus`),
  392. KEY `idx_createtime` (`createtime`),
  393. KEY `idx_getfrom` (`getfrom`)
  394. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  395. # Dump of table ims_yz_dispatch
  396. # ------------------------------------------------------------
  397. CREATE TABLE IF NOT EXISTS ims_yz_dispatch (
  398. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  399. `uniacid` int(11) DEFAULT NULL,
  400. `dispatch_name` varchar(50) DEFAULT NULL COMMENT '配送模板名称',
  401. `display_order` int(11) DEFAULT NULL COMMENT '排序',
  402. `enabled` tinyint(3) DEFAULT NULL COMMENT '是否显示(1:是;0:否)',
  403. `is_default` tinyint(3) DEFAULT NULL COMMENT '是否默认模板(1:是;0:否)',
  404. `calculate_type` tinyint(3) DEFAULT NULL COMMENT '计费方式',
  405. `areas` text COMMENT '配送区域',
  406. `first_weight` int(11) DEFAULT NULL COMMENT '首重克数',
  407. `another_weight` int(11) DEFAULT NULL COMMENT '续重克数',
  408. `first_weight_price` decimal(14,2) DEFAULT NULL COMMENT '首重价格',
  409. `another_weight_price` decimal(14,2) DEFAULT NULL COMMENT '续重价格',
  410. `first_piece` int(11) DEFAULT NULL COMMENT '首件个数',
  411. `another_piece` int(11) DEFAULT NULL COMMENT '续件个数',
  412. `first_piece_price` int(11) DEFAULT NULL COMMENT '首件价格',
  413. `another_piece_price` int(11) DEFAULT NULL COMMENT '续件价格',
  414. `weight_data` longtext COMMENT '按重量计费数据',
  415. `piece_data` longtext COMMENT '按数量计费数据',
  416. `is_plugin` tinyint(3) DEFAULT '0',
  417. `created_at` int(11) DEFAULT NULL,
  418. `updated_at` int(11) DEFAULT NULL,
  419. `deleted_at` int(11) DEFAULT NULL,
  420. PRIMARY KEY (`id`)
  421. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  422. # Dump of table ims_yz_dispatch_type
  423. # ------------------------------------------------------------
  424. CREATE TABLE IF NOT EXISTS ims_yz_dispatch_type (
  425. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  426. `name` varchar(50) NOT NULL DEFAULT '',
  427. `plugin` int(11) NOT NULL,
  428. PRIMARY KEY (`id`)
  429. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  430. # Dump of table ims_yz_goods
  431. # ------------------------------------------------------------
  432. CREATE TABLE IF NOT EXISTS ims_yz_goods (
  433. `id` int(11) NOT NULL AUTO_INCREMENT,
  434. `uniacid` int(11) NOT NULL DEFAULT '0' COMMENT '公众号ID',
  435. `brand_id` int(11) NOT NULL COMMENT '品牌ID',
  436. `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '类型1实体2虚拟',
  437. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态1上架0下架',
  438. `display_order` int(11) DEFAULT '0' COMMENT '排序',
  439. `title` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
  440. `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '主图',
  441. `thumb_url` text COMMENT '轮播图',
  442. `sku` varchar(5) DEFAULT '' COMMENT '单位',
  443. `description` varchar(1000) DEFAULT '',
  444. `content` text COMMENT '描述',
  445. `goods_sn` varchar(50) DEFAULT '' COMMENT '编号',
  446. `product_sn` varchar(50) DEFAULT '' COMMENT '条码',
  447. `market_price` decimal(14,2) DEFAULT '0.00' COMMENT '原价',
  448. `price` decimal(14,2) NOT NULL DEFAULT '0.00' COMMENT '现价',
  449. `cost_price` decimal(14,2) DEFAULT '0.00' COMMENT '成本价',
  450. `stock` int(10) NOT NULL DEFAULT '0' COMMENT '库存',
  451. `reduce_stock_method` int(11) DEFAULT '0' COMMENT '扣库存方式0下单1付款2永不',
  452. `show_sales` int(11) DEFAULT '0' COMMENT '销量',
  453. `real_sales` int(11) DEFAULT '0' COMMENT '销量',
  454. `weight` decimal(10,2) DEFAULT '0.00' COMMENT '重量',
  455. `has_option` int(11) DEFAULT '0' COMMENT '是否拥有规格',
  456. `is_new` tinyint(1) DEFAULT '0' COMMENT '新上',
  457. `is_hot` tinyint(1) DEFAULT '0' COMMENT '热卖',
  458. `is_discount` tinyint(1) DEFAULT '0' COMMENT '促销',
  459. `is_recommand` tinyint(1) DEFAULT '0' COMMENT '推荐',
  460. `is_comment` tinyint(1) DEFAULT '0',
  461. `is_deleted` tinyint(3) NOT NULL DEFAULT '0',
  462. `created_at` int(11) DEFAULT NULL,
  463. `deleted_at` int(11) DEFAULT NULL,
  464. `updated_at` int(11) DEFAULT NULL,
  465. `comment_num` int(11) NOT NULL DEFAULT '0' COMMENT '评论数量',
  466. `is_plugin` int(11) NOT NULL DEFAULT '0',
  467. PRIMARY KEY (`id`,`is_deleted`),
  468. KEY `idx_uniacid` (`uniacid`),
  469. KEY `idx_isnew` (`is_new`),
  470. KEY `idx_ishot` (`is_hot`),
  471. KEY `idx_isdiscount` (`is_discount`),
  472. KEY `idx_isrecommand` (`is_recommand`),
  473. KEY `idx_iscomment` (`is_comment`),
  474. KEY `idx_deleted` (`is_deleted`)
  475. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--商品主表';
  476. # Dump of table ims_yz_goods_area
  477. # ------------------------------------------------------------
  478. CREATE TABLE IF NOT EXISTS ims_yz_goods_area (
  479. `id` int(11) NOT NULL AUTO_INCREMENT,
  480. `goods_id` int(11) NOT NULL,
  481. `area_id` int(11) NOT NULL,
  482. PRIMARY KEY (`id`),
  483. KEY `idx_goodid` (`goods_id`)
  484. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--商品区域插件关联表';
  485. # Dump of table ims_yz_goods_bonus
  486. # ------------------------------------------------------------
  487. CREATE TABLE IF NOT EXISTS ims_yz_goods_bonus (
  488. `id` int(11) NOT NULL AUTO_INCREMENT,
  489. `goods_id` int(11) NOT NULL,
  490. `bonus_money` int(11) DEFAULT '0',
  491. PRIMARY KEY (`id`),
  492. KEY `idx_good_id` (`goods_id`) USING BTREE
  493. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--分红关联表';
  494. # Dump of table ims_yz_goods_category
  495. # ------------------------------------------------------------
  496. CREATE TABLE IF NOT EXISTS ims_yz_goods_category (
  497. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  498. `goods_id` int(11) DEFAULT NULL,
  499. `category_id` int(11) DEFAULT NULL,
  500. `category_ids` varchar(255) DEFAULT NULL,
  501. `updated_at` int(11) DEFAULT NULL,
  502. `created_at` int(11) DEFAULT NULL,
  503. `deleted_at` int(11) DEFAULT NULL,
  504. PRIMARY KEY (`id`),
  505. KEY `idx_goodid` (`goods_id`)
  506. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--分类关联';
  507. # Dump of table ims_yz_goods_discount
  508. # ------------------------------------------------------------
  509. CREATE TABLE IF NOT EXISTS ims_yz_goods_discount (
  510. `id` int(11) NOT NULL AUTO_INCREMENT,
  511. `goods_id` int(11) NOT NULL,
  512. `level_discount_type` tinyint(1) NOT NULL,
  513. `discount_method` tinyint(1) NOT NULL,
  514. `level_id` int(11) NOT NULL,
  515. `discount_value` decimal(14,2) NOT NULL,
  516. `created_at` int(11) NOT NULL,
  517. `updated_at` int(11) NOT NULL,
  518. `deleted_at` int(11) DEFAULT NULL,
  519. PRIMARY KEY (`id`),
  520. KEY `idx_goodid` (`goods_id`)
  521. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  522. # Dump of table ims_yz_goods_discount_detail
  523. # ------------------------------------------------------------
  524. CREATE TABLE IF NOT EXISTS ims_yz_goods_discount_detail (
  525. `id` int(11) NOT NULL AUTO_INCREMENT,
  526. `discount_id` int(11) NOT NULL,
  527. `level_id` int(11) DEFAULT NULL,
  528. `discount` decimal(3,2) DEFAULT NULL,
  529. `amount` int(11) DEFAULT NULL,
  530. PRIMARY KEY (`id`),
  531. KEY `idx_discountid` (`discount_id`)
  532. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--折扣与商品折扣明细关联表';
  533. # Dump of table ims_yz_goods_dispatch
  534. # ------------------------------------------------------------
  535. CREATE TABLE IF NOT EXISTS ims_yz_goods_dispatch (
  536. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  537. `goods_id` int(11) NOT NULL,
  538. `dispatch_type` tinyint(1) NOT NULL DEFAULT '1',
  539. `dispatch_price` int(11) DEFAULT '0',
  540. `dispatch_id` int(11) DEFAULT NULL,
  541. `is_cod` tinyint(1) NOT NULL DEFAULT '1',
  542. `created_at` int(11) NOT NULL,
  543. `updated_at` int(11) NOT NULL,
  544. `deleted_at` int(11) DEFAULT NULL,
  545. PRIMARY KEY (`id`),
  546. KEY `idx_good_id` (`goods_id`)
  547. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--等级折扣挂件';
  548. # Dump of table ims_yz_goods_diyform
  549. # ------------------------------------------------------------
  550. CREATE TABLE IF NOT EXISTS ims_yz_goods_diyform (
  551. `id` int(11) NOT NULL AUTO_INCREMENT,
  552. `good_id` int(11) NOT NULL,
  553. `diyform_id` int(11) DEFAULT NULL,
  554. `diyform_enable` tinyint(1) DEFAULT '0',
  555. PRIMARY KEY (`id`),
  556. KEY `idx_goodid` (`good_id`)
  557. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--自定义表单关联表';
  558. # Dump of table ims_yz_goods_level_returns
  559. # ------------------------------------------------------------
  560. CREATE TABLE IF NOT EXISTS ims_yz_goods_level_returns (
  561. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  562. `good_return_id` int(11) NOT NULL,
  563. `level_type` tinyint(3) NOT NULL DEFAULT '1',
  564. `level_id` int(11) NOT NULL,
  565. `amount` int(11) NOT NULL,
  566. PRIMARY KEY (`id`),
  567. KEY `idx_good_return_id` (`good_return_id`)
  568. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--等级返现规则表';
  569. # Dump of table ims_yz_goods_notices
  570. # ------------------------------------------------------------
  571. CREATE TABLE IF NOT EXISTS ims_yz_goods_notices (
  572. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  573. `goods_id` int(11) NOT NULL,
  574. `uid` int(11) DEFAULT NULL,
  575. `type` tinyint(1) DEFAULT NULL,
  576. PRIMARY KEY (`id`),
  577. KEY `idx_good_id` (`goods_id`)
  578. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--消息通知挂件';
  579. # Dump of table ims_yz_goods_option
  580. # ------------------------------------------------------------
  581. CREATE TABLE IF NOT EXISTS ims_yz_goods_option (
  582. `id` int(11) NOT NULL AUTO_INCREMENT,
  583. `uniacid` int(11) DEFAULT '0',
  584. `goods_id` int(10) DEFAULT '0',
  585. `title` varchar(255) DEFAULT NULL,
  586. `thumb` varchar(60) DEFAULT NULL,
  587. `product_price` decimal(10,2) DEFAULT '0.00',
  588. `market_price` decimal(10,2) DEFAULT '0.00',
  589. `cost_price` decimal(10,2) DEFAULT '0.00',
  590. `stock` int(11) DEFAULT '0',
  591. `weight` decimal(10,2) DEFAULT '0.00',
  592. `display_order` int(11) DEFAULT '0',
  593. `specs` text,
  594. `skuId` varchar(255) DEFAULT '',
  595. `goods_sn` varchar(255) DEFAULT '',
  596. `product_sn` varchar(255) DEFAULT '',
  597. `virtual` int(11) DEFAULT '0',
  598. `red_price` varchar(50) DEFAULT '',
  599. `created_at` int(11) DEFAULT NULL,
  600. `deleted_at` int(11) DEFAULT NULL,
  601. `updated_at` int(11) DEFAULT NULL,
  602. PRIMARY KEY (`id`),
  603. KEY `idx_uniacid` (`uniacid`),
  604. KEY `idx_goodsid` (`goods_id`),
  605. KEY `idx_displayorder` (`display_order`)
  606. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--商品规格';
  607. # Dump of table ims_yz_goods_param
  608. # ------------------------------------------------------------
  609. CREATE TABLE IF NOT EXISTS ims_yz_goods_param (
  610. `id` int(11) NOT NULL AUTO_INCREMENT,
  611. `uniacid` int(11) DEFAULT '0',
  612. `goods_id` int(10) DEFAULT '0',
  613. `title` varchar(50) DEFAULT NULL,
  614. `value` text,
  615. `displayorder` int(11) DEFAULT '0',
  616. `updated_at` int(11) DEFAULT NULL,
  617. `created_at` int(11) DEFAULT NULL,
  618. `deleted_at` int(11) DEFAULT NULL,
  619. PRIMARY KEY (`id`),
  620. KEY `idx_uniacid` (`uniacid`),
  621. KEY `idx_goodsid` (`goods_id`),
  622. KEY `idx_displayorder` (`displayorder`)
  623. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--商品属性挂件';
  624. # Dump of table ims_yz_goods_privilege
  625. # ------------------------------------------------------------
  626. CREATE TABLE IF NOT EXISTS ims_yz_goods_privilege (
  627. `id` int(11) NOT NULL AUTO_INCREMENT,
  628. `goods_id` int(11) NOT NULL,
  629. `show_levels` text COLLATE utf8mb4_unicode_ci,
  630. `show_groups` text COLLATE utf8mb4_unicode_ci,
  631. `buy_levels` text COLLATE utf8mb4_unicode_ci,
  632. `buy_groups` text COLLATE utf8mb4_unicode_ci,
  633. `once_buy_limit` int(11) DEFAULT '0',
  634. `total_buy_limit` int(11) DEFAULT '0',
  635. `day_buy_limit` int(11) DEFAULT '0',
  636. `week_buy_limit` int(11) DEFAULT '0',
  637. `month_buy_limit` int(11) DEFAULT '0',
  638. `time_begin_limit` int(11) DEFAULT NULL,
  639. `time_end_limit` int(11) DEFAULT NULL,
  640. `enable_time_limit` tinyint(1) NOT NULL,
  641. `created_at` int(11) NOT NULL,
  642. `updated_at` int(11) NOT NULL,
  643. `deleted_at` int(11) DEFAULT NULL,
  644. PRIMARY KEY (`id`),
  645. KEY `idx_goodid` (`goods_id`)
  646. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--权限挂件';
  647. # Dump of table ims_core_sessions
  648. # ------------------------------------------------------------
  649. CREATE TABLE IF NOT EXISTS ims_core_sessions (
  650. `sid` char(32) NOT NULL primary key,
  651. `uniacid` int(10) NOT NULL,
  652. `openid` varchar(50) NOT NULL,
  653. `data` varchar(5000) NOT NULL,
  654. `expiretime` int(10) NOT NULL
  655. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  656. # Dump of table ims_yz_goods_return
  657. # ------------------------------------------------------------
  658. CREATE TABLE IF NOT EXISTS ims_yz_goods_return (
  659. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  660. `good_id` int(11) NOT NULL,
  661. `is_level_return` tinyint(3) NOT NULL DEFAULT '0',
  662. `level_return_type` tinyint(3) NOT NULL DEFAULT '1',
  663. `is_order_return` tinyint(3) NOT NULL DEFAULT '0',
  664. `is_queue_return` tinyint(3) NOT NULL DEFAULT '0',
  665. `add_pool_amount` int(11) DEFAULT '0',
  666. PRIMARY KEY (`id`),
  667. KEY `idx_good_id` (`good_id`)
  668. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品--全返关联表';
  669. # Dump of table ims_yz_goods_sale
  670. # ------------------------------------------------------------
  671. CREATE TABLE IF NOT EXISTS ims_yz_goods_sale (
  672. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  673. `goods_id` int(11) NOT NULL,
  674. `max_point_deduct` int(11) DEFAULT '0',
  675. `max_balance_deduct` int(11) DEFAULT '0',
  676. `is_sendfree` int(11) DEFAULT '0',
  677. `ed_num` int(11) DEFAULT '0',
  678. `ed_money` int(11) DEFAULT '0',
  679. `ed_areas` text COLLATE utf8mb4_unicode_ci,
  680. `point` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '0',
  681. `bonus` int(11) DEFAULT '0',
  682. PRIMARY KEY (`id`),
  683. KEY `idx_good_id` (`goods_id`)
  684. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  685. # Dump of table ims_yz_goods_share
  686. # ------------------------------------------------------------
  687. CREATE TABLE IF NOT EXISTS ims_yz_goods_share (
  688. `id` int(11) NOT NULL AUTO_INCREMENT,
  689. `goods_id` int(11) NOT NULL,
  690. `need_follow` tinyint(1) DEFAULT NULL,
  691. `no_follow_message` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  692. `follow_message` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  693. `share_title` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
  694. `share_thumb` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  695. `share_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  696. `created_at` int(11) NOT NULL,
  697. `updated_at` int(11) NOT NULL,
  698. `deleted_at` int(11) DEFAULT NULL,
  699. PRIMARY KEY (`id`),
  700. KEY `idx_goodid` (`goods_id`)
  701. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  702. # Dump of table ims_mc_chats_record
  703. # ------------------------------------------------------------
  704. CREATE TABLE IF NOT EXISTS ims_mc_chats_record (
  705. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  706. `uniacid` int(10) unsigned NOT NULL,
  707. `acid` int(10) unsigned NOT NULL,
  708. `flag` tinyint(3) unsigned NOT NULL,
  709. `openid` varchar(32) NOT NULL,
  710. `msgtype` varchar(15) NOT NULL,
  711. `content` varchar(10000) NOT NULL,
  712. `createtime` int(10) unsigned NOT NULL,
  713. PRIMARY KEY (`id`),
  714. KEY `uniacid` (`uniacid`,`acid`),
  715. KEY `openid` (`openid`),
  716. KEY `createtime` (`createtime`)
  717. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  718. # Dump of table ims_yz_goods_spec
  719. # ------------------------------------------------------------
  720. CREATE TABLE IF NOT EXISTS ims_yz_goods_spec (
  721. `id` int(11) NOT NULL AUTO_INCREMENT,
  722. `uniacid` int(11) DEFAULT '0',
  723. `goods_id` int(11) DEFAULT '0',
  724. `title` varchar(50) DEFAULT NULL,
  725. `description` varchar(1000) DEFAULT NULL,
  726. `display_type` tinyint(3) DEFAULT '0',
  727. `content` text,
  728. `display_order` int(11) DEFAULT '0',
  729. `propId` varchar(255) DEFAULT NULL,
  730. `created_at` int(11) DEFAULT NULL,
  731. `deleted_at` int(11) DEFAULT NULL,
  732. `updated_at` int(11) DEFAULT NULL,
  733. PRIMARY KEY (`id`),
  734. KEY `idx_uniacid` (`uniacid`),
  735. KEY `idx_goodsid` (`goods_id`),
  736. KEY `idx_displayorder` (`display_order`)
  737. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  738. # Dump of table ims_yz_goods_spec_item
  739. # ------------------------------------------------------------
  740. CREATE TABLE IF NOT EXISTS ims_yz_goods_spec_item (
  741. `id` int(11) NOT NULL AUTO_INCREMENT,
  742. `uniacid` int(11) DEFAULT '0',
  743. `specid` int(11) DEFAULT '0',
  744. `title` varchar(255) DEFAULT NULL,
  745. `thumb` varchar(255) DEFAULT NULL,
  746. `show` int(11) DEFAULT '0',
  747. `display_order` int(11) DEFAULT '0',
  748. `valueId` varchar(255) DEFAULT NULL,
  749. `virtual` int(11) DEFAULT '0',
  750. `created_at` int(11) DEFAULT NULL,
  751. `deleted_at` int(11) DEFAULT NULL,
  752. `updated_at` int(11) DEFAULT NULL,
  753. PRIMARY KEY (`id`),
  754. KEY `idx_uniacid` (`uniacid`),
  755. KEY `idx_specid` (`specid`),
  756. KEY `idx_show` (`show`),
  757. KEY `idx_displayorder` (`display_order`)
  758. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  759. # Dump of table ims_yz_member
  760. # ------------------------------------------------------------
  761. CREATE TABLE IF NOT EXISTS ims_yz_member (
  762. `m_id` int(11) NOT NULL AUTO_INCREMENT,
  763. `member_id` int(11) NOT NULL,
  764. `uniacid` int(11) NOT NULL,
  765. `parent_id` int(11) NOT NULL DEFAULT '0',
  766. `group_id` int(11) NOT NULL DEFAULT '0',
  767. `level_id` int(11) NOT NULL DEFAULT '0',
  768. `inviter` int(11) DEFAULT '0',
  769. `is_black` tinyint(1) NOT NULL DEFAULT '0',
  770. `province_name` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT '',
  771. `city_name` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT '',
  772. `area_name` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT '',
  773. `province` int(11) DEFAULT '0',
  774. `city` int(11) DEFAULT '0',
  775. `area` int(11) DEFAULT '0',
  776. `address` text COLLATE utf8mb4_unicode_ci,
  777. `referralsn` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '0',
  778. `is_agent` tinyint(1) DEFAULT '0',
  779. `alipayname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  780. `alipay` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  781. `content` text COLLATE utf8mb4_unicode_ci,
  782. `status` int(11) DEFAULT '0',
  783. `child_time` int(11) DEFAULT '0',
  784. `agent_time` int(11) DEFAULT '0',
  785. `apply_time` int(11) DEFAULT '0',
  786. `relation` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  787. `created_at` int(11) NOT NULL,
  788. `updated_at` int(11) NOT NULL,
  789. `deleted_at` int(11) DEFAULT NULL,
  790. PRIMARY KEY (`m_id`),
  791. UNIQUE INDEX `un_member_id`(`member_id`),
  792. KEY `idx_uniacid` (`uniacid`),
  793. KEY `idx_parentid` (`parent_id`)
  794. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  795. # Dump of table ims_yz_member_app_wechat
  796. # ------------------------------------------------------------
  797. CREATE TABLE IF NOT EXISTS ims_yz_member_app_wechat (
  798. `app_wechat_id` int(11) NOT NULL,
  799. `uniacid` int(11) NOT NULL,
  800. `member_id` int(11) NOT NULL,
  801. `openid` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  802. `nickname` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  803. `avatar` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  804. `gender` tinyint(1) NOT NULL DEFAULT '0',
  805. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  806. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  807. `deleted_at` int(11) DEFAULT NULL,
  808. PRIMARY KEY (`app_wechat_id`),
  809. UNIQUE INDEX `un_openid`(`openid`)
  810. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  811. # Dump of table ims_yz_member_cart
  812. # ------------------------------------------------------------
  813. CREATE TABLE IF NOT EXISTS ims_yz_member_cart (
  814. `id` int(11) NOT NULL AUTO_INCREMENT,
  815. `member_id` int(11) NOT NULL,
  816. `uniacid` int(11) NOT NULL,
  817. `goods_id` int(11) NOT NULL,
  818. `total` int(11) NOT NULL,
  819. `option_id` int(11) NOT NULL,
  820. `created_at` int(11) NOT NULL,
  821. `updated_at` int(11) NOT NULL,
  822. `deleted_at` int(11) DEFAULT NULL,
  823. PRIMARY KEY (`id`)
  824. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  825. # Dump of table ims_yz_member_coupon
  826. # ------------------------------------------------------------
  827. CREATE TABLE IF NOT EXISTS ims_yz_member_coupon (
  828. `id` int(11) NOT NULL AUTO_INCREMENT,
  829. `uniacid` int(11) DEFAULT '0',
  830. `uid` varchar(255) DEFAULT '',
  831. `coupon_id` int(11) DEFAULT '0',
  832. `get_type` tinyint(3) DEFAULT '0',
  833. `used` int(11) DEFAULT '0',
  834. `use_time` int(11) DEFAULT '0',
  835. `get_time` int(11) DEFAULT '0',
  836. `send_uid` int(11) DEFAULT '0',
  837. `order_sn` varchar(255) DEFAULT '',
  838. `back` tinyint(3) DEFAULT '0',
  839. `back_time` int(11) DEFAULT '0',
  840. PRIMARY KEY (`id`),
  841. KEY `idx_couponid` (`coupon_id`),
  842. KEY `idx_gettype` (`get_type`)
  843. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  844. # Dump of table ims_yz_member_favorite
  845. # ------------------------------------------------------------
  846. CREATE TABLE IF NOT EXISTS ims_yz_member_favorite (
  847. `id` int(11) NOT NULL AUTO_INCREMENT,
  848. `member_id` int(11) NOT NULL,
  849. `uniacid` int(11) NOT NULL,
  850. `goods_id` int(11) NOT NULL,
  851. `created_at` int(11) NOT NULL,
  852. `updated_at` int(11) NOT NULL,
  853. `deleted_at` int(11) DEFAULT NULL,
  854. PRIMARY KEY (`id`)
  855. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  856. # Dump of table ims_yz_member_group
  857. # ------------------------------------------------------------
  858. CREATE TABLE IF NOT EXISTS ims_yz_member_group (
  859. `id` int(11) NOT NULL AUTO_INCREMENT,
  860. `uniacid` int(11) NOT NULL,
  861. `group_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  862. `created_at` int(11) NOT NULL,
  863. `updated_at` int(11) NOT NULL,
  864. `deleted_at` int(11) DEFAULT NULL,
  865. `is_default` int(11) DEFAULT '0',
  866. PRIMARY KEY (`id`)
  867. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  868. # Dump of table ims_yz_member_history
  869. # ------------------------------------------------------------
  870. CREATE TABLE IF NOT EXISTS ims_yz_member_history (
  871. `id` int(11) NOT NULL AUTO_INCREMENT,
  872. `member_id` int(11) NOT NULL,
  873. `uniacid` int(11) NOT NULL,
  874. `goods_id` int(11) NOT NULL,
  875. `created_at` int(11) NOT NULL,
  876. `updated_at` int(11) NOT NULL,
  877. `deleted_at` int(11) DEFAULT NULL,
  878. PRIMARY KEY (`id`)
  879. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  880. # Dump of table ims_yz_member_income
  881. # ------------------------------------------------------------
  882. CREATE TABLE IF NOT EXISTS ims_yz_member_income (
  883. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  884. `uniacid` int(11) NOT NULL,
  885. `member_id` int(11) NOT NULL,
  886. `incometable_type` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  887. `incometable_id` int(11) DEFAULT NULL,
  888. `type_name` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  889. `amount` decimal(14,2) NOT NULL DEFAULT '0.00',
  890. `status` tinyint(1) NOT NULL DEFAULT '0',
  891. `pay_status` tinyint(3) NOT NULL DEFAULT '0',
  892. `detail` text COLLATE utf8mb4_unicode_ci,
  893. `create_month` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '',
  894. `created_at` int(11) DEFAULT NULL,
  895. `updated_at` int(11) DEFAULT NULL,
  896. `deleted_at` int(11) DEFAULT NULL,
  897. PRIMARY KEY (`id`)
  898. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  899. # Dump of table ims_yz_member_level
  900. # ------------------------------------------------------------
  901. CREATE TABLE IF NOT EXISTS ims_yz_member_level (
  902. `id` int(11) NOT NULL AUTO_INCREMENT,
  903. `uniacid` int(11) NOT NULL,
  904. `level` int(11) NOT NULL,
  905. `level_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  906. `order_money` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  907. `order_count` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  908. `goods_id` int(11) DEFAULT NULL,
  909. `discount` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  910. `created_at` int(11) NOT NULL,
  911. `updated_at` int(11) NOT NULL,
  912. `deleted_at` int(11) DEFAULT NULL,
  913. `is_default` int(11) DEFAULT '0',
  914. PRIMARY KEY (`id`)
  915. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  916. # Dump of table ims_yz_member_mini_app
  917. # ------------------------------------------------------------
  918. CREATE TABLE IF NOT EXISTS ims_yz_member_mini_app (
  919. `mini_app_id` int(11) NOT NULL AUTO_INCREMENT,
  920. `uniacid` int(11) NOT NULL,
  921. `member_id` int(11) NOT NULL,
  922. `openid` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  923. `nickname` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  924. `avatar` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  925. `gender` tinyint(1) NOT NULL,
  926. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  927. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  928. `deleted_at` int(11) DEFAULT NULL,
  929. PRIMARY KEY (`mini_app_id`),
  930. UNIQUE INDEX `un_openid`(`openid`)
  931. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  932. # Dump of table ims_yz_member_qq
  933. # ------------------------------------------------------------
  934. CREATE TABLE IF NOT EXISTS ims_yz_member_qq (
  935. `qq_id` int(11) NOT NULL AUTO_INCREMENT,
  936. `uniacid` int(11) NOT NULL,
  937. `member_id` int(11) NOT NULL,
  938. `nickname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  939. `figureurl` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  940. `figureurl_1` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  941. `figureurl_2` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  942. `figureurl_qq_1` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  943. `figureurl_qq_2` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  944. `gender` tinyint(1) NOT NULL DEFAULT '0',
  945. `is_yellow_year_vip` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  946. `vip` int(11) NOT NULL DEFAULT '0',
  947. `yellow_vip_level` tinyint(1) NOT NULL DEFAULT '0',
  948. `level` tinyint(1) NOT NULL DEFAULT '0',
  949. `is_yellow_vip` tinyint(1) NOT NULL DEFAULT '0',
  950. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  951. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  952. `deleted_at` int(11) DEFAULT NULL,
  953. PRIMARY KEY (`qq_id`)
  954. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  955. # Dump of table ims_yz_member_relation
  956. # ------------------------------------------------------------
  957. CREATE TABLE IF NOT EXISTS ims_yz_member_relation (
  958. `id` int(11) NOT NULL AUTO_INCREMENT,
  959. `uniacid` int(11) DEFAULT NULL,
  960. `status` tinyint(1) NOT NULL DEFAULT '0',
  961. `become` tinyint(1) NOT NULL DEFAULT '0',
  962. `become_order` tinyint(1) NOT NULL DEFAULT '0',
  963. `become_child` tinyint(1) NOT NULL DEFAULT '0',
  964. `become_ordercount` int(11) DEFAULT '0',
  965. `become_moneycount` decimal(14,2) DEFAULT '0.00',
  966. `become_goods_id` int(11) DEFAULT '0',
  967. `become_info` tinyint(1) NOT NULL DEFAULT '1',
  968. `become_check` tinyint(1) NOT NULL DEFAULT '1',
  969. PRIMARY KEY (`id`)
  970. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  971. # Dump of table ims_yz_member_unique
  972. # ------------------------------------------------------------
  973. CREATE TABLE IF NOT EXISTS ims_yz_member_unique (
  974. `unique_id` int(11) NOT NULL AUTO_INCREMENT,
  975. `uniacid` int(11) DEFAULT NULL,
  976. `unionid` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  977. `member_id` int(11) NOT NULL,
  978. `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  979. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  980. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  981. PRIMARY KEY (`unique_id`),
  982. UNIQUE INDEX `un_unionid`(`unionid`),
  983. KEY `idx_uniacid` (`uniacid`),
  984. KEY `idx_member_id` (`member_id`)
  985. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  986. # Dump of table ims_yz_member_wechat
  987. # ------------------------------------------------------------
  988. CREATE TABLE IF NOT EXISTS ims_yz_member_wechat (
  989. `wechat_id` int(11) NOT NULL AUTO_INCREMENT,
  990. `uniacid` int(11) NOT NULL,
  991. `member_id` int(11) NOT NULL,
  992. `openid` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  993. `nickname` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  994. `gender` tinyint(1) NOT NULL DEFAULT '0',
  995. `avatar` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  996. `province` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL,
  997. `city` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  998. `country` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  999. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  1000. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  1001. `deleted_at` int(11) DEFAULT NULL,
  1002. PRIMARY KEY (`wechat_id`),
  1003. KEY `idx_member_id` (`member_id`)
  1004. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1005. # Dump of table ims_yz_menu
  1006. # ------------------------------------------------------------
  1007. CREATE TABLE IF NOT EXISTS ims_yz_menu (
  1008. `id` int(11) NOT NULL AUTO_INCREMENT,
  1009. `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1010. `item` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1011. `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1012. `url_params` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1013. `permit` tinyint(1) NOT NULL DEFAULT '0',
  1014. `menu` tinyint(1) NOT NULL DEFAULT '0',
  1015. `icon` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1016. `parent_id` int(11) NOT NULL DEFAULT '0',
  1017. `sort` int(11) NOT NULL DEFAULT '0',
  1018. `status` tinyint(1) NOT NULL DEFAULT '0',
  1019. `created_at` int(11) NOT NULL DEFAULT '0',
  1020. `updated_at` int(11) NOT NULL DEFAULT '0',
  1021. `deleted_at` int(11) DEFAULT NULL,
  1022. PRIMARY KEY (`id`)
  1023. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1024. # Dump of table ims_yz_options
  1025. # ------------------------------------------------------------
  1026. CREATE TABLE IF NOT EXISTS ims_yz_options (
  1027. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1028. `option_name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1029. `option_value` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1030. PRIMARY KEY (`id`)
  1031. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1032. # Dump of table ims_yz_order
  1033. # ------------------------------------------------------------
  1034. CREATE TABLE IF NOT EXISTS ims_yz_order (
  1035. `id` int(11) NOT NULL AUTO_INCREMENT,
  1036. `uniacid` int(11) NOT NULL DEFAULT '0' COMMENT '公众号ID',
  1037. `uid` int(10) NOT NULL DEFAULT '0' COMMENT '会员ID',
  1038. `order_sn` varchar(23) NOT NULL DEFAULT '' COMMENT '订单编号',
  1039. `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实付金额',
  1040. `goods_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品现价和',
  1041. `goods_total` int(11) NOT NULL DEFAULT '1' COMMENT '商品数量和',
  1042. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态-1关闭0未支付1代发货2代收货3完成',
  1043. `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  1044. `is_deleted` tinyint(3) NOT NULL DEFAULT '0',
  1045. `is_member_deleted` tinyint(3) NOT NULL DEFAULT '0' COMMENT '会员删除',
  1046. `finish_time` int(11) NOT NULL DEFAULT '0' COMMENT '完成时间',
  1047. `pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '支付时间',
  1048. `send_time` int(11) NOT NULL DEFAULT '0' COMMENT '发货时间',
  1049. `cancel_time` int(11) NOT NULL DEFAULT '0' COMMENT '关闭时间',
  1050. `created_at` int(11) NOT NULL DEFAULT '0',
  1051. `updated_at` int(11) NOT NULL DEFAULT '0',
  1052. `deleted_at` int(11) NOT NULL DEFAULT '0',
  1053. `cancel_pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '取消支付时间',
  1054. `cancel_send_time` int(11) NOT NULL DEFAULT '0' COMMENT '取消发货时间',
  1055. `dispatch_type_id` tinyint(3) NOT NULL DEFAULT '0' COMMENT '配送方式ID',
  1056. `dispatch_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '运费',
  1057. `discount_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  1058. `pay_type_id` tinyint(3) NOT NULL DEFAULT '0' COMMENT '支付类型',
  1059. `order_goods_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单商品金额和',
  1060. `deduction_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '抵扣金额',
  1061. `refund_id` int(11) NOT NULL DEFAULT '0' COMMENT '售后记录ID',
  1062. `is_plugin` int(11) NOT NULL DEFAULT '0',
  1063. `change_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '改价金额',
  1064. `change_dispatch_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '改价运费金额',
  1065. `comment_status` tinyint(2) NOT NULL DEFAULT '0',
  1066. `order_pay_id` varchar(23) NOT NULL DEFAULT '' COMMENT '已支付记录id',
  1067. PRIMARY KEY (`id`)
  1068. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--订单主表';
  1069. # Dump of table ims_yz_order_address
  1070. # ------------------------------------------------------------
  1071. CREATE TABLE IF NOT EXISTS ims_yz_order_address (
  1072. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1073. `order_id` int(11) NOT NULL,
  1074. `address` varchar(255) NOT NULL DEFAULT '0' COMMENT '详细地址',
  1075. `mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
  1076. `realname` varchar(50) NOT NULL DEFAULT '' COMMENT '收件人姓名',
  1077. `updated_at` int(11) NOT NULL,
  1078. `created_at` int(11) NOT NULL,
  1079. PRIMARY KEY (`id`)
  1080. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--收货地址表';
  1081. # Dump of table ims_yz_order_change_log
  1082. # ------------------------------------------------------------
  1083. CREATE TABLE IF NOT EXISTS ims_yz_order_change_log (
  1084. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1085. `order_id` int(11) DEFAULT NULL,
  1086. `username` varchar(50) NOT NULL DEFAULT '',
  1087. `old_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '原金额',
  1088. `new_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '新金额',
  1089. `change_price` decimal(10,2) NOT NULL COMMENT '改价金额',
  1090. `created_at` int(11) DEFAULT NULL,
  1091. `updated_at` int(11) DEFAULT NULL,
  1092. `deleted_at` int(11) DEFAULT NULL,
  1093. `change_dispatch_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  1094. PRIMARY KEY (`id`)
  1095. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--改价记录';
  1096. # Dump of table ims_yz_order_express
  1097. # ------------------------------------------------------------
  1098. CREATE TABLE IF NOT EXISTS ims_yz_order_express (
  1099. `id` int(11) NOT NULL AUTO_INCREMENT,
  1100. `order_id` int(11) NOT NULL DEFAULT '0',
  1101. `express_company_name` varchar(50) NOT NULL DEFAULT '0' COMMENT '快递名称',
  1102. `express_sn` varchar(50) NOT NULL DEFAULT '0' COMMENT '快递编号',
  1103. `express_code` varchar(20) NOT NULL DEFAULT '0' COMMENT '快递标识',
  1104. `created_at` int(11) NOT NULL DEFAULT '0',
  1105. `updated_at` int(11) NOT NULL DEFAULT '0',
  1106. `deleted_at` int(11) NOT NULL DEFAULT '0',
  1107. PRIMARY KEY (`id`),
  1108. KEY `idx_order_id` (`order_id`)
  1109. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--快递记录';
  1110. # Dump of table ims_yz_order_goods
  1111. # ------------------------------------------------------------
  1112. CREATE TABLE IF NOT EXISTS ims_yz_order_goods (
  1113. `id` int(11) NOT NULL AUTO_INCREMENT,
  1114. `uniacid` int(11) NOT NULL DEFAULT '0' COMMENT '公众号',
  1115. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  1116. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  1117. `pay_sn` varchar(23) NOT NULL DEFAULT '',
  1118. `total` int(11) NOT NULL DEFAULT '1' COMMENT '数量',
  1119. `create_at` int(11) NOT NULL DEFAULT '0',
  1120. `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '初始金额',
  1121. `goods_sn` varchar(50) NOT NULL DEFAULT '' COMMENT '商品编号',
  1122. `uid` int(10) NOT NULL DEFAULT '0' COMMENT '会员ID',
  1123. `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '主图',
  1124. `title` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
  1125. `goods_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品现价',
  1126. `goods_option_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品规格ID',
  1127. `goods_option_title` varchar(255) NOT NULL DEFAULT '' COMMENT '商品规格名称',
  1128. `product_sn` varchar(23) NOT NULL DEFAULT '' COMMENT '条码',
  1129. `created_at` int(11) NOT NULL,
  1130. `updated_at` int(11) NOT NULL,
  1131. `discount_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  1132. `comment_status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '评论状态',
  1133. `change_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '改价金额',
  1134. `comment_id` int(11) NOT NULL DEFAULT '0' COMMENT '评论ID',
  1135. PRIMARY KEY (`id`)
  1136. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--商品记录表';
  1137. # Dump of table ims_yz_order_goods_change_log
  1138. # ------------------------------------------------------------
  1139. CREATE TABLE IF NOT EXISTS ims_yz_order_goods_change_log (
  1140. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1141. `order_change_log_id` int(11) DEFAULT NULL,
  1142. `order_goods_id` int(11) NOT NULL COMMENT '订单商品ID',
  1143. `old_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '原金额',
  1144. `new_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '新金额',
  1145. `change_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '改价金额',
  1146. `created_at` int(11) DEFAULT NULL,
  1147. `updated_at` int(11) DEFAULT NULL,
  1148. `deleted_at` int(11) DEFAULT NULL,
  1149. PRIMARY KEY (`id`)
  1150. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--订单商品改价表';
  1151. # Dump of table ims_yz_order_mapping
  1152. # ------------------------------------------------------------
  1153. CREATE TABLE IF NOT EXISTS ims_yz_order_mapping (
  1154. `id` int(11) NOT NULL AUTO_INCREMENT,
  1155. `old_order_id` int(11) NOT NULL,
  1156. `new_order_id` int(11) NOT NULL,
  1157. `old_openid` char(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  1158. `new_member_id` int(11) NOT NULL,
  1159. PRIMARY KEY (`id`)
  1160. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1161. # Dump of table ims_yz_order_operation_log
  1162. # ------------------------------------------------------------
  1163. CREATE TABLE IF NOT EXISTS ims_yz_order_operation_log (
  1164. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1165. `order_id` int(11) DEFAULT '0' COMMENT '订单ID',
  1166. `before_operation_status` tinyint(1) DEFAULT '0' COMMENT '操作前状态',
  1167. `after_operation_status` tinyint(1) DEFAULT '0' COMMENT '操作后状态',
  1168. `operator` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '操作账号名',
  1169. `operation_time` int(11) DEFAULT '0' COMMENT '操作时间',
  1170. `created_at` int(11) DEFAULT '0',
  1171. `updated_at` int(11) DEFAULT NULL,
  1172. `type` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT '0',
  1173. PRIMARY KEY (`id`)
  1174. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--订单状态操作记录';
  1175. # Dump of table ims_yz_order_pay
  1176. # ------------------------------------------------------------
  1177. CREATE TABLE IF NOT EXISTS ims_yz_order_pay (
  1178. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1179. `pay_sn` varchar(23) NOT NULL DEFAULT '' COMMENT '支付流水号',
  1180. `status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '状态',
  1181. `pay_type_id` tinyint(3) NOT NULL DEFAULT '0' COMMENT '支付类型ID',
  1182. `pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '支付时间',
  1183. `refund_time` int(11) NOT NULL DEFAULT '0',
  1184. `order_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '合并支付订单ID数组',
  1185. `amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '支付金额',
  1186. `uid` int(11) NOT NULL,
  1187. `updated_at` int(11) DEFAULT NULL,
  1188. `created_at` int(11) DEFAULT NULL,
  1189. `deleted_at` int(11) DEFAULT NULL,
  1190. PRIMARY KEY (`id`)
  1191. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--支付流水记录';
  1192. # Dump of table ims_yz_order_refund
  1193. # ------------------------------------------------------------
  1194. CREATE TABLE IF NOT EXISTS ims_yz_order_refund (
  1195. `id` int(11) NOT NULL AUTO_INCREMENT,
  1196. `uniacid` int(11) NOT NULL DEFAULT '0' COMMENT '公众号',
  1197. `uid` int(11) NOT NULL COMMENT '会员ID',
  1198. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  1199. `refund_sn` varchar(255) NOT NULL COMMENT '退款编号',
  1200. `refund_type` tinyint(1) DEFAULT '0' COMMENT '退款类型:0退款1退货退款2换货',
  1201. `status` tinyint(3) DEFAULT '0' COMMENT '状态',
  1202. `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总金额',
  1203. `reason` varchar(255) NOT NULL DEFAULT '' COMMENT '退款原因',
  1204. `images` text NOT NULL COMMENT '图片',
  1205. `content` text NOT NULL COMMENT '用户说明',
  1206. `create_time` int(11) DEFAULT '0' COMMENT '申请时间',
  1207. `reply` text,
  1208. `reject_reason` text COMMENT '驳回原因',
  1209. `refund_way_type` tinyint(3) DEFAULT '0' COMMENT '寄回方式',
  1210. `apply_price` decimal(10,2) DEFAULT '0.00' COMMENT '申请金额',
  1211. `freight_price` decimal(10,2) DEFAULT '0.00' COMMENT '运费金额',
  1212. `refund_proof_imgs` text,
  1213. `refund_time` int(11) DEFAULT '0',
  1214. `refund_address` text COMMENT '退货寄回地址ID',
  1215. `remark` text,
  1216. `operate_time` int(11) DEFAULT '0',
  1217. `send_time` int(11) DEFAULT '0',
  1218. `return_time` int(11) DEFAULT '0',
  1219. `end_time` int(11) DEFAULT '0',
  1220. `alipay_batch_sn` varchar(255) DEFAULT '',
  1221. `updated_at` int(11) DEFAULT NULL,
  1222. `created_at` int(1) DEFAULT NULL,
  1223. PRIMARY KEY (`id`),
  1224. KEY `idx_create_time` (`create_time`),
  1225. KEY `idx_shop_id` (`uniacid`)
  1226. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--售后记录表';
  1227. # Dump of table ims_yz_order_remark
  1228. # ------------------------------------------------------------
  1229. CREATE TABLE IF NOT EXISTS ims_yz_order_remark (
  1230. `id` int(11) NOT NULL AUTO_INCREMENT,
  1231. `order_id` int(11) NOT NULL,
  1232. `remark` char(255) NOT NULL,
  1233. `updated_at` int(11) NOT NULL DEFAULT '0',
  1234. `created_at` int(11) NOT NULL DEFAULT '0',
  1235. `deleted_at` int(11) NOT NULL DEFAULT '0',
  1236. PRIMARY KEY (`id`),
  1237. KEY `idx_order_id` (`order_id`)
  1238. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--商家注释';
  1239. # Dump of table ims_yz_pay_access_log
  1240. # ------------------------------------------------------------
  1241. CREATE TABLE IF NOT EXISTS ims_yz_pay_access_log (
  1242. `id` int(11) NOT NULL AUTO_INCREMENT,
  1243. `uniacid` int(11) NOT NULL,
  1244. `member_id` int(11) NOT NULL,
  1245. `url` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1246. `http_method` char(7) COLLATE utf8mb4_unicode_ci NOT NULL,
  1247. `ip` varchar(135) COLLATE utf8mb4_unicode_ci NOT NULL,
  1248. `created_at` int(11) NOT NULL DEFAULT '0',
  1249. `updated_at` int(11) NOT NULL DEFAULT '0',
  1250. PRIMARY KEY (`id`)
  1251. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1252. # Dump of table ims_yz_pay_log
  1253. # ------------------------------------------------------------
  1254. CREATE TABLE IF NOT EXISTS ims_yz_pay_log (
  1255. `id` int(11) NOT NULL AUTO_INCREMENT,
  1256. `uniacid` int(11) NOT NULL,
  1257. `member_id` int(11) NOT NULL,
  1258. `type` tinyint(4) NOT NULL,
  1259. `third_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1260. `price` decimal(14,2) NOT NULL,
  1261. `operation` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1262. `ip` varchar(135) COLLATE utf8mb4_unicode_ci NOT NULL,
  1263. `created_at` int(13) NOT NULL DEFAULT '0',
  1264. `updated_at` int(13) NOT NULL DEFAULT '0',
  1265. PRIMARY KEY (`id`)
  1266. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统--支付请求日志';
  1267. # Dump of table ims_yz_pay_order
  1268. # ------------------------------------------------------------
  1269. CREATE TABLE IF NOT EXISTS ims_yz_pay_order (
  1270. `id` int(11) NOT NULL AUTO_INCREMENT,
  1271. `uniacid` int(11) NOT NULL,
  1272. `member_id` int(11) NOT NULL,
  1273. `int_order_no` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1274. `out_order_no` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  1275. `trade_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '0',
  1276. `status` tinyint(1) NOT NULL DEFAULT '0',
  1277. `price` decimal(14,2) NOT NULL,
  1278. `type` tinyint(1) NOT NULL,
  1279. `third_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1280. `created_at` int(11) NOT NULL DEFAULT '0',
  1281. `updated_at` int(11) NOT NULL DEFAULT '0',
  1282. `deleted_at` int(11) DEFAULT NULL,
  1283. PRIMARY KEY (`id`),
  1284. KEY `idx_uniacid` (`uniacid`),
  1285. KEY `idx_member_id` (`member_id`),
  1286. KEY `idx_order_no` (`out_order_no`)
  1287. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--支付流水记录';
  1288. # Dump of table ims_yz_pay_refund_order
  1289. # ------------------------------------------------------------
  1290. CREATE TABLE IF NOT EXISTS ims_yz_pay_refund_order (
  1291. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1292. `uniacid` int(11) NOT NULL,
  1293. `member_id` int(11) NOT NULL,
  1294. `int_order_no` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1295. `out_order_no` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1296. `trade_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '0',
  1297. `price` decimal(14,2) NOT NULL,
  1298. `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1299. `status` tinyint(1) NOT NULL,
  1300. `created_at` int(11) NOT NULL DEFAULT '0',
  1301. `updated_at` int(11) NOT NULL DEFAULT '0',
  1302. `deleted_at` int(11) DEFAULT NULL,
  1303. PRIMARY KEY (`id`)
  1304. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--支付退款记录';
  1305. # Dump of table ims_yz_pay_request_data
  1306. # ------------------------------------------------------------
  1307. CREATE TABLE IF NOT EXISTS ims_yz_pay_request_data (
  1308. `id` int(11) NOT NULL AUTO_INCREMENT,
  1309. `uniacid` int(11) NOT NULL,
  1310. `out_order_no` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1311. `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1312. `third_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1313. `params` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1314. `created_at` int(11) NOT NULL DEFAULT '0',
  1315. `updated_at` int(11) NOT NULL,
  1316. PRIMARY KEY (`id`)
  1317. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统--支付请求参数日志';
  1318. # Dump of table ims_yz_pay_response_data
  1319. # ------------------------------------------------------------
  1320. CREATE TABLE IF NOT EXISTS ims_yz_pay_response_data (
  1321. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1322. `uniacid` int(11) NOT NULL,
  1323. `out_order_no` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  1324. `third_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1325. `params` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1326. `created_at` int(11) NOT NULL DEFAULT '0',
  1327. `updated_at` int(11) NOT NULL,
  1328. PRIMARY KEY (`id`)
  1329. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统--支付回调参数日志';
  1330. # Dump of table ims_yz_pay_type
  1331. # ------------------------------------------------------------
  1332. CREATE TABLE IF NOT EXISTS ims_yz_pay_type (
  1333. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1334. `name` varchar(50) NOT NULL DEFAULT '',
  1335. `plugin_id` int(11) NOT NULL,
  1336. PRIMARY KEY (`id`)
  1337. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统--支付类型';
  1338. # Dump of table ims_yz_pay_withdraw_order
  1339. # ------------------------------------------------------------
  1340. CREATE TABLE IF NOT EXISTS ims_yz_pay_withdraw_order (
  1341. `id` int(11) NOT NULL AUTO_INCREMENT,
  1342. `uniacid` int(11) NOT NULL,
  1343. `member_id` int(11) NOT NULL,
  1344. `int_order_no` varchar(32) DEFAULT NULL,
  1345. `out_order_no` varchar(32) NOT NULL DEFAULT '',
  1346. `trade_no` varchar(255) DEFAULT NULL,
  1347. `price` decimal(14,2) NOT NULL,
  1348. `type` varchar(255) NOT NULL DEFAULT '',
  1349. `status` int(11) NOT NULL,
  1350. `created_at` int(13) NOT NULL DEFAULT '0',
  1351. `updated_at` int(13) NOT NULL DEFAULT '0',
  1352. `deleted_at` int(13) DEFAULT NULL,
  1353. PRIMARY KEY (`id`)
  1354. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='财务--支付提现单';
  1355. # Dump of table ims_yz_permission
  1356. # ------------------------------------------------------------
  1357. CREATE TABLE IF NOT EXISTS ims_yz_permission (
  1358. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1359. `type` tinyint(1) NOT NULL,
  1360. `item_id` int(11) NOT NULL,
  1361. `permission` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  1362. PRIMARY KEY (`id`)
  1363. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1364. # Dump of table ims_yz_users_permission
  1365. # ------------------------------------------------------------
  1366. CREATE TABLE IF NOT EXISTS ims_yz_users_permission (
  1367. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1368. `uniacid` int(10) unsigned NOT NULL,
  1369. `uid` int(10) unsigned NOT NULL,
  1370. `type` varchar(100) NOT NULL,
  1371. `permission` varchar(10000) NOT NULL,
  1372. `url` varchar(255) NOT NULL,
  1373. PRIMARY KEY (`id`)
  1374. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1375. # Dump of table ims_yz_plugin_article
  1376. # ------------------------------------------------------------
  1377. CREATE TABLE IF NOT EXISTS ims_yz_plugin_article (
  1378. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1379. `uniacid` int(11) NOT NULL,
  1380. `category_id` int(11) NOT NULL,
  1381. `title` varchar(255) NOT NULL DEFAULT '',
  1382. `desc` text,
  1383. `thumb` text,
  1384. `content` longtext NOT NULL,
  1385. `virtual_created_at` int(11) DEFAULT NULL,
  1386. `author` varchar(20) NOT NULL DEFAULT '',
  1387. `virtual_read_num` int(11) DEFAULT NULL,
  1388. `read_num` int(11) NOT NULL DEFAULT '0',
  1389. `virtual_like_num` int(11) DEFAULT NULL,
  1390. `like_num` int(11) NOT NULL DEFAULT '0',
  1391. `link` varchar(255) DEFAULT NULL,
  1392. `per_person_per_day` int(11) DEFAULT NULL,
  1393. `total_per_person` int(11) DEFAULT NULL,
  1394. `point` int(11) DEFAULT NULL,
  1395. `credit` int(11) DEFAULT NULL,
  1396. `bonus_total` int(11) DEFAULT NULL,
  1397. `bonus_total_now` int(11) DEFAULT NULL,
  1398. `no_copy_url` tinyint(1) DEFAULT NULL,
  1399. `no_share` tinyint(1) DEFAULT NULL,
  1400. `no_share_to_friend` tinyint(1) DEFAULT NULL,
  1401. `keyword` varchar(255) NOT NULL DEFAULT '',
  1402. `report_enabled` tinyint(1) DEFAULT NULL,
  1403. `advs_type` tinyint(1) DEFAULT NULL,
  1404. `advs_title` varchar(255) DEFAULT NULL,
  1405. `advs_title_footer` varchar(255) DEFAULT NULL,
  1406. `advs_link` varchar(255) DEFAULT NULL,
  1407. `advs` text,
  1408. `state` tinyint(1) DEFAULT NULL,
  1409. `state_wechat` tinyint(1) DEFAULT NULL,
  1410. `created_at` int(11) DEFAULT NULL,
  1411. `updated_at` int(11) DEFAULT NULL,
  1412. PRIMARY KEY (`id`)
  1413. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1414. # Dump of table ims_yz_plugin_article_category
  1415. # ------------------------------------------------------------
  1416. CREATE TABLE IF NOT EXISTS ims_yz_plugin_article_category (
  1417. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1418. `uniacid` int(11) DEFAULT NULL,
  1419. `name` varchar(50) DEFAULT NULL,
  1420. `member_level_limit` int(11) DEFAULT NULL,
  1421. `commission_level_limit` int(11) DEFAULT NULL,
  1422. `created_at` int(11) DEFAULT NULL,
  1423. PRIMARY KEY (`id`)
  1424. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1425. # Dump of table ims_yz_plugin_article_log
  1426. # ------------------------------------------------------------
  1427. CREATE TABLE IF NOT EXISTS ims_yz_plugin_article_log (
  1428. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1429. `article_id` int(11) DEFAULT NULL,
  1430. `read_num` int(11) DEFAULT NULL,
  1431. `like_num` int(11) DEFAULT NULL,
  1432. `uid` int(11) DEFAULT NULL,
  1433. `uniacid` int(11) DEFAULT NULL,
  1434. PRIMARY KEY (`id`)
  1435. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1436. # Dump of table ims_yz_plugin_article_report
  1437. # ------------------------------------------------------------
  1438. CREATE TABLE IF NOT EXISTS ims_yz_plugin_article_report (
  1439. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1440. `uniacid` int(11) DEFAULT NULL,
  1441. `uid` int(11) DEFAULT NULL,
  1442. `article_id` int(11) DEFAULT NULL,
  1443. `type` varchar(255) DEFAULT NULL,
  1444. `desc` varchar(255) DEFAULT NULL,
  1445. PRIMARY KEY (`id`)
  1446. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1447. # Dump of table ims_yz_plugin_article_share
  1448. # ------------------------------------------------------------
  1449. CREATE TABLE IF NOT EXISTS ims_yz_plugin_article_share (
  1450. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1451. `uniacid` int(11) DEFAULT NULL,
  1452. `article_id` int(11) DEFAULT NULL,
  1453. `share_uid` int(11) DEFAULT NULL,
  1454. `click_uid` int(11) DEFAULT NULL,
  1455. `click_time` int(11) DEFAULT NULL,
  1456. `point` int(11) DEFAULT NULL,
  1457. `credit` text,
  1458. PRIMARY KEY (`id`)
  1459. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1460. # Dump of table ims_yz_plugin_goods_assistant
  1461. # ------------------------------------------------------------
  1462. CREATE TABLE IF NOT EXISTS ims_yz_plugin_goods_assistant (
  1463. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1464. `goods_id` int(11) NOT NULL,
  1465. `uniacid` int(11) NOT NULL,
  1466. `itemid` varchar(255) DEFAULT NULL,
  1467. `source` varchar(255) DEFAULT NULL,
  1468. `url` varchar(255) DEFAULT NULL,
  1469. PRIMARY KEY (`id`)
  1470. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1471. # Dump of table ims_yz_point_log
  1472. # ------------------------------------------------------------
  1473. CREATE TABLE IF NOT EXISTS ims_yz_point_log (
  1474. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1475. `uniacid` int(11) NOT NULL DEFAULT '0',
  1476. `member_id` int(11) NOT NULL DEFAULT '0',
  1477. `order_goods_id` int(11) NOT NULL DEFAULT '0',
  1478. `point` decimal(10,2) NOT NULL DEFAULT '0.00',
  1479. `point_income_type` tinyint(2) NOT NULL DEFAULT '0',
  1480. `point_mode` tinyint(5) NOT NULL DEFAULT '0',
  1481. `before_point` decimal(10,2) NOT NULL DEFAULT '0.00',
  1482. `after_point` decimal(10,2) NOT NULL DEFAULT '0.00',
  1483. `remark` varchar(255) NOT NULL DEFAULT '0',
  1484. `order_id` int(11) NOT NULL DEFAULT '0',
  1485. `created_at` int(11) NOT NULL DEFAULT '0',
  1486. `deleted_at` int(11) NOT NULL DEFAULT '0',
  1487. `updated_at` int(11) NOT NULL DEFAULT '0',
  1488. PRIMARY KEY (`id`)
  1489. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='财务--积分明细';
  1490. # Dump of table ims_yz_qq_config
  1491. # ------------------------------------------------------------
  1492. CREATE TABLE IF NOT EXISTS ims_yz_qq_config (
  1493. `config_id` int(11) NOT NULL,
  1494. `uniacid` int(11) NOT NULL DEFAULT '0',
  1495. `app_key` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  1496. `app_secret` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  1497. `type` tinyint(1) NOT NULL DEFAULT '0',
  1498. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  1499. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  1500. `deleted_at` int(11) DEFAULT NULL,
  1501. PRIMARY KEY (`config_id`)
  1502. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1503. # Dump of table ims_yz_resend_express
  1504. # ------------------------------------------------------------
  1505. CREATE TABLE IF NOT EXISTS ims_yz_resend_express (
  1506. `id` int(11) NOT NULL AUTO_INCREMENT,
  1507. `refund_id` int(11) NOT NULL DEFAULT '0',
  1508. `express_company_name` varchar(50) NOT NULL DEFAULT '0',
  1509. `express_sn` varchar(50) NOT NULL DEFAULT '0',
  1510. `express_code` varchar(20) NOT NULL DEFAULT '0',
  1511. `created_at` int(11) NOT NULL DEFAULT '0',
  1512. `updated_at` int(11) NOT NULL DEFAULT '0',
  1513. `deleted_at` int(11) NOT NULL DEFAULT '0',
  1514. PRIMARY KEY (`id`),
  1515. KEY `idx_order_id` (`refund_id`)
  1516. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--售后换货发货快递';
  1517. # Dump of table ims_yz_return_express
  1518. # ------------------------------------------------------------
  1519. CREATE TABLE IF NOT EXISTS ims_yz_return_express (
  1520. `id` int(11) NOT NULL AUTO_INCREMENT,
  1521. `refund_id` int(11) NOT NULL DEFAULT '0',
  1522. `express_company_name` varchar(50) NOT NULL DEFAULT '0',
  1523. `express_sn` varchar(50) NOT NULL DEFAULT '0',
  1524. `express_code` varchar(20) NOT NULL DEFAULT '0',
  1525. `created_at` int(11) NOT NULL DEFAULT '0',
  1526. `updated_at` int(11) NOT NULL DEFAULT '0',
  1527. `deleted_at` int(11) DEFAULT NULL,
  1528. PRIMARY KEY (`id`),
  1529. KEY `idx_order_id` (`refund_id`)
  1530. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单--售后退换货寄回快递';
  1531. # Dump of table ims_yz_role
  1532. # ------------------------------------------------------------
  1533. CREATE TABLE IF NOT EXISTS ims_yz_role (
  1534. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1535. `uniacid` int(11) NOT NULL,
  1536. `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1537. `created_at` int(11) NOT NULL DEFAULT '0',
  1538. `updated_at` int(11) NOT NULL DEFAULT '0',
  1539. `deleted_at` int(11) DEFAULT NULL,
  1540. `status` tinyint(1) NOT NULL DEFAULT '0',
  1541. PRIMARY KEY (`id`)
  1542. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1543. # Dump of table ims_yz_setting
  1544. # ------------------------------------------------------------
  1545. CREATE TABLE IF NOT EXISTS ims_yz_setting (
  1546. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1547. `uniacid` int(11) NOT NULL,
  1548. `group` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'shop',
  1549. `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  1550. `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  1551. `value` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1552. PRIMARY KEY (`id`)
  1553. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统--商城设置表';
  1554. # Dump of table ims_yz_slide
  1555. # ------------------------------------------------------------
  1556. CREATE TABLE IF NOT EXISTS ims_yz_slide (
  1557. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1558. `uniacid` int(11) NOT NULL,
  1559. `slide_name` varchar(100) DEFAULT NULL,
  1560. `link` varchar(255) DEFAULT NULL,
  1561. `thumb` varchar(255) DEFAULT NULL,
  1562. `display_order` int(11) DEFAULT '0',
  1563. `enabled` tinyint(3) DEFAULT NULL,
  1564. `created_at` int(11) DEFAULT NULL,
  1565. `updated_at` int(11) DEFAULT NULL,
  1566. `deleted_at` int(11) DEFAULT NULL,
  1567. PRIMARY KEY (`id`)
  1568. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1569. # Dump of table ims_yz_sms_send_limit
  1570. # ------------------------------------------------------------
  1571. CREATE TABLE IF NOT EXISTS ims_yz_sms_send_limit (
  1572. `sms_id` int(11) NOT NULL AUTO_INCREMENT,
  1573. `uniacid` int(11) NOT NULL,
  1574. `mobile` varchar(11) COLLATE utf8mb4_unicode_ci NOT NULL,
  1575. `total` tinyint(1) NOT NULL,
  1576. `created_at` int(11) NOT NULL DEFAULT '0',
  1577. `updated_at` int(11) NOT NULL DEFAULT '0',
  1578. `deleted_at` int(11) DEFAULT NULL,
  1579. PRIMARY KEY (`sms_id`)
  1580. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1581. # Dump of table ims_yz_street
  1582. # ------------------------------------------------------------
  1583. CREATE TABLE IF NOT EXISTS ims_yz_street (
  1584. `id` int(10) NOT NULL AUTO_INCREMENT,
  1585. `areaname` varchar(255) DEFAULT NULL,
  1586. `parentid` int(10) DEFAULT NULL,
  1587. `level` int(10) DEFAULT NULL,
  1588. PRIMARY KEY (`id`)
  1589. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统--地址街道表';
  1590. # Dump of table ims_yz_template_message
  1591. # ------------------------------------------------------------
  1592. CREATE TABLE IF NOT EXISTS ims_yz_template_message (
  1593. `id` int(11) NOT NULL AUTO_INCREMENT,
  1594. `type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'system',
  1595. `item` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1596. `parent_item` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1597. `title` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1598. `template_id_short` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1599. `template_id` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1600. `content` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  1601. `example` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  1602. `status` tinyint(1) NOT NULL DEFAULT '0',
  1603. PRIMARY KEY (`id`)
  1604. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1605. # Dump of table ims_yz_template_message_record
  1606. # ------------------------------------------------------------
  1607. CREATE TABLE IF NOT EXISTS ims_yz_template_message_record (
  1608. `id` int(11) NOT NULL AUTO_INCREMENT,
  1609. `uniacid` int(11) DEFAULT NULL,
  1610. `member_id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  1611. `openid` char(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1612. `template_id` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  1613. `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1614. `top_color` char(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  1615. `data` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1616. `created_at` int(11) NOT NULL DEFAULT '0',
  1617. `updated_at` int(11) NOT NULL DEFAULT '0',
  1618. `send_time` int(11) NOT NULL DEFAULT '0',
  1619. `status` tinyint(1) NOT NULL DEFAULT '0',
  1620. `msgid` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '',
  1621. `result` tinyint(1) NOT NULL DEFAULT '0',
  1622. `wechat_send_at` int(11) NOT NULL DEFAULT '0',
  1623. `sended_count` tinyint(1) NOT NULL DEFAULT '1',
  1624. `extend_data` text COLLATE utf8mb4_unicode_ci,
  1625. PRIMARY KEY (`id`)
  1626. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1627. # Dump of table ims_yz_user_role
  1628. # ------------------------------------------------------------
  1629. CREATE TABLE IF NOT EXISTS ims_yz_user_role (
  1630. `user_id` int(11) NOT NULL,
  1631. `role_id` int(11) NOT NULL,
  1632. PRIMARY KEY (`user_id`,`role_id`)
  1633. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1634. # Dump of table ims_yz_withdraw
  1635. # ------------------------------------------------------------
  1636. CREATE TABLE IF NOT EXISTS ims_yz_withdraw (
  1637. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1638. `withdraw_sn` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
  1639. `uniacid` int(11) DEFAULT NULL,
  1640. `member_id` int(11) DEFAULT NULL,
  1641. `type` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1642. `type_id` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1643. `type_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  1644. `amounts` decimal(14,2) DEFAULT NULL,
  1645. `poundage` decimal(14,2) DEFAULT NULL,
  1646. `poundage_rate` int(11) DEFAULT NULL,
  1647. `pay_way` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1648. `status` tinyint(1) DEFAULT NULL,
  1649. `created_at` int(11) DEFAULT NULL,
  1650. `audit_at` int(11) DEFAULT NULL,
  1651. `pay_at` int(11) DEFAULT NULL,
  1652. `arrival_at` int(11) DEFAULT NULL,
  1653. `updated_at` int(11) DEFAULT NULL,
  1654. `deleted_at` int(11) DEFAULT NULL,
  1655. `actual_amounts` decimal(14,2) NOT NULL,
  1656. `actual_poundage` decimal(14,2) NOT NULL,
  1657. PRIMARY KEY (`id`)
  1658. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='财务--提现记录';
  1659. ";
  1660. config('app.framework') == 'platform' ? \Illuminate\Support\Facades\DB::unprepared($sql) : pdo_fetchall($sql) ;