rankin.sql 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941
  1. -- MySQL dump 10.13 Distrib 5.7.20, for osx10.12 (x86_64)
  2. --
  3. -- Host: localhost Database: test
  4. -- ------------------------------------------------------
  5. -- Server version 5.7.20
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!40101 SET NAMES utf8 */;
  10. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Table structure for table `p_course`
  18. --
  19. DROP TABLE IF EXISTS `p_course`;
  20. /*!40101 SET @saved_cs_client = @@character_set_client */;
  21. /*!40101 SET character_set_client = utf8 */;
  22. CREATE TABLE `p_course` (
  23. `id` varchar(255) NOT NULL COMMENT '课程id',
  24. `code` varchar(255) NOT NULL COMMENT '课程编码',
  25. `name` varchar(255) DEFAULT NULL COMMENT '名字, 标题加副标题',
  26. `cover_url` varchar(255) DEFAULT NULL COMMENT '封面图路径',
  27. `bg_url` varchar(255) DEFAULT NULL COMMENT '背景图路径',
  28. `cp_id` varchar(255) NOT NULL COMMENT '供应商id',
  29. `detail` varchar(2048) DEFAULT NULL COMMENT '详情介绍',
  30. `digest` varchar(1024) DEFAULT NULL COMMENT '简介',
  31. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  32. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  33. `keyword` varchar(255) DEFAULT NULL COMMENT '关键词',
  34. `status` int(11) DEFAULT 0 COMMENT '状态',
  35. `title` varchar(255) DEFAULT NULL COMMENT '标题',
  36. `type` int(11) NOT NULL DEFAULT 0 COMMENT '课程类型',
  37. `sub_title` varchar(255) DEFAULT NULL COMMENT '副标题',
  38. `breadcrumb` varchar(255) DEFAULT NULL COMMENT '前端导航名',
  39. PRIMARY KEY (`id`),
  40. UNIQUE KEY `UK_pi8eqa7cc3ljn2o65o63x8jac` (`code`),
  41. KEY `IDXpi8eqa7cc3ljn2o65o63x8jac` (`code`),
  42. KEY `IDXcpk52kya5c5ld5hjja8nmdjw` (`name`)
  43. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  44. /*!40101 SET character_set_client = @saved_cs_client */;
  45. --
  46. -- Table structure for table `p_course_sub_relation`
  47. --
  48. DROP TABLE IF EXISTS `p_course_sub_relation`;
  49. /*!40101 SET @saved_cs_client = @@character_set_client */;
  50. /*!40101 SET character_set_client = utf8 */;
  51. CREATE TABLE `p_course_sub_relation` (
  52. `id` varchar(255) NOT NULL COMMENT 'id',
  53. `course_id` varchar(255) NOT NULL COMMENT '课程id',
  54. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  55. `sort` int(11) DEFAULT 0 COMMENT '课的排序字段',
  56. `status` int(11) DEFAULT 0 COMMENT '状态',
  57. `sub_id` varchar(255) NOT NULL COMMENT '子id',
  58. `type` int(11) DEFAULT 1 COMMENT '类型, unit:0, lesson:1',
  59. PRIMARY KEY (`id`),
  60. UNIQUE KEY `UK5v6hhargw48g37vjeeyp66l21` (`course_id`,`sub_id`,`type`),
  61. KEY `IDX7ispnot8j0hq0cqmpp21oycyx` (`course_id`),
  62. KEY `IDXdwn838cc5lcbih2ud2qqkkde2` (`sub_id`)
  63. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  64. /*!40101 SET character_set_client = @saved_cs_client */;
  65. --
  66. -- Table structure for table `p_course_support_relation`
  67. --
  68. DROP TABLE IF EXISTS `p_course_support_relation`;
  69. /*!40101 SET @saved_cs_client = @@character_set_client */;
  70. /*!40101 SET character_set_client = utf8 */;
  71. CREATE TABLE `p_course_support_relation` (
  72. `id` varchar(255) NOT NULL COMMENT 'id',
  73. `course_id` varchar(255) NOT NULL COMMENT '课程id',
  74. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  75. `sort` int(11) DEFAULT 0 COMMENT '配套的顺序',
  76. `status` int(11) DEFAULT 0 COMMENT '状态',
  77. `support_id` varchar(255) NOT NULL COMMENT '配套id',
  78. PRIMARY KEY (`id`),
  79. UNIQUE KEY `UKeffo3iy2i00o22r2bbl860x4v` (`course_id`,`support_id`),
  80. KEY `IDXlpv1435ao6l0gg35ld7y7cikf` (`course_id`),
  81. KEY `IDXhkm8tkk0o4fgyi2vtulbf4cbe` (`support_id`)
  82. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  83. /*!40101 SET character_set_client = @saved_cs_client */;
  84. --
  85. -- Table structure for table `p_courseware`
  86. --
  87. DROP TABLE IF EXISTS `p_courseware`;
  88. /*!40101 SET @saved_cs_client = @@character_set_client */;
  89. /*!40101 SET character_set_client = utf8 */;
  90. CREATE TABLE `p_courseware` (
  91. `id` varchar(255) NOT NULL COMMENT 'id',
  92. `code` varchar(255) NOT NULL COMMENT '课件编码',
  93. `cp_id` varchar(255) DEFAULT NULL COMMENT '提供商id',
  94. `digest` varchar(1024) DEFAULT NULL COMMENT '简介',
  95. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  96. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  97. `title` varchar(255) DEFAULT NULL COMMENT '标题',
  98. `resource_list` varchar(255) DEFAULT NULL COMMENT '资源id数组',
  99. `status` int(11) DEFAULT 0 COMMENT '状态',
  100. `category` varchar(255) DEFAULT NULL COMMENT '环节',
  101. PRIMARY KEY (`id`),
  102. UNIQUE KEY `UK_hjqw4rqtjipshlpujf8w5h2oj` (`code`),
  103. KEY `IDXhjqw4rqtjipshlpujf8w5h2oj` (`code`),
  104. KEY `IDXcgiar2183htpkotrbvak0vqn6` (`title`)
  105. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  106. /*!40101 SET character_set_client = @saved_cs_client */;
  107. --
  108. -- Dumping data for table `p_courseware`
  109. --
  110. --
  111. -- Table structure for table `p_goods`
  112. --
  113. DROP TABLE IF EXISTS `p_goods`;
  114. /*!40101 SET @saved_cs_client = @@character_set_client */;
  115. /*!40101 SET character_set_client = utf8 */;
  116. CREATE TABLE `p_goods` (
  117. `id` varchar(255) NOT NULL COMMENT 'id',
  118. `charge_unit` varchar(255) NOT NULL COMMENT '收费单位',
  119. `cp_price` decimal(19,2) NOT NULL COMMENT '供应商价格',
  120. `duration` int(11) NOT NULL COMMENT '使用时长',
  121. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  122. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  123. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  124. `merchant_price` decimal(19,2) NOT NULL COMMENT '渠道价格',
  125. `pid` varchar(255) NOT NULL COMMENT '产品id',
  126. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
  127. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  128. `terminal_price` decimal(19,2) NOT NULL COMMENT '终端价格',
  129. `type` int(11) NOT NULL COMMENT '商品类型',
  130. `cp_id` varchar(255) DEFAULT NULL COMMENT '供应商id',
  131. `pkg_id` varchar(255) DEFAULT NULL COMMENT '课程包id',
  132. PRIMARY KEY (`id`)
  133. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  134. /*!40101 SET character_set_client = @saved_cs_client */;
  135. --
  136. -- Table structure for table `p_lesson`
  137. --
  138. DROP TABLE IF EXISTS `p_lesson`;
  139. /*!40101 SET @saved_cs_client = @@character_set_client */;
  140. /*!40101 SET character_set_client = utf8 */;
  141. CREATE TABLE `p_lesson` (
  142. `id` varchar(255) NOT NULL COMMENT 'id',
  143. `code` varchar(255) NOT NULL COMMENT '课编码',
  144. `digest` varchar(1024) DEFAULT NULL COMMENT '简介',
  145. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  146. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  147. `title` varchar(255) DEFAULT NULL COMMENT '课标题',
  148. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  149. PRIMARY KEY (`id`),
  150. UNIQUE KEY `UK_posinhfdd523n1lj6q17pa37w` (`code`),
  151. KEY `IDXposinhfdd523n1lj6q17pa37w` (`code`),
  152. KEY `IDX3nv68nb0pb0gdl2sqs9n3wbau` (`title`)
  153. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  154. /*!40101 SET character_set_client = @saved_cs_client */;
  155. --
  156. -- Table structure for table `p_lesson_ware_relation`
  157. --
  158. DROP TABLE IF EXISTS `p_lesson_ware_relation`;
  159. /*!40101 SET @saved_cs_client = @@character_set_client */;
  160. /*!40101 SET character_set_client = utf8 */;
  161. CREATE TABLE `p_lesson_ware_relation` (
  162. `id` varchar(255) NOT NULL COMMENT 'id',
  163. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  164. `lesson_id` varchar(255) NOT NULL COMMENT '课程id',
  165. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '顺序',
  166. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  167. `ware_id` varchar(255) NOT NULL COMMENT '课件id',
  168. PRIMARY KEY (`id`),
  169. UNIQUE KEY `UKpfoxbd3c6oibmwhy5bf69oyk3` (`lesson_id`,`ware_id`),
  170. KEY `IDXhuv1t07rtuv0phdxsu7veuke3` (`lesson_id`),
  171. KEY `IDXs5tld49evn1ik6unrwihxahqe` (`ware_id`)
  172. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  173. /*!40101 SET character_set_client = @saved_cs_client */;
  174. --
  175. -- Table structure for table `p_merchant_product`
  176. --
  177. DROP TABLE IF EXISTS `p_merchant_product`;
  178. /*!40101 SET @saved_cs_client = @@character_set_client */;
  179. /*!40101 SET character_set_client = utf8 */;
  180. CREATE TABLE `p_merchant_product` (
  181. `id` varchar(255) NOT NULL COMMENT 'id',
  182. `code` varchar(255) NOT NULL COMMENT '产品编码',
  183. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  184. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  185. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  186. `name` varchar(255) DEFAULT NULL COMMENT 'title + sub_title',
  187. `pid` varchar(255) NOT NULL COMMENT '产品id',
  188. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序字段',
  189. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  190. `type` int(11) NOT NULL COMMENT '产品类型, 0:课程, 1:周边, 2:课程包',
  191. PRIMARY KEY (`id`),
  192. UNIQUE KEY `UKnrxmjylij0spvxtfaiv199tgv` (`pid`,`merchant_id`)
  193. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  194. /*!40101 SET character_set_client = @saved_cs_client */;
  195. --
  196. -- Table structure for table `p_package`
  197. --
  198. DROP TABLE IF EXISTS `p_package`;
  199. /*!40101 SET @saved_cs_client = @@character_set_client */;
  200. /*!40101 SET character_set_client = utf8 */;
  201. CREATE TABLE `p_package` (
  202. `id` varchar(255) NOT NULL COMMENT 'id',
  203. `code` varchar(255) NOT NULL COMMENT '编码',
  204. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  205. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  206. `name` varchar(255) DEFAULT NULL COMMENT '课程包名',
  207. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序字段',
  208. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  209. PRIMARY KEY (`id`)
  210. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  211. /*!40101 SET character_set_client = @saved_cs_client */;
  212. --
  213. -- Table structure for table `p_package_product_relation`
  214. --
  215. DROP TABLE IF EXISTS `p_package_product_relation`;
  216. /*!40101 SET @saved_cs_client = @@character_set_client */;
  217. /*!40101 SET character_set_client = utf8 */;
  218. CREATE TABLE `p_package_product_relation` (
  219. `id` varchar(255) NOT NULL COMMENT 'id',
  220. `cp_price` decimal(19,2) NOT NULL COMMENT '供应商价格',
  221. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  222. `pid` varchar(255) NOT NULL COMMENT '产品id',
  223. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '产品在课程包中顺序',
  224. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  225. `pkg_id` varchar(255) DEFAULT NULL COMMENT '课程包id',
  226. `merchant_price` decimal(19,2) NOT NULL COMMENT '渠道价格',
  227. PRIMARY KEY (`id`)
  228. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  229. /*!40101 SET character_set_client = @saved_cs_client */;
  230. --
  231. -- Table structure for table `p_product`
  232. --
  233. DROP TABLE IF EXISTS `p_product`;
  234. /*!40101 SET @saved_cs_client = @@character_set_client */;
  235. /*!40101 SET character_set_client = utf8 */;
  236. CREATE TABLE `p_product` (
  237. `id` varchar(255) NOT NULL COMMENT 'id',
  238. `code` varchar(255) NOT NULL COMMENT '产品编码',
  239. `cp_id` varchar(255) NOT NULL COMMENT '供应商id',
  240. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  241. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  242. `name` varchar(255) DEFAULT NULL COMMENT '名字,title + sub_title',
  243. `pid` varchar(255) NOT NULL COMMENT '产品id',
  244. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  245. `type` int(11) NOT NULL COMMENT '0:课程,1:周边,2:课程包',
  246. PRIMARY KEY (`id`),
  247. UNIQUE KEY `UK_a468qaphq6cwrlpmdj9j55aqh` (`pid`)
  248. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  249. /*!40101 SET character_set_client = @saved_cs_client */;
  250. --
  251. -- Table structure for table `p_product_tag_relation`
  252. --
  253. DROP TABLE IF EXISTS `p_product_tag_relation`;
  254. /*!40101 SET @saved_cs_client = @@character_set_client */;
  255. /*!40101 SET character_set_client = utf8 */;
  256. CREATE TABLE `p_product_tag_relation` (
  257. `id` varchar(255) NOT NULL COMMENT 'id',
  258. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  259. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  260. `pid` varchar(255) NOT NULL COMMENT '产品id',
  261. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '产品在标签下的排序',
  262. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  263. `tag_id` varchar(255) NOT NULL COMMENT '标签id',
  264. PRIMARY KEY (`id`),
  265. UNIQUE KEY `UKp6e67xki6xb94pkw5gd7uxksu` (`pid`,`tag_id`),
  266. KEY `IDXffw9iinfe9s57bu4w8vj8mxea` (`pid`),
  267. KEY `IDXagxlckh2sgyuk85s6owad5xf5` (`tag_id`)
  268. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  269. /*!40101 SET character_set_client = @saved_cs_client */;
  270. --
  271. -- Table structure for table `p_recommend`
  272. --
  273. DROP TABLE IF EXISTS `p_recommend`;
  274. /*!40101 SET @saved_cs_client = @@character_set_client */;
  275. /*!40101 SET character_set_client = utf8 */;
  276. CREATE TABLE `p_recommend` (
  277. `id` varchar(255) NOT NULL COMMENT 'id',
  278. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  279. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  280. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  281. `pid` varchar(255) NOT NULL COMMENT '产品id',
  282. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
  283. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  284. `type` int(11) NOT NULL COMMENT '类型,同产品',
  285. PRIMARY KEY (`id`),
  286. UNIQUE KEY `UKbmqbdstfqic8rrrrquywbywdn` (`merchant_id`,`pid`)
  287. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  288. /*!40101 SET character_set_client = @saved_cs_client */;
  289. --
  290. -- Table structure for table `p_support`
  291. --
  292. DROP TABLE IF EXISTS `p_support`;
  293. /*!40101 SET @saved_cs_client = @@character_set_client */;
  294. /*!40101 SET character_set_client = utf8 */;
  295. CREATE TABLE `p_support` (
  296. `id` varchar(255) NOT NULL COMMENT 'id',
  297. `code` varchar(255) NOT NULL COMMENT '编码',
  298. `cp_id` varchar(255) NOT NULL COMMENT '供应商id',
  299. `detail` varchar(2048) DEFAULT NULL COMMENT '周边介绍',
  300. `digest` varchar(2014) DEFAULT NULL COMMENT '简介',
  301. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  302. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  303. `img_list` varchar(255) DEFAULT NULL COMMENT '图片相对路径数组',
  304. `name` varchar(255) DEFAULT NULL COMMENT '检索名字,title+sub_title',
  305. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  306. `title` varchar(255) DEFAULT NULL COMMENT '标题',
  307. `type` int(11) NOT NULL COMMENT '类型为1',
  308. `cover_url` varchar(255) DEFAULT NULL COMMENT '封面图相对路径',
  309. `sub_title` varchar(255) DEFAULT NULL COMMENT '副标题',
  310. PRIMARY KEY (`id`),
  311. UNIQUE KEY `UK_2b6ofi8napjs60pmna6n5fqlj` (`code`),
  312. KEY `IDX2b6ofi8napjs60pmna6n5fqlj` (`code`),
  313. KEY `IDX6vxmfh271xpt5wwqgjpnfxhc` (`name`)
  314. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  315. /*!40101 SET character_set_client = @saved_cs_client */;
  316. --
  317. -- Table structure for table `p_support_reference`
  318. --
  319. DROP TABLE IF EXISTS `p_support_reference`;
  320. /*!40101 SET @saved_cs_client = @@character_set_client */;
  321. /*!40101 SET character_set_client = utf8 */;
  322. CREATE TABLE `p_support_reference` (
  323. `id` varchar(255) NOT NULL COMMENT 'id',
  324. `fid` varchar(255) NOT NULL COMMENT '周边id',
  325. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  326. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
  327. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  328. `tid` varchar(255) NOT NULL COMMENT '关联周边id',
  329. PRIMARY KEY (`id`),
  330. UNIQUE KEY `UKga6v7pykm0vh3fj4c9lc5wn1y` (`fid`,`tid`),
  331. KEY `IDXb0id5ut567lxbn53nj90dv85p` (`fid`),
  332. KEY `IDXh1j8ki07w89hn99sjvtpbirq1` (`tid`)
  333. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  334. /*!40101 SET character_set_client = @saved_cs_client */;
  335. --
  336. -- Table structure for table `p_tag`
  337. --
  338. DROP TABLE IF EXISTS `p_tag`;
  339. /*!40101 SET @saved_cs_client = @@character_set_client */;
  340. /*!40101 SET character_set_client = utf8 */;
  341. CREATE TABLE `p_tag` (
  342. `id` varchar(255) NOT NULL COMMENT 'id',
  343. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  344. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  345. `group_id` varchar(255) NOT NULL COMMENT '标签组id',
  346. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  347. `name` varchar(255) DEFAULT NULL COMMENT '标签名',
  348. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
  349. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  350. PRIMARY KEY (`id`),
  351. UNIQUE KEY `UKetx8sn44o27yojm5d4d0fd93l` (`name`,`group_id`),
  352. KEY `IDXk97bmi9ssbd7u65hmv1dx4udc` (`name`)
  353. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  354. /*!40101 SET character_set_client = @saved_cs_client */;
  355. --
  356. -- Table structure for table `p_tag_group`
  357. --
  358. DROP TABLE IF EXISTS `p_tag_group`;
  359. /*!40101 SET @saved_cs_client = @@character_set_client */;
  360. /*!40101 SET character_set_client = utf8 */;
  361. CREATE TABLE `p_tag_group` (
  362. `id` varchar(255) NOT NULL COMMENT 'id',
  363. `code` varchar(255) NOT NULL COMMENT '编码',
  364. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  365. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  366. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  367. `name` varchar(255) DEFAULT NULL COMMENT '标签组名字',
  368. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
  369. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  370. PRIMARY KEY (`id`),
  371. UNIQUE KEY `UK7qilc06klpv1opxqrk2ufbsoy` (`code`,`merchant_id`),
  372. UNIQUE KEY `UK_ga7ks6s5e8jo0536pd23en7u9` (`code`)
  373. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  374. /*!40101 SET character_set_client = @saved_cs_client */;
  375. --
  376. -- Table structure for table `r_resource`
  377. --
  378. DROP TABLE IF EXISTS `r_resource`;
  379. /*!40101 SET @saved_cs_client = @@character_set_client */;
  380. /*!40101 SET character_set_client = utf8 */;
  381. CREATE TABLE `r_resource` (
  382. `id` varchar(255) NOT NULL COMMENT 'id',
  383. `code` varchar(255) DEFAULT NULL COMMENT '编码',
  384. `format` varchar(255) DEFAULT NULL COMMENT '格式',
  385. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  386. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  387. `name` varchar(255) DEFAULT NULL COMMENT '名字',
  388. `path` varchar(255) DEFAULT NULL COMMENT '相对路径',
  389. `quality` varchar(255) DEFAULT NULL COMMENT '分辨率/码率',
  390. `size` bigint(20) DEFAULT NULL COMMENT '大小',
  391. `status` int(11) DEFAULT NULL COMMENT '状态',
  392. `type` int(11) DEFAULT NULL COMMENT '类型',
  393. PRIMARY KEY (`id`)
  394. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  395. /*!40101 SET character_set_client = @saved_cs_client */;
  396. --
  397. -- Table structure for table `t_order`
  398. --
  399. DROP TABLE IF EXISTS `t_order`;
  400. /*!40101 SET @saved_cs_client = @@character_set_client */;
  401. /*!40101 SET character_set_client = utf8 */;
  402. CREATE TABLE `t_order` (
  403. `id` varchar(255) NOT NULL COMMENT 'id',
  404. `address` varchar(1024) DEFAULT NULL COMMENT '收货地址',
  405. `adjust_price` decimal(19,2) NOT NULL COMMENT '调整价格',
  406. `final_price` decimal(19,2) NOT NULL COMMENT '成交价格',
  407. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  408. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  409. `mobile` varchar(255) NOT NULL COMMENT '收货人手机号',
  410. `name` varchar(255) NOT NULL COMMENT '收货人姓名',
  411. `note` varchar(255) DEFAULT NULL COMMENT '备注',
  412. `origin_price` decimal(19,2) NOT NULL COMMENT '原始价格',
  413. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  414. `uid` varchar(255) NOT NULL COMMENT '终端账号id',
  415. `order_status` int(11) NOT NULL COMMENT '订单状态',
  416. `split_status` int(11) NOT NULL COMMENT '拆分状态',
  417. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  418. `serial_no` varchar(255) NOT NULL COMMENT '订单流水号',
  419. PRIMARY KEY (`id`)
  420. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  421. /*!40101 SET character_set_client = @saved_cs_client */;
  422. --
  423. -- Table structure for table `t_order_detail`
  424. --
  425. DROP TABLE IF EXISTS `t_order_detail`;
  426. /*!40101 SET @saved_cs_client = @@character_set_client */;
  427. /*!40101 SET character_set_client = utf8 */;
  428. CREATE TABLE `t_order_detail` (
  429. `id` varchar(255) NOT NULL COMMENT 'id',
  430. `address` varchar(1024) DEFAULT NULL COMMENT '收货地址',
  431. `adjust_price` decimal(19,2) NOT NULL COMMENT '调整价格',
  432. `final_price` decimal(19,2) NOT NULL COMMENT '成交价格',
  433. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  434. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  435. `mobile` varchar(255) NOT NULL COMMENT '收货人手机号',
  436. `name` varchar(255) NOT NULL COMMENT '收货人姓名',
  437. `note` varchar(255) DEFAULT NULL COMMENT '备注',
  438. `order_id` varchar(255) NOT NULL COMMENT '母订单id',
  439. `origin_price` decimal(19,2) NOT NULL COMMENT '原始价格',
  440. `status` int(11) NOT NULL DEFAULT 0 COMMENT '有效状态',
  441. `track_no` varchar(255) DEFAULT NULL COMMENT '运单号',
  442. `uid` varchar(255) NOT NULL COMMENT '终端账号id',
  443. `cp_id` varchar(255) NOT NULL COMMENT '供应商id',
  444. `order_status` int(11) NOT NULL COMMENT '订单状态',
  445. `type` int(11) NOT NULL COMMENT '订单类型, 实物还是虚拟物品',
  446. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  447. `serial_no` varchar(255) NOT NULL COMMENT '子订单流水号',
  448. PRIMARY KEY (`id`)
  449. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  450. /*!40101 SET character_set_client = @saved_cs_client */;
  451. --
  452. -- Table structure for table `t_order_goods_relation`
  453. --
  454. DROP TABLE IF EXISTS `t_order_goods_relation`;
  455. /*!40101 SET @saved_cs_client = @@character_set_client */;
  456. /*!40101 SET character_set_client = utf8 */;
  457. CREATE TABLE `t_order_goods_relation` (
  458. `id` varchar(255) NOT NULL COMMENT 'id',
  459. `detail_id` varchar(255) DEFAULT NULL COMMENT '子订单id',
  460. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  461. `goods_id` varchar(255) NOT NULL COMMENT '商品id',
  462. `order_id` varchar(255) NOT NULL COMMENT '母订单id',
  463. `pid` varchar(255) NOT NULL COMMENT '产品id',
  464. `quantity` int(11) NOT NULL COMMENT '数量',
  465. `type` int(11) NOT NULL COMMENT '商品类型',
  466. PRIMARY KEY (`id`)
  467. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  468. /*!40101 SET character_set_client = @saved_cs_client */;
  469. --
  470. -- Table structure for table `t_order_product_snapshot`
  471. --
  472. DROP TABLE IF EXISTS `t_order_product_snapshot`;
  473. /*!40101 SET @saved_cs_client = @@character_set_client */;
  474. /*!40101 SET character_set_client = utf8 */;
  475. CREATE TABLE `t_order_product_snapshot` (
  476. `id` varchar(255) NOT NULL COMMENT 'id',
  477. `campus_code` varchar(255) DEFAULT NULL COMMENT '校区编码',
  478. `campus_id` varchar(255) DEFAULT NULL COMMENT '校区id',
  479. `campus_name` varchar(255) DEFAULT NULL COMMENT '校区名称',
  480. `charge_unit` varchar(255) DEFAULT NULL COMMENT '收费单位',
  481. `cp_id` varchar(255) DEFAULT NULL COMMENT '供应商id',
  482. `cp_name` varchar(255) DEFAULT NULL COMMENT '供应商名字',
  483. `cp_price` decimal(19,2) DEFAULT NULL COMMENT '供应商价格',
  484. `duration` int(11) DEFAULT NULL COMMENT '购买时长',
  485. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  486. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  487. `goods_id` varchar(255) DEFAULT NULL COMMENT '商品id',
  488. `merchant_id` varchar(255) DEFAULT NULL COMMENT '渠道id',
  489. `merchant_name` varchar(255) DEFAULT NULL COMMENT '渠道名字',
  490. `merchant_price` decimal(19,2) DEFAULT NULL COMMENT '渠道价格',
  491. `order_id` varchar(255) DEFAULT NULL COMMENT '订单id',
  492. `pid` varchar(255) DEFAULT NULL COMMENT '产品id',
  493. `pkg_id` varchar(255) DEFAULT NULL COMMENT '课程包id',
  494. `product_code` varchar(255) DEFAULT NULL COMMENT '产品编码',
  495. `product_name` varchar(255) DEFAULT NULL COMMENT '产品名字',
  496. `product_type` int(11) DEFAULT NULL COMMENT '产品类型',
  497. `quantity` int(11) DEFAULT NULL COMMENT '购买数量',
  498. `status` int(11) DEFAULT NULL COMMENT '状态',
  499. `terminal_price` decimal(19,2) DEFAULT NULL COMMENT '终端价格',
  500. `uid` varchar(255) DEFAULT NULL COMMENT '终端账号id',
  501. `user_code` varchar(255) DEFAULT NULL COMMENT '终端账号',
  502. `user_name` varchar(255) DEFAULT NULL COMMENT '终端名',
  503. `detail_id` varchar(255) DEFAULT NULL COMMENT '子订单id',
  504. PRIMARY KEY (`id`)
  505. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  506. /*!40101 SET character_set_client = @saved_cs_client */;
  507. --
  508. -- Table structure for table `u_buy_msg`
  509. --
  510. DROP TABLE IF EXISTS `u_buy_msg`;
  511. /*!40101 SET @saved_cs_client = @@character_set_client */;
  512. /*!40101 SET character_set_client = utf8 */;
  513. CREATE TABLE `u_buy_msg` (
  514. `id` varchar(255) NOT NULL COMMENT 'id',
  515. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  516. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  517. `goods_id` varchar(255) NOT NULL COMMENT '商品id',
  518. `pid` varchar(255) NOT NULL COMMENT '产品id',
  519. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  520. `user_id` varchar(255) NOT NULL COMMENT '用户id',
  521. PRIMARY KEY (`id`),
  522. UNIQUE KEY `UKl0id8owrssftub1sba6bfraq9` (`user_id`,`pid`)
  523. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  524. /*!40101 SET character_set_client = @saved_cs_client */;
  525. --
  526. -- Table structure for table `u_campus`
  527. --
  528. DROP TABLE IF EXISTS `u_campus`;
  529. /*!40101 SET @saved_cs_client = @@character_set_client */;
  530. /*!40101 SET character_set_client = utf8 */;
  531. CREATE TABLE `u_campus` (
  532. `id` varchar(255) NOT NULL COMMENT 'id',
  533. `address` varchar(1024) DEFAULT NULL COMMENT '联系人地址',
  534. `bank_account` varchar(255) DEFAULT NULL COMMENT '银行账号',
  535. `city_name` varchar(255) DEFAULT NULL COMMENT '城市名字',
  536. `code` varchar(255) NOT NULL COMMENT '校区编码',
  537. `contact_name` varchar(255) DEFAULT NULL COMMENT '联系人姓名',
  538. `deposit_bank` varchar(255) DEFAULT NULL COMMENT '开户行',
  539. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  540. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  541. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  542. `mobile` varchar(255) NOT NULL COMMENT '联系人电话',
  543. `name` varchar(255) DEFAULT NULL COMMENT '校区全名',
  544. `province_code` varchar(255) NOT NULL COMMENT '省份代码',
  545. `serial_no` int(11) NOT NULL COMMENT '校区流水号',
  546. `zone_name` varchar(255) DEFAULT NULL COMMENT '校区名',
  547. PRIMARY KEY (`id`),
  548. UNIQUE KEY `UK5eckl9gj2gpsxsta62kjxr3d0` (`merchant_id`,`serial_no`,`province_code`)
  549. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  550. /*!40101 SET character_set_client = @saved_cs_client */;
  551. --
  552. -- Table structure for table `u_cms_user`
  553. --
  554. DROP TABLE IF EXISTS `u_cms_user`;
  555. /*!40101 SET @saved_cs_client = @@character_set_client */;
  556. /*!40101 SET character_set_client = utf8 */;
  557. CREATE TABLE `u_cms_user` (
  558. `id` varchar(255) NOT NULL COMMENT 'id',
  559. `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  560. `birthday` datetime DEFAULT NULL COMMENT '生日',
  561. `domain` int(11) NOT NULL COMMENT '平台类型',
  562. `gender` int(11) NOT NULL COMMENT '性别',
  563. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  564. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  565. `is_admin` bit(1) DEFAULT NULL COMMENT '是否管理员',
  566. `mail` varchar(255) DEFAULT NULL COMMENT '邮箱',
  567. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  568. `mobile` varchar(255) DEFAULT NULL COMMENT '手机号',
  569. `name` varchar(255) NOT NULL COMMENT '名字',
  570. `nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
  571. `password` varchar(255) NOT NULL COMMENT '密码',
  572. `qq` varchar(255) DEFAULT NULL COMMENT 'qq',
  573. `status` int(11) DEFAULT NULL COMMENT '状态',
  574. `we_chat` varchar(255) DEFAULT NULL COMMENT '微信号',
  575. PRIMARY KEY (`id`),
  576. UNIQUE KEY `UK_lo3xqm7dqacculpxd2korcbje` (`name`)
  577. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  578. /*!40101 SET character_set_client = @saved_cs_client */;
  579. --
  580. -- Table structure for table `u_collection`
  581. --
  582. DROP TABLE IF EXISTS `u_collection`;
  583. /*!40101 SET @saved_cs_client = @@character_set_client */;
  584. /*!40101 SET character_set_client = utf8 */;
  585. CREATE TABLE `u_collection` (
  586. `id` varchar(255) NOT NULL COMMENT 'id',
  587. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  588. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  589. `pid` varchar(255) NOT NULL COMMENT '产品id',
  590. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  591. `type` int(11) NOT NULL COMMENT '类型',
  592. `user_id` varchar(255) NOT NULL COMMENT '终端账号id',
  593. PRIMARY KEY (`id`),
  594. UNIQUE KEY `UKbhveykgms2jn8wo51hn0yn4wd` (`user_id`,`pid`)
  595. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  596. /*!40101 SET character_set_client = @saved_cs_client */;
  597. --
  598. -- Table structure for table `u_device`
  599. --
  600. DROP TABLE IF EXISTS `u_device`;
  601. /*!40101 SET @saved_cs_client = @@character_set_client */;
  602. /*!40101 SET character_set_client = utf8 */;
  603. CREATE TABLE `u_device` (
  604. `id` varchar(255) NOT NULL COMMENT 'id',
  605. `bind` bit(1) NOT NULL COMMENT '是否绑定账号',
  606. `brand` varchar(255) DEFAULT NULL COMMENT '终端品牌',
  607. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  608. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  609. `ip` varchar(255) DEFAULT NULL COMMENT 'ip',
  610. `model_no` varchar(255) DEFAULT NULL COMMENT '型号',
  611. `status` int(11) DEFAULT NULL COMMENT '状态',
  612. `user_id` varchar(255) NOT NULL COMMENT '用户id',
  613. `device_code` varchar(255) NOT NULL COMMENT '终端唯一标识',
  614. PRIMARY KEY (`id`),
  615. UNIQUE KEY `UK5kl7vnchjhhk2xa6cv0qpb7ah` (`user_id`,`device_code`)
  616. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  617. /*!40101 SET character_set_client = @saved_cs_client */;
  618. --
  619. -- Table structure for table `u_device_bind_log`
  620. --
  621. DROP TABLE IF EXISTS `u_device_bind_log`;
  622. /*!40101 SET @saved_cs_client = @@character_set_client */;
  623. /*!40101 SET character_set_client = utf8 */;
  624. CREATE TABLE `u_device_bind_log` (
  625. `id` varchar(255) NOT NULL COMMENT 'id',
  626. `brand` varchar(255) DEFAULT NULL COMMENT '品牌',
  627. `device_code` varchar(255) DEFAULT NULL COMMENT '终端唯一标识',
  628. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  629. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  630. `ip` varchar(255) DEFAULT NULL COMMENT 'ip',
  631. `model_no` varchar(255) DEFAULT NULL COMMENT '型号',
  632. `status` int(11) DEFAULT NULL COMMENT '状态',
  633. `user_id` varchar(255) DEFAULT NULL COMMENT '终端账号id',
  634. PRIMARY KEY (`id`)
  635. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  636. /*!40101 SET character_set_client = @saved_cs_client */;
  637. --
  638. -- Table structure for table `u_event_log`
  639. --
  640. DROP TABLE IF EXISTS `u_event_log`;
  641. /*!40101 SET @saved_cs_client = @@character_set_client */;
  642. /*!40101 SET character_set_client = utf8 */;
  643. CREATE TABLE `u_event_log` (
  644. `id` varchar(255) NOT NULL COMMENT 'id',
  645. `event_type` int(11) NOT NULL COMMENT '事件类型',
  646. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  647. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  648. `merchant_id` varchar(255) DEFAULT NULL COMMENT '渠道id',
  649. `platform_type` int(11) DEFAULT NULL COMMENT '平台类型',
  650. `status` int(11) DEFAULT NULL COMMENT '状态',
  651. `tar_id` varchar(255) DEFAULT NULL COMMENT '操作对象id',
  652. `tar_name` varchar(255) DEFAULT NULL COMMENT '操作对象名称',
  653. `user_id` varchar(255) DEFAULT NULL COMMENT '用户id',
  654. `value` int(11) DEFAULT NULL COMMENT '事件的值',
  655. PRIMARY KEY (`id`)
  656. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  657. /*!40101 SET character_set_client = @saved_cs_client */;
  658. --
  659. -- Table structure for table `u_ledger`
  660. --
  661. DROP TABLE IF EXISTS `u_ledger`;
  662. /*!40101 SET @saved_cs_client = @@character_set_client */;
  663. /*!40101 SET character_set_client = utf8 */;
  664. CREATE TABLE `u_ledger` (
  665. `id` varchar(255) NOT NULL COMMENT 'id',
  666. `balance_after` decimal(19,2) NOT NULL COMMENT '变动前余额',
  667. `balance_before` decimal(19,2) NOT NULL COMMENT '变动后余额',
  668. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  669. `merchant_id` varchar(255) DEFAULT NULL COMMENT '渠道id',
  670. `note` varchar(255) DEFAULT NULL COMMENT '备注',
  671. `quantity` decimal(19,2) NOT NULL COMMENT '变动数量',
  672. `receipt_id` varchar(255) DEFAULT NULL COMMENT '订单id',
  673. `type` int(11) NOT NULL COMMENT '类型',
  674. PRIMARY KEY (`id`)
  675. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  676. /*!40101 SET character_set_client = @saved_cs_client */;
  677. --
  678. -- Table structure for table `u_merchant`
  679. --
  680. DROP TABLE IF EXISTS `u_merchant`;
  681. /*!40101 SET @saved_cs_client = @@character_set_client */;
  682. /*!40101 SET character_set_client = utf8 */;
  683. CREATE TABLE `u_merchant` (
  684. `id` varchar(255) NOT NULL COMMENT 'id',
  685. `balance` decimal(19,2) NOT NULL COMMENT '余额',
  686. `bank_account` varchar(255) NOT NULL COMMENT '银行账号',
  687. `code` varchar(255) NOT NULL COMMENT '编码',
  688. `deposit_bank` varchar(255) NOT NULL COMMENT '开户行',
  689. `domain` int(11) NOT NULL COMMENT '平台类型',
  690. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  691. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  692. `license_id` varchar(255) DEFAULT NULL COMMENT '营业执照编码',
  693. `name` varchar(255) DEFAULT NULL COMMENT '名字',
  694. `receipt_type` int(11) NOT NULL COMMENT '发票类型',
  695. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  696. `tax_number` varchar(255) DEFAULT NULL COMMENT '纳税人识别号',
  697. `contact_name` varchar(255) DEFAULT NULL COMMENT '联系人',
  698. `mobile` varchar(255) NOT NULL COMMENT '联系电话',
  699. PRIMARY KEY (`id`),
  700. UNIQUE KEY `UK_7rsw4p31nynab5lcqki8pa0wv` (`code`)
  701. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  702. /*!40101 SET character_set_client = @saved_cs_client */;
  703. --
  704. -- Table structure for table `u_operation_log`
  705. --
  706. DROP TABLE IF EXISTS `u_operation_log`;
  707. /*!40101 SET @saved_cs_client = @@character_set_client */;
  708. /*!40101 SET character_set_client = utf8 */;
  709. CREATE TABLE `u_operation_log` (
  710. `id` varchar(255) NOT NULL,
  711. `domain` int(11) DEFAULT NULL,
  712. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  713. `ip` varchar(255) DEFAULT NULL,
  714. `merchant_id` varchar(255) DEFAULT NULL,
  715. `merchant_name` varchar(255) DEFAULT NULL,
  716. `method_name` varchar(255) DEFAULT NULL,
  717. `param_json` varchar(255) DEFAULT NULL,
  718. `request_url` varchar(255) DEFAULT NULL,
  719. `user_id` varchar(255) DEFAULT NULL,
  720. `user_name` varchar(255) DEFAULT NULL,
  721. PRIMARY KEY (`id`)
  722. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  723. /*!40101 SET character_set_client = @saved_cs_client */;
  724. --
  725. -- Table structure for table `u_resource`
  726. --
  727. DROP TABLE IF EXISTS `u_resource`;
  728. /*!40101 SET @saved_cs_client = @@character_set_client */;
  729. /*!40101 SET character_set_client = utf8 */;
  730. CREATE TABLE `u_resource` (
  731. `id` varchar(255) NOT NULL,
  732. `code` varchar(255) DEFAULT NULL,
  733. `name` varchar(255) DEFAULT NULL,
  734. `parent_id` varchar(255) DEFAULT NULL,
  735. `sort` int(11) DEFAULT NULL,
  736. `type` int(11) DEFAULT NULL,
  737. `url` varchar(255) DEFAULT NULL,
  738. PRIMARY KEY (`id`)
  739. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  740. /*!40101 SET character_set_client = @saved_cs_client */;
  741. --
  742. -- Table structure for table `u_role`
  743. --
  744. DROP TABLE IF EXISTS `u_role`;
  745. /*!40101 SET @saved_cs_client = @@character_set_client */;
  746. /*!40101 SET character_set_client = utf8 */;
  747. CREATE TABLE `u_role` (
  748. `id` varchar(255) NOT NULL COMMENT 'id',
  749. `admin` int(11) DEFAULT NULL,
  750. `code` varchar(255) DEFAULT NULL COMMENT '编码',
  751. `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
  752. `name` varchar(255) DEFAULT NULL COMMENT '名字',
  753. `status` int(11) DEFAULT NULL COMMENT '状态',
  754. PRIMARY KEY (`id`)
  755. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  756. /*!40101 SET character_set_client = @saved_cs_client */;
  757. --
  758. -- Table structure for table `u_role_resource_relation`
  759. --
  760. DROP TABLE IF EXISTS `u_role_resource_relation`;
  761. /*!40101 SET @saved_cs_client = @@character_set_client */;
  762. /*!40101 SET character_set_client = utf8 */;
  763. CREATE TABLE `u_role_resource_relation` (
  764. `role_id` varchar(255) NOT NULL COMMENT '角色id',
  765. `resource_id` varchar(255) NOT NULL COMMENT '角色拥有权限资源id',
  766. KEY `FKb42yrc0i7ki8o4imsol4gm940` (`resource_id`),
  767. KEY `FKkfp8ny0jwmalx9kbbuj8o7o6j` (`role_id`),
  768. CONSTRAINT `FKb42yrc0i7ki8o4imsol4gm940` FOREIGN KEY (`resource_id`) REFERENCES `u_resource` (`id`),
  769. CONSTRAINT `FKkfp8ny0jwmalx9kbbuj8o7o6j` FOREIGN KEY (`role_id`) REFERENCES `u_role` (`id`)
  770. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  771. /*!40101 SET character_set_client = @saved_cs_client */;
  772. --
  773. -- Table structure for table `u_shop_cart`
  774. --
  775. DROP TABLE IF EXISTS `u_shop_cart`;
  776. /*!40101 SET @saved_cs_client = @@character_set_client */;
  777. /*!40101 SET character_set_client = utf8 */;
  778. CREATE TABLE `u_shop_cart` (
  779. `id` varchar(255) NOT NULL COMMENT 'id',
  780. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  781. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  782. `goods_id` varchar(255) NOT NULL COMMENT '商品id',
  783. `pid` varchar(255) NOT NULL COMMENT '产品id',
  784. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  785. `user_id` varchar(255) NOT NULL COMMENT '用户id',
  786. PRIMARY KEY (`id`),
  787. UNIQUE KEY `UKrcjvb80k9hdqyv0malfw23br6` (`user_id`,`pid`)
  788. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  789. /*!40101 SET character_set_client = @saved_cs_client */;
  790. --
  791. -- Table structure for table `u_terminal_user`
  792. --
  793. DROP TABLE IF EXISTS `u_terminal_user`;
  794. /*!40101 SET @saved_cs_client = @@character_set_client */;
  795. /*!40101 SET character_set_client = utf8 */;
  796. CREATE TABLE `u_terminal_user` (
  797. `id` varchar(255) NOT NULL COMMENT 'id',
  798. `campus_id` varchar(255) NOT NULL COMMENT '校区id',
  799. `code` varchar(255) NOT NULL COMMENT '编码',
  800. `gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  801. `gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  802. `merchant_id` varchar(255) NOT NULL COMMENT '渠道id',
  803. `name` varchar(255) DEFAULT NULL COMMENT '终端名, 如:教室一',
  804. `password` varchar(255) NOT NULL COMMENT '明文密码, 为了数据中心改密码',
  805. `serial_no` int(11) NOT NULL COMMENT '终端流水号',
  806. `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态',
  807. `uid` varchar(255) NOT NULL COMMENT '用户原始id',
  808. PRIMARY KEY (`id`),
  809. UNIQUE KEY `UK_ew3me2uw5xjfec3u5mhmm577x` (`code`)
  810. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  811. /*!40101 SET character_set_client = @saved_cs_client */;
  812. --
  813. -- Table structure for table `u_user_role`
  814. --
  815. DROP TABLE IF EXISTS `u_user_role`;
  816. /*!40101 SET @saved_cs_client = @@character_set_client */;
  817. /*!40101 SET character_set_client = utf8 */;
  818. CREATE TABLE `u_user_role` (
  819. `id` varchar(255) NOT NULL COMMENT 'id',
  820. `role_id` varchar(255) DEFAULT NULL COMMENT 'role id',
  821. `user_id` varchar(255) DEFAULT NULL COMMENT 'user id',
  822. PRIMARY KEY (`id`)
  823. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  824. /*!40101 SET character_set_client = @saved_cs_client */;
  825. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  826. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  827. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  828. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  829. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  830. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  831. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  832. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  833. -- Dump completed on 2018-03-26 17:20:23