structure.sql 114 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368
  1. SET NAMES utf8;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- ----------------------------
  4. -- Table structure for t_achievements
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `t_achievements`;
  7. CREATE TABLE `t_achievements` (
  8. `achievements_id` int(11) NOT NULL AUTO_INCREMENT,
  9. `total_goal` double(22, 0) NOT NULL,
  10. `no_customer_tag` double(5, 2) NULL DEFAULT 0.00,
  11. `customer_tag` text NULL DEFAULT NULL,
  12. `ctime` datetime(0) NULL DEFAULT NULL,
  13. `utime` datetime(0) NULL DEFAULT NULL,
  14. `dtime` datetime(0) NULL DEFAULT NULL,
  15. PRIMARY KEY (`achievements_id`) USING BTREE
  16. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  17. -- ----------------------------
  18. -- Table structure for t_achievements_group
  19. -- ----------------------------
  20. DROP TABLE IF EXISTS `t_achievements_group`;
  21. CREATE TABLE `t_achievements_group` (
  22. `achievements_group_id` int(11) NOT NULL AUTO_INCREMENT,
  23. `group_total_goal` double(22, 0) NOT NULL,
  24. `achievements_group_title` varchar(20) NOT NULL DEFAULT '',
  25. `achievements_group_users` text NULL DEFAULT NULL,
  26. PRIMARY KEY (`achievements_group_id`) USING BTREE
  27. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  28. -- ----------------------------
  29. -- Table structure for t_affair
  30. -- ----------------------------
  31. DROP TABLE IF EXISTS `t_affair`;
  32. CREATE TABLE `t_affair` (
  33. `affair_id` int(11) NOT NULL AUTO_INCREMENT,
  34. `affair_name` varchar(255) NOT NULL,
  35. `affair_icon` varchar(255) NULL DEFAULT NULL,
  36. `affair_tablename` varchar(255) NULL DEFAULT NULL,
  37. `affair_is_buildin` tinyint(255) NULL DEFAULT NULL,
  38. `affair_group_id` int(11) NULL DEFAULT NULL,
  39. `version` int(11) NULL DEFAULT NULL,
  40. `lock_time` varchar(25) NULL DEFAULT NULL,
  41. `lock_user` int(11) NULL DEFAULT NULL,
  42. PRIMARY KEY (`affair_id`) USING BTREE,
  43. INDEX `affair_group_id`(`affair_group_id`) USING BTREE,
  44. CONSTRAINT `t_affair_ibfk_1` FOREIGN KEY (`affair_group_id`) REFERENCES `t_affair_group` (`affair_group_id`) ON DELETE SET NULL ON UPDATE CASCADE
  45. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  46. -- ----------------------------
  47. -- Table structure for t_affair_bar
  48. -- ----------------------------
  49. DROP TABLE IF EXISTS `t_affair_bar`;
  50. CREATE TABLE `t_affair_bar` (
  51. `bar_id` int(11) NOT NULL AUTO_INCREMENT,
  52. `user_id` int(11) NOT NULL,
  53. `affairIds` text NULL DEFAULT NULL,
  54. `utime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  55. `affair_category` tinyint(1) NULL DEFAULT 0,
  56. PRIMARY KEY (`bar_id`) USING BTREE,
  57. INDEX `user_id`(`user_id`) USING BTREE,
  58. CONSTRAINT `t_affair_bar_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  59. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  60. -- ----------------------------
  61. -- Table structure for t_affair_calculation
  62. -- ----------------------------
  63. DROP TABLE IF EXISTS `t_affair_calculation`;
  64. CREATE TABLE `t_affair_calculation` (
  65. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  66. `affair_id` int(11) NOT NULL,
  67. `calculation_formula` text NULL DEFAULT NULL,
  68. `calculation_formula_title` text NULL DEFAULT NULL,
  69. `calculation_result` varchar(50) NULL DEFAULT '',
  70. `calculation_result_title` varchar(50) NULL DEFAULT '',
  71. `calculation_result_accuracy` tinyint(1) NULL DEFAULT 0,
  72. `all_algebras` text NULL DEFAULT NULL,
  73. `calculation_steps` longtext NULL,
  74. PRIMARY KEY (`calculation_id`) USING BTREE,
  75. INDEX `affair_id`(`affair_id`) USING BTREE,
  76. CONSTRAINT `t_affair_calculation_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE
  77. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  78. -- ----------------------------
  79. -- Table structure for t_affair_frequently
  80. -- ----------------------------
  81. DROP TABLE IF EXISTS `t_affair_frequently`;
  82. CREATE TABLE `t_affair_frequently` (
  83. `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
  84. `user_id` int(11) NOT NULL,
  85. `affair_id` int(11) NOT NULL,
  86. `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  87. PRIMARY KEY (`frequently_id`) USING BTREE,
  88. INDEX `affair_id`(`affair_id`) USING BTREE,
  89. INDEX `user_id`(`user_id`) USING BTREE,
  90. CONSTRAINT `t_affair_frequently_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  91. CONSTRAINT `t_affair_frequently_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  92. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  93. -- ----------------------------
  94. -- Table structure for t_affair_group
  95. -- ----------------------------
  96. DROP TABLE IF EXISTS `t_affair_group`;
  97. CREATE TABLE `t_affair_group` (
  98. `affair_group_id` int(11) NOT NULL AUTO_INCREMENT,
  99. `affair_group_title` varchar(255) NOT NULL,
  100. `affair_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  101. `status` int(11) NULL DEFAULT 99,
  102. `ctime` datetime(0) NULL DEFAULT NULL,
  103. `utime` datetime(0) NULL DEFAULT NULL,
  104. `dtime` datetime(0) NULL DEFAULT NULL,
  105. PRIMARY KEY (`affair_group_id`) USING BTREE
  106. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  107. -- ----------------------------
  108. -- Table structure for t_affair_modify_record
  109. -- ----------------------------
  110. DROP TABLE IF EXISTS `t_affair_modify_record`;
  111. CREATE TABLE `t_affair_modify_record` (
  112. `record_id` int(11) NOT NULL AUTO_INCREMENT,
  113. `data_id` varchar(25) NOT NULL,
  114. `affair_id` int(11) NOT NULL,
  115. `user_id` int(11) NOT NULL,
  116. `record_data` text NOT NULL,
  117. `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  118. `type` tinyint(1) NULL DEFAULT 0,
  119. PRIMARY KEY (`record_id`) USING BTREE,
  120. INDEX `user_id`(`user_id`) USING BTREE,
  121. CONSTRAINT `t_affair_modify_record_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  122. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  123. -- ----------------------------
  124. -- Table structure for t_affair_rule
  125. -- ----------------------------
  126. DROP TABLE IF EXISTS `t_affair_rule`;
  127. CREATE TABLE `t_affair_rule` (
  128. `rule_id` int(11) NOT NULL AUTO_INCREMENT,
  129. `affair_id` int(11) NULL DEFAULT NULL,
  130. `sheet_id` int(11) NULL DEFAULT NULL,
  131. `user_id` int(11) NULL DEFAULT NULL,
  132. `rule_allow_use` tinyint(1) NULL DEFAULT 0,
  133. `rule_allow_view` tinyint(1) NULL DEFAULT 0,
  134. PRIMARY KEY (`rule_id`) USING BTREE,
  135. INDEX `sheet_id`(`sheet_id`) USING BTREE,
  136. CONSTRAINT `t_affair_rule_ibfk_1` FOREIGN KEY (`sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE RESTRICT
  137. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  138. -- ----------------------------
  139. -- Table structure for t_affair_sheet
  140. -- ----------------------------
  141. DROP TABLE IF EXISTS `t_affair_sheet`;
  142. CREATE TABLE `t_affair_sheet` (
  143. `sheet_id` int(11) NOT NULL AUTO_INCREMENT,
  144. `sheet_prev_id` int(11) NULL DEFAULT NULL,
  145. `sheet_next_id` int(11) NULL DEFAULT NULL,
  146. `affair_id` int(11) NOT NULL,
  147. `sheet_name` varchar(255) NOT NULL,
  148. `sheet_tablename` varchar(255) NOT NULL,
  149. `sheet_rule_use_option` tinyint(1) NULL DEFAULT NULL,
  150. `sheet_rule_view_option` tinyint(1) NULL DEFAULT NULL,
  151. `sheet_join_order` tinyint(1) NULL DEFAULT 0,
  152. PRIMARY KEY (`sheet_id`) USING BTREE,
  153. INDEX `affair_id`(`affair_id`) USING BTREE,
  154. CONSTRAINT `t_affair_sheet_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE
  155. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  156. -- ----------------------------
  157. -- Table structure for t_affair_sheet_column
  158. -- ----------------------------
  159. DROP TABLE IF EXISTS `t_affair_sheet_column`;
  160. CREATE TABLE `t_affair_sheet_column` (
  161. `sheet_column_id` int(11) NOT NULL AUTO_INCREMENT,
  162. `sheet_column_pid` int(11) NULL DEFAULT 0,
  163. `column_id` int(11) NULL DEFAULT NULL,
  164. `sheet_id` int(11) NULL DEFAULT NULL,
  165. `sheet_group_id` int(11) NULL DEFAULT NULL,
  166. `column_is_require` tinyint(1) NULL DEFAULT 0,
  167. `column_is_summary` tinyint(1) NULL DEFAULT 0,
  168. `column_order` int(11) NULL DEFAULT 0,
  169. PRIMARY KEY (`sheet_column_id`) USING BTREE,
  170. INDEX `sheet_id`(`sheet_id`) USING BTREE,
  171. INDEX `column_id`(`column_id`) USING BTREE,
  172. CONSTRAINT `t_affair_sheet_column_ibfk_1` FOREIGN KEY (`sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  173. CONSTRAINT `t_affair_sheet_column_ibfk_2` FOREIGN KEY (`column_id`) REFERENCES `t_affair_system_column` (`column_id`) ON DELETE CASCADE ON UPDATE CASCADE
  174. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  175. -- ----------------------------
  176. -- Table structure for t_affair_sheet_column_group
  177. -- ----------------------------
  178. DROP TABLE IF EXISTS `t_affair_sheet_column_group`;
  179. CREATE TABLE `t_affair_sheet_column_group` (
  180. `sheet_group_id` int(11) NOT NULL AUTO_INCREMENT,
  181. `sheet_group_name` varchar(255) NULL DEFAULT NULL,
  182. `sheet_id` int(11) NULL DEFAULT NULL,
  183. PRIMARY KEY (`sheet_group_id`) USING BTREE,
  184. INDEX `sheet_id`(`sheet_id`) USING BTREE,
  185. CONSTRAINT `t_affair_sheet_column_group_ibfk_1` FOREIGN KEY (`sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE RESTRICT
  186. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  187. -- ----------------------------
  188. -- Table structure for t_affair_system_column
  189. -- ----------------------------
  190. DROP TABLE IF EXISTS `t_affair_system_column`;
  191. CREATE TABLE `t_affair_system_column` (
  192. `column_id` int(11) NOT NULL AUTO_INCREMENT,
  193. `column_pid` int(11) NULL DEFAULT 0,
  194. `group_id` int(11) NULL DEFAULT NULL,
  195. `column_order` int(11) NULL DEFAULT NULL,
  196. `column_title` varchar(50) NULL DEFAULT NULL,
  197. `column_name` varchar(50) NULL DEFAULT NULL,
  198. `column_unit` varchar(500) NULL DEFAULT '[]',
  199. `column_type` varchar(255) NULL DEFAULT '',
  200. `column_control` tinyint(1) NULL DEFAULT 0,
  201. `column_rule` varchar(255) NULL DEFAULT NULL,
  202. `column_is_virtual` tinyint(1) NULL DEFAULT 0,
  203. `column_unit_symbiosis` varchar(50) NULL DEFAULT NULL,
  204. `column_detachable` tinyint(1) NULL DEFAULT 0,
  205. `column_branch_calculation` text COLLATE utf8_bin DEFAULT NULL,
  206. `status` tinyint(255) NULL DEFAULT NULL,
  207. PRIMARY KEY (`column_id`) USING BTREE,
  208. INDEX `group_id`(`group_id`) USING BTREE
  209. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  210. -- ----------------------------
  211. -- Table structure for t_affair_system_column_group
  212. -- ----------------------------
  213. DROP TABLE IF EXISTS `t_affair_system_column_group`;
  214. CREATE TABLE `t_affair_system_column_group` (
  215. `group_id` int(11) NOT NULL AUTO_INCREMENT,
  216. `group_name` varchar(255) NULL DEFAULT NULL,
  217. PRIMARY KEY (`group_id`) USING BTREE
  218. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  219. -- ----------------------------
  220. -- Table structure for t_bill
  221. -- ----------------------------
  222. DROP TABLE IF EXISTS `t_bill`;
  223. CREATE TABLE `t_bill` (
  224. `bill_id` int(11) NOT NULL AUTO_INCREMENT,
  225. `bill_name` varchar(255) NULL DEFAULT NULL,
  226. `bill_number_user_defined` varchar(255) NULL,
  227. `bill_title` varchar(255) NULL DEFAULT NULL,
  228. `bill_desc` text NULL DEFAULT NULL,
  229. `bill_count` int(11) NULL DEFAULT 0,
  230. `status` int(2) NULL DEFAULT 99,
  231. `ctime` datetime(0) NULL DEFAULT NULL,
  232. `utime` datetime(0) NULL DEFAULT NULL,
  233. `permission` int(1) NULL DEFAULT 1,
  234. `order_data` text NULL DEFAULT NULL,
  235. `bill_limit` text NULL DEFAULT NULL,
  236. `bill_url` varchar(255) NULL DEFAULT NULL,
  237. `bill_affair_Ids` text NULL DEFAULT NULL,
  238. `bill_type` tinyint(1) NULL DEFAULT 0,
  239. `bill_template` text NULL DEFAULT NULL,
  240. `bill_merge_condition` varchar(255) NULL DEFAULT '',
  241. `bill_set_explain` varchar(255) NULL DEFAULT '0',
  242. `bill_use_template` text NULL,
  243. `permission_view` tinyint(1) NULL DEFAULT 1,
  244. PRIMARY KEY (`bill_id`) USING BTREE
  245. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  246. -- ----------------------------
  247. -- Table structure for t_bill_order
  248. -- ----------------------------
  249. DROP TABLE IF EXISTS `t_bill_order`;
  250. CREATE TABLE `t_bill_order` (
  251. `bill_order_id` int(11) NOT NULL AUTO_INCREMENT,
  252. `bill_id` int(11) NULL DEFAULT NULL,
  253. `user_name` varchar(255) NULL DEFAULT NULL,
  254. `bill_order_number` varchar(255) NULL DEFAULT NULL,
  255. `bill_order_unit` varchar(255) NULL DEFAULT NULL,
  256. `bill_affair_data_Ids` text NULL,
  257. `status` int(2) NULL DEFAULT 99,
  258. `ctime` datetime(0) NULL DEFAULT NULL,
  259. `ptime` datetime(0) NULL DEFAULT NULL,
  260. `bill_data` longtext NULL,
  261. `printer_status` int(1) NULL DEFAULT 0,
  262. `bill_order_supplement` text NULL DEFAULT NULL,
  263. `bill_order_header` varchar(255) NULL,
  264. `bill_explain` varchar(255) NULL DEFAULT NULL,
  265. `bill_object` varchar(13) NULL,
  266. `bill_amount` decimal(18, 3) NULL DEFAULT NULL,
  267. `bill_pnames` text NULL,
  268. `order_first_time` datetime NULL,
  269. `order_last_time` datetime NULL,
  270. `stime` datetime NULL DEFAULT NULL,
  271. `share_user_id` int(11) NULL DEFAULT NULL,
  272. `order_user_id` int(11) NULL DEFAULT NULL,
  273. `create_bill_order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  274. PRIMARY KEY (`bill_order_id`) USING BTREE,
  275. INDEX `bill_id`(`bill_id`) USING BTREE,
  276. INDEX `status`(`status`, `bill_id`) USING BTREE,
  277. INDEX `printer_status`(`printer_status`, `bill_id`) USING BTREE,
  278. CONSTRAINT `t_bill_order_ibfk_1` FOREIGN KEY (`bill_id`) REFERENCES `t_bill` (`bill_id`) ON DELETE CASCADE ON UPDATE CASCADE
  279. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  280. -- ----------------------------
  281. -- Table structure for t_bill_permission
  282. -- ----------------------------
  283. DROP TABLE IF EXISTS `t_bill_permission`;
  284. CREATE TABLE `t_bill_permission` (
  285. `bill_per_id` int(11) NOT NULL AUTO_INCREMENT,
  286. `bill_id` int(11) NOT NULL,
  287. `user_id` int(11) NOT NULL DEFAULT 0,
  288. `allow` tinyint(1) NULL DEFAULT 0,
  289. PRIMARY KEY (`bill_per_id`) USING BTREE,
  290. INDEX `user_id`(`user_id`) USING BTREE,
  291. INDEX `bill_per_id`(`bill_per_id`) USING BTREE,
  292. INDEX `bill_id`(`bill_id`) USING BTREE,
  293. CONSTRAINT `t_bill_permission_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  294. CONSTRAINT `t_bill_permission_ibfk_3` FOREIGN KEY (`bill_id`) REFERENCES `t_bill` (`bill_id`) ON DELETE CASCADE ON UPDATE CASCADE
  295. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  296. -- ----------------------------
  297. -- Table structure for t_bill_subtitle
  298. -- ----------------------------
  299. DROP TABLE IF EXISTS `t_bill_subtitle`;
  300. CREATE TABLE `t_bill_subtitle` (
  301. `bill_subtitle_id` int(11) NOT NULL AUTO_INCREMENT,
  302. `bill_id` int(11) NOT NULL,
  303. `user_ids` text NULL DEFAULT NULL,
  304. `bill_subtitle_name` varchar(20) NULL DEFAULT NULL,
  305. PRIMARY KEY (`bill_subtitle_id`) USING BTREE,
  306. INDEX `bill_id`(`bill_id`) USING BTREE,
  307. CONSTRAINT `t_bill_subtitle_ibfk_2` FOREIGN KEY (`bill_id`) REFERENCES `t_bill` (`bill_id`) ON DELETE CASCADE ON UPDATE CASCADE
  308. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  309. -- ----------------------------
  310. -- Table structure for t_cas_st
  311. -- ----------------------------
  312. DROP TABLE IF EXISTS `t_cas_st`;
  313. CREATE TABLE `t_cas_st` (
  314. `st_id` varchar(23) NOT NULL,
  315. `user_id` int(11) NULL DEFAULT NULL,
  316. `tgt_id` varchar(24) NULL DEFAULT NULL,
  317. `st_service` varchar(255) NULL DEFAULT NULL,
  318. `st_device` varchar(255) NULL DEFAULT NULL,
  319. `deviceId` varchar(255) NULL DEFAULT NULL,
  320. `deviceToken` varchar(255) NULL DEFAULT NULL,
  321. `user_agent` varchar(255) NULL DEFAULT NULL,
  322. `st_ip` varchar(255) NULL DEFAULT NULL,
  323. `st_last_used` datetime(0) NULL DEFAULT NULL,
  324. `st_use_times` int(11) NULL DEFAULT NULL,
  325. `ctime` datetime(0) NULL DEFAULT NULL,
  326. `utime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  327. `dtime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  328. `status` int(11) NULL DEFAULT NULL,
  329. PRIMARY KEY (`st_id`) USING BTREE,
  330. INDEX `tgt_id`(`tgt_id`) USING BTREE,
  331. CONSTRAINT `t_cas_st_ibfk_1` FOREIGN KEY (`tgt_id`) REFERENCES `t_cas_tgt` (`tgt_id`) ON DELETE CASCADE ON UPDATE CASCADE
  332. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  333. -- ----------------------------
  334. -- Table structure for t_cas_tgt
  335. -- ----------------------------
  336. DROP TABLE IF EXISTS `t_cas_tgt`;
  337. CREATE TABLE `t_cas_tgt` (
  338. `tgt_id` varchar(24) NOT NULL,
  339. `user_id` int(11) NULL DEFAULT NULL,
  340. `tgt_last_used` datetime(0) NULL DEFAULT NULL,
  341. `tgt_use_times` int(11) NULL DEFAULT NULL,
  342. `tgt_platform` varchar(255) NULL DEFAULT NULL,
  343. `tgt_kick_step` int(255) NULL DEFAULT NULL,
  344. `ctime` varchar(255) NULL DEFAULT NULL,
  345. PRIMARY KEY (`tgt_id`) USING BTREE
  346. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  347. -- ----------------------------
  348. -- Table structure for t_collection
  349. -- ----------------------------
  350. DROP TABLE IF EXISTS `t_collection`;
  351. CREATE TABLE `t_collection` (
  352. `collection_id` int(11) NOT NULL AUTO_INCREMENT,
  353. `user_id` int(11) NULL DEFAULT NULL,
  354. `company_id` int(11) NOT NULL,
  355. `image_id` int(11) NULL DEFAULT NULL,
  356. `product_id` int(11) NULL DEFAULT NULL,
  357. `collection_image_id` int(11) NULL DEFAULT NULL,
  358. `collection_image` varchar(255) NULL DEFAULT NULL,
  359. `collection_pname` varchar(255) NOT NULL,
  360. `collection_cname` varchar(255) NOT NULL,
  361. `collection_type` tinyint(2) NOT NULL DEFAULT 0,
  362. `collection_state` tinyint(2) NULL DEFAULT 0,
  363. `collection_price` varchar(255) NULL DEFAULT NULL,
  364. `collection_price_unit` varchar(255) NULL DEFAULT NULL,
  365. `collection_inventory` decimal(13, 3) NULL DEFAULT NULL,
  366. `collection_inventory_unit` varchar(255) NULL DEFAULT NULL,
  367. `collection_width` decimal(13, 2) NULL DEFAULT NULL,
  368. `collection_width_unit` varchar(255) NULL DEFAULT NULL,
  369. `collection_height` decimal(13, 2) NULL DEFAULT NULL,
  370. `collection_height_unit` varchar(255) NULL DEFAULT NULL,
  371. `collection_freeheight` decimal(13, 2) NULL DEFAULT NULL,
  372. `collection_freeheight_unit` varchar(255) NULL DEFAULT NULL,
  373. `collection_weight` varchar(255) NULL DEFAULT NULL,
  374. `collection_weight_unit` varchar(255) NULL DEFAULT '',
  375. `collection_elasticity` varchar(255) NULL DEFAULT '',
  376. `collection_mtype` varchar(255) NULL DEFAULT NULL,
  377. `collection_material` varchar(255) NULL DEFAULT NULL,
  378. `collection_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  379. `collection_gram_weight` decimal(13,2) NULL DEFAULT NULL,
  380. `collection_gram_weight_unit` varchar(255) NULL DEFAULT 'g/m2',
  381. `collection_tag_ids` text NULL DEFAULT NULL,
  382. `product_cloth_price_unit` varchar(255) NULL DEFAULT '',
  383. `product_product_price_unit` varchar(255) NULL DEFAULT '',
  384. `product_cloth_price` decimal(13, 2) NULL DEFAULT NULL,
  385. `product_product_price` decimal(13, 2) NULL DEFAULT NULL,
  386. `push_result` longtext NULL,
  387. `recv_result` longtext NULL,
  388. `search_id` int(11) NULL,
  389. `search_status` int(11) NULL,
  390. `ctime` datetime(0) NOT NULL,
  391. `utime` datetime(0) NULL DEFAULT NULL,
  392. `dtime` datetime(0) NULL DEFAULT NULL,
  393. `status` tinyint(2) NOT NULL DEFAULT 99,
  394. PRIMARY KEY (`collection_id`) USING BTREE,
  395. INDEX `image_id`(`image_id`) USING BTREE,
  396. INDEX `user_id`(`user_id`) USING BTREE,
  397. INDEX `company_id`(`company_id`) USING BTREE,
  398. FULLTEXT INDEX `collection_pname`(`collection_pname`),
  399. FULLTEXT INDEX `collection_cname`(`collection_cname`),
  400. CONSTRAINT `t_collection_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  401. CONSTRAINT `t_collection_ibfk_3` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE
  402. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  403. -- ----------------------------
  404. -- Table structure for t_company
  405. -- ----------------------------
  406. DROP TABLE IF EXISTS `t_company`;
  407. CREATE TABLE `t_company` (
  408. `company_id` int(11) NOT NULL AUTO_INCREMENT,
  409. `location_id` int(11) NULL DEFAULT NULL,
  410. `company_type` tinyint(1) NULL DEFAULT 0,
  411. `company_name` varchar(50) NOT NULL,
  412. `company_shortname` varchar(10) NULL DEFAULT NULL,
  413. `company_major` varchar(255) NULL DEFAULT NULL,
  414. `company_urlname` varchar(10) NULL DEFAULT NULL,
  415. `company_cert` varchar(255) NULL DEFAULT NULL,
  416. `company_tel` varchar(255) NULL DEFAULT NULL,
  417. `company_fax` varchar(255) NULL DEFAULT NULL,
  418. `company_qq` varchar(255) NULL DEFAULT '',
  419. `company_email` varchar(255) NULL DEFAULT NULL,
  420. `company_ctime` date NULL DEFAULT NULL,
  421. `company_addr` varchar(255) NULL DEFAULT NULL,
  422. `company_corporation` varchar(255) NULL DEFAULT NULL,
  423. `company_copy` varchar(255) NULL DEFAULT NULL,
  424. `company_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  425. `viewtimes` int(11) NULL DEFAULT 0,
  426. `company_follows` int(255) NULL DEFAULT 0,
  427. `is_vip` tinyint(1) NULL DEFAULT 0,
  428. `status` int(255) NULL DEFAULT 0,
  429. `ctime` datetime(0) NOT NULL,
  430. `utime` datetime(0) NULL DEFAULT NULL,
  431. `dtime` datetime(0) NULL DEFAULT NULL,
  432. `tagIds` text NULL DEFAULT NULL,
  433. `customerGroupId` int(11) NULL DEFAULT 0,
  434. `company_program` varchar(100) NULL DEFAULT '',
  435. `version` int(11) NULL DEFAULT NULL,
  436. `company_phone` varchar(255) NULL,
  437. PRIMARY KEY (`company_id`) USING BTREE,
  438. INDEX `location_id`(`location_id`) USING BTREE,
  439. INDEX `customerGroupId`(`customerGroupId`) USING BTREE,
  440. INDEX `company_name`(`company_name`) USING BTREE,
  441. INDEX `company_shortname`(`company_shortname`) USING BTREE,
  442. INDEX `company_urlname`(`company_urlname`) USING BTREE,
  443. CONSTRAINT `FK_Reference_29` FOREIGN KEY (`location_id`) REFERENCES `t_location` (`location_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  444. CONSTRAINT `t_company_ibfk_1` FOREIGN KEY (`customerGroupId`) REFERENCES `t_customer_group` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
  445. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  446. -- ----------------------------
  447. -- Table structure for t_customer
  448. -- ----------------------------
  449. DROP TABLE IF EXISTS `t_customer`;
  450. CREATE TABLE `t_customer` (
  451. `id` int(11) NOT NULL AUTO_INCREMENT,
  452. `companyId` int(11) NOT NULL DEFAULT 0,
  453. `addUserId` int(11) NOT NULL,
  454. `customerCompanyId` int(11) NULL DEFAULT NULL,
  455. `avatarImageId` int(11) NULL DEFAULT NULL,
  456. `avatarImage` varchar(255) NULL DEFAULT NULL,
  457. `customer_name` varchar(255) NULL DEFAULT NULL,
  458. `customer_phone` varchar(255) NULL DEFAULT NULL,
  459. `customer_qq` varchar(255) NULL DEFAULT NULL,
  460. `customer_email` varchar(255) NULL DEFAULT NULL,
  461. `customer_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  462. `tagIds` text NULL DEFAULT NULL,
  463. `visitUserIds` text NULL DEFAULT NULL,
  464. `state` int(11) NULL DEFAULT 0,
  465. `status` int(11) NULL DEFAULT 99,
  466. `createAt` datetime(0) NULL DEFAULT NULL,
  467. `updateAt` datetime(0) NULL DEFAULT NULL,
  468. `deleteAt` datetime(0) NULL DEFAULT NULL,
  469. `groupId` int(11) NULL DEFAULT NULL,
  470. `card1ImageId` int(11) NULL DEFAULT NULL,
  471. `card2ImageId` int(11) NULL DEFAULT NULL,
  472. `card3ImageId` int(11) NULL DEFAULT NULL,
  473. `representative` tinyint(1) NULL DEFAULT 0,
  474. `customer_add` text NULL DEFAULT NULL,
  475. `customer_phone2` varchar(255) NULL DEFAULT '',
  476. `customer_phone3` varchar(255) NULL DEFAULT '',
  477. PRIMARY KEY (`id`) USING BTREE,
  478. INDEX `companyId`(`companyId`) USING BTREE,
  479. INDEX `customerCompanyId`(`customerCompanyId`) USING BTREE,
  480. INDEX `id`(`id`, `customerCompanyId`) USING BTREE,
  481. INDEX `groupId`(`groupId`) USING BTREE,
  482. CONSTRAINT `t_customer_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  483. CONSTRAINT `t_customer_ibfk_2` FOREIGN KEY (`customerCompanyId`) REFERENCES `t_company` (`company_id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  484. CONSTRAINT `t_customer_ibfk_3` FOREIGN KEY (`groupId`) REFERENCES `t_customer_group` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
  485. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  486. -- ----------------------------
  487. -- Table structure for t_customer_group
  488. -- ----------------------------
  489. DROP TABLE IF EXISTS `t_customer_group`;
  490. CREATE TABLE `t_customer_group` (
  491. `id` int(11) NOT NULL AUTO_INCREMENT,
  492. `companyId` int(11) NOT NULL,
  493. `userId` int(11) NOT NULL,
  494. `title` varchar(255) NOT NULL,
  495. `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  496. `usedCount` int(11) NULL DEFAULT 0,
  497. `status` int(11) NULL DEFAULT 99,
  498. `createAt` datetime(0) NULL DEFAULT NULL,
  499. `updateAt` datetime(0) NULL DEFAULT NULL,
  500. `deleteAt` datetime(0) NULL DEFAULT NULL,
  501. `permission` tinyint(1) NULL DEFAULT 1,
  502. `user_ids` text NULL,
  503. `customer_category_id` int(11) NULL DEFAULT NULL,
  504. PRIMARY KEY (`id`) USING BTREE,
  505. INDEX `companyId`(`companyId`) USING BTREE,
  506. INDEX `userId`(`userId`) USING BTREE,
  507. CONSTRAINT `t_customer_group_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  508. CONSTRAINT `t_customer_group_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  509. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  510. -- ----------------------------
  511. -- Table structure for t_customer_group
  512. -- ----------------------------
  513. DROP TABLE IF EXISTS `t_customer_category`;
  514. CREATE TABLE IF NOT EXISTS `t_customer_category` (
  515. `customer_category_id` int(11) NOT NULL AUTO_INCREMENT,
  516. `companyId` int(11) NOT NULL,
  517. `userId` int(11) NOT NULL,
  518. `customer_category_title` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  519. `customer_category_notes` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
  520. `usedCount` int(11) DEFAULT 0,
  521. `status` int(11) DEFAULT 99,
  522. `createAt` datetime DEFAULT NULL,
  523. `updateAt` datetime DEFAULT NULL,
  524. `deleteAt` datetime DEFAULT NULL,
  525. `permission` tinyint(1) DEFAULT 1,
  526. `user_ids` text CHARACTER SET utf8mb4 DEFAULT NULL,
  527. PRIMARY KEY (`customer_category_id`) USING BTREE,
  528. KEY `companyId` (`companyId`) USING BTREE,
  529. KEY `userId` (`userId`) USING BTREE,
  530. CONSTRAINT `t_customer_category_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  531. CONSTRAINT `t_customer_category_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  532. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  533. -- ----------------------------
  534. -- Table structure for t_department
  535. -- ----------------------------
  536. DROP TABLE IF EXISTS `t_department`;
  537. CREATE TABLE `t_department` (
  538. `department_id` int(255) NOT NULL AUTO_INCREMENT,
  539. `department_name` varchar(255) NULL DEFAULT '',
  540. `department_pid` int(255) NULL DEFAULT 0,
  541. PRIMARY KEY (`department_id`) USING BTREE
  542. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  543. -- ----------------------------
  544. -- Table structure for t_documentary
  545. -- ----------------------------
  546. DROP TABLE IF EXISTS `t_documentary`;
  547. CREATE TABLE `t_documentary` (
  548. `documentary_id` int(11) NOT NULL AUTO_INCREMENT,
  549. `documentary_number` varchar(50) NOT NULL DEFAULT '',
  550. `documentary_number_pid` varchar(50) NULL DEFAULT '',
  551. `documentary_product_id` int(11) NULL DEFAULT NULL,
  552. `documentary_object` varchar(13) NOT NULL DEFAULT '',
  553. `documentary_summary` varchar(50) NULL DEFAULT NULL,
  554. `documentary_state` tinyint(1) NULL DEFAULT 0,
  555. `data_id` varchar(25) NULL DEFAULT '',
  556. `companyId` int(11) NULL DEFAULT NULL,
  557. `user_id` int(11) NULL DEFAULT NULL,
  558. `ctime` datetime(0) NULL DEFAULT NULL,
  559. `utime` datetime(0) NULL DEFAULT NULL,
  560. `status` tinyint(2) NULL DEFAULT 99,
  561. PRIMARY KEY (`documentary_id`) USING BTREE,
  562. UNIQUE INDEX `documentary_number_pid` (`documentary_number_pid`, `documentary_number`) USING BTREE
  563. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  564. -- ----------------------------
  565. -- Table structure for t_documentary_report
  566. -- ----------------------------
  567. DROP TABLE IF EXISTS `t_documentary_report`;
  568. CREATE TABLE `t_documentary_report` (
  569. `report_id` int(11) NOT NULL AUTO_INCREMENT,
  570. `documentary_data_id` varchar(50) NOT NULL,
  571. `reply_user_id` int(11) NULL DEFAULT NULL,
  572. `reply_txt` varchar(255) NULL DEFAULT NULL,
  573. `reply_image` varchar(255) NULL DEFAULT NULL,
  574. `reply_voice` varchar(255) NULL DEFAULT NULL,
  575. `reply_time` datetime(0) NULL DEFAULT NULL,
  576. PRIMARY KEY (`report_id`) USING BTREE
  577. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  578. -- ----------------------------
  579. -- Table structure for t_file_list
  580. -- ----------------------------
  581. DROP TABLE IF EXISTS `t_file_list`;
  582. CREATE TABLE `t_file_list` (
  583. `id` int(11) NOT NULL AUTO_INCREMENT,
  584. `pid` int(11) NULL DEFAULT NULL,
  585. `name` varchar(255) NULL DEFAULT NULL,
  586. `md5` varchar(255) NULL DEFAULT NULL,
  587. `crop` varchar(255) NULL DEFAULT NULL,
  588. `url` varchar(255) NULL DEFAULT NULL,
  589. `category` int(255) NULL DEFAULT NULL,
  590. `props` varchar(255) NULL DEFAULT NULL,
  591. `mime` varchar(255) NULL DEFAULT NULL,
  592. `extension` varchar(255) NULL DEFAULT NULL,
  593. `size` int(11) NULL DEFAULT NULL,
  594. `type` int(255) NULL DEFAULT NULL,
  595. `icat` int(255) NULL DEFAULT NULL,
  596. `icatmp` int(255) NULL DEFAULT NULL,
  597. `visitimes` int(11) NULL DEFAULT NULL,
  598. `ctime` datetime(0) NULL DEFAULT NULL,
  599. `utime` datetime(0) NULL DEFAULT NULL,
  600. `dtime` datetime(0) NULL DEFAULT NULL,
  601. `status` int(255) NULL DEFAULT NULL,
  602. `user_id` int(11) NULL DEFAULT NULL,
  603. `template_number` varchar(50) NULL DEFAULT '',
  604. PRIMARY KEY (`id`) USING BTREE,
  605. UNIQUE INDEX `md5`(`md5`, `type`, `category`) USING BTREE
  606. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  607. -- ----------------------------
  608. -- Table structure for t_group_position
  609. -- ----------------------------
  610. DROP TABLE IF EXISTS `t_group_position`;
  611. CREATE TABLE `t_group_position` (
  612. `position_id` int(11) NOT NULL AUTO_INCREMENT,
  613. `user_id` int(11) NOT NULL,
  614. `groupIds` text NULL DEFAULT NULL,
  615. `utime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  616. `position_type` tinyint(1) NULL DEFAULT 0,
  617. PRIMARY KEY (`position_id`) USING BTREE,
  618. INDEX `user_id` (`user_id`, `position_type`) USING BTREE,
  619. CONSTRAINT `t_group_position_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  620. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  621. -- ----------------------------
  622. -- Table structure for t_inventory
  623. -- ----------------------------
  624. DROP TABLE IF EXISTS `t_inventory`;
  625. CREATE TABLE `t_inventory` (
  626. `inventory_id` int(11) NOT NULL AUTO_INCREMENT,
  627. `warehouse_product_id` int(11) NULL DEFAULT NULL,
  628. `warehouse_product_color` varchar(255) NULL DEFAULT '',
  629. `warehouse_product_color_number` varchar(255) NULL DEFAULT '',
  630. `warehouse_product_height` double(22, 2) NULL DEFAULT NULL,
  631. `warehouse_product_width` double(22, 2) NULL DEFAULT NULL,
  632. `warehouse_material_composition` varchar(255) NULL DEFAULT '',
  633. `warehouse_machine_id` int(11) NULL DEFAULT NULL,
  634. `warehouse_storage_area` varchar(255) NULL DEFAULT '',
  635. `inventory_quantity_unit` int(1) NULL DEFAULT 0,
  636. `warehouse_other_description` varchar(255) NULL DEFAULT '',
  637. `status` int(2) NULL DEFAULT 99,
  638. `ctime` datetime(0) NULL DEFAULT NULL,
  639. `utime` datetime(0) NULL DEFAULT NULL,
  640. `inventory_price_unit` tinyint(1) NULL,
  641. `warehouse_collection_id` int(11) NULL DEFAULT NULL,
  642. PRIMARY KEY (`inventory_id`) USING BTREE,
  643. INDEX `warehouse_product_id`(`warehouse_product_id`) USING BTREE,
  644. INDEX `warehouse_machine_id`(`warehouse_machine_id`) USING BTREE,
  645. CONSTRAINT `t_inventory_ibfk_1` FOREIGN KEY (`warehouse_product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  646. CONSTRAINT `t_inventory_ibfk_2` FOREIGN KEY (`warehouse_machine_id`) REFERENCES `t_machine` (`machine_id`) ON DELETE CASCADE ON UPDATE CASCADE
  647. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  648. -- ----------------------------
  649. -- Table structure for t_inventory_calculation
  650. -- ----------------------------
  651. DROP TABLE IF EXISTS `t_inventory_calculation`;
  652. CREATE TABLE `t_inventory_calculation` (
  653. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  654. `data_id` varchar(25) NOT NULL,
  655. `affair_id` int(11) NOT NULL,
  656. `tagIds` varchar(100) NOT NULL,
  657. `calculation_key` int(11) NOT NULL,
  658. `calculation_time` datetime(0) NOT NULL,
  659. `calculation_value` decimal(22, 6) NOT NULL,
  660. `calculation_value2` decimal(22, 6) NOT NULL,
  661. `calculation_condition` varchar(120) NOT NULL,
  662. `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  663. `call_time` datetime(0) NOT NULL,
  664. `from_affair_id` int(11) NOT NULL,
  665. `self_built_source` varchar(255) NOT NULL,
  666. `tag_numbers` tinyint(1) NULL DEFAULT 0,
  667. `from_data_id` varchar(25) NULL DEFAULT '',
  668. `offer_price` decimal(22,6) NULL DEFAULT -1,
  669. `offer_product_total_cost` decimal(22,6) NULL,
  670. `calculation_ctime` datetime NULL DEFAULT NULL,
  671. PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
  672. INDEX `call_time`(`call_time`) USING BTREE,
  673. UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
  674. INDEX `calculation_value`(`calculation_key`, `calculation_time`, `calculation_value`, `calculation_value2`, `calculation_condition`, `tagIds`) USING BTREE
  675. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  676. -- ----------------------------
  677. -- Table structure for t_inventory_record
  678. -- ----------------------------
  679. DROP TABLE IF EXISTS `t_inventory_record`;
  680. CREATE TABLE `t_inventory_record` (
  681. `inventory_record_id` int(11) NOT NULL AUTO_INCREMENT,
  682. `inventory_id` int(11) NOT NULL,
  683. `record_time` datetime(0) NOT NULL,
  684. `inventory_quantity` double(22, 2) NOT NULL,
  685. `inventory_quantity_reserve` double(22, 2) NULL DEFAULT 0.00,
  686. `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  687. `status` int(2) NULL DEFAULT 99,
  688. `ctime` datetime(0) NULL DEFAULT NULL,
  689. `utime` datetime(0) NULL DEFAULT NULL,
  690. `user_id` int(11) NULL,
  691. PRIMARY KEY (`inventory_record_id`) USING BTREE,
  692. INDEX `inventory_id`(`inventory_id`) USING BTREE,
  693. CONSTRAINT `t_inventory_record_ibfk_1` FOREIGN KEY (`inventory_id`) REFERENCES `t_inventory` (`inventory_id`) ON DELETE CASCADE ON UPDATE CASCADE
  694. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  695. -- ----------------------------
  696. -- Table structure for t_keyword_log
  697. -- ----------------------------
  698. DROP TABLE IF EXISTS `t_keyword_log`;
  699. CREATE TABLE `t_keyword_log` (
  700. `keyword_id` int(11) NOT NULL AUTO_INCREMENT,
  701. `user_id` int(11) NULL DEFAULT NULL,
  702. `company_id` int(11) NULL DEFAULT NULL,
  703. `keyword_category` int(11) NULL DEFAULT NULL,
  704. `keyword_text` varchar(255) NULL DEFAULT NULL,
  705. `keyword_values` text NULL DEFAULT NULL,
  706. `status` int(11) NULL DEFAULT 99,
  707. `ctime` datetime(0) NULL DEFAULT NULL,
  708. `dtime` datetime(0) NULL DEFAULT NULL,
  709. PRIMARY KEY (`keyword_id`) USING BTREE,
  710. INDEX `user_id`(`user_id`) USING BTREE,
  711. INDEX `company_id`(`company_id`) USING BTREE,
  712. CONSTRAINT `t_keyword_log_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  713. CONSTRAINT `t_keyword_log_ibfk_2` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE
  714. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  715. -- ----------------------------
  716. -- Table structure for t_location
  717. -- ----------------------------
  718. DROP TABLE IF EXISTS `t_location`;
  719. CREATE TABLE `t_location` (
  720. `location_id` int(11) NOT NULL AUTO_INCREMENT,
  721. `location_pid` int(11) NULL DEFAULT NULL,
  722. `location_name` varchar(40) NOT NULL,
  723. `location_postnum` varchar(6) NULL DEFAULT NULL,
  724. `location_level` tinyint(1) NULL DEFAULT NULL,
  725. `location_phonenum` varchar(5) NULL DEFAULT NULL,
  726. PRIMARY KEY (`location_id`) USING BTREE,
  727. INDEX `location_pid`(`location_pid`) USING BTREE,
  728. CONSTRAINT `FK_Reference_28` FOREIGN KEY (`location_pid`) REFERENCES `t_location` (`location_id`) ON DELETE SET NULL ON UPDATE CASCADE
  729. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  730. -- ----------------------------
  731. -- Table structure for t_log_edit
  732. -- ----------------------------
  733. DROP TABLE IF EXISTS `t_log_edit`;
  734. CREATE TABLE `t_log_edit` (
  735. `log_edit_id` int(11) NOT NULL AUTO_INCREMENT,
  736. `log_company_id` int(11) NULL DEFAULT NULL,
  737. `log_user_id` int(11) NULL DEFAULT NULL,
  738. `log_edit_clazz` varchar(255) NULL DEFAULT NULL,
  739. `log_edit_oldvalue` longtext NULL,
  740. `log_edit_newvalue` longtext NULL,
  741. `log_action` tinyint(1) NULL DEFAULT NULL,
  742. `ctime` datetime(0) NULL DEFAULT NULL,
  743. PRIMARY KEY (`log_edit_id`) USING BTREE
  744. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  745. -- ----------------------------
  746. -- Table structure for t_machine
  747. -- ----------------------------
  748. DROP TABLE IF EXISTS `t_machine`;
  749. CREATE TABLE `t_machine` (
  750. `machine_id` int(11) NOT NULL AUTO_INCREMENT,
  751. `machine_number` varchar(255) NOT NULL,
  752. `machine_horse` int(11) NULL DEFAULT 0,
  753. `machine_des` varchar(255) NULL DEFAULT NULL,
  754. `machine_state` int(2) NOT NULL DEFAULT 0,
  755. `affair_data_id` varchar(25) NULL DEFAULT NULL,
  756. `pause_affair_data_id` varchar(25) NULL DEFAULT '',
  757. `model_name` varchar(255) NOT NULL,
  758. `status` int(2) NOT NULL DEFAULT 99,
  759. `ctime` datetime(0) NOT NULL,
  760. `utime` datetime(0) NULL DEFAULT NULL,
  761. `dtime` datetime(0) NULL DEFAULT NULL,
  762. PRIMARY KEY (`machine_id`) USING BTREE,
  763. INDEX `machine_id`(`machine_id`) USING BTREE,
  764. INDEX `model_name`(`model_name`) USING BTREE,
  765. CONSTRAINT `t_machine_ibfk_1` FOREIGN KEY (`model_name`) REFERENCES `t_machine_model` (`model_name`) ON DELETE CASCADE ON UPDATE CASCADE
  766. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  767. -- ----------------------------
  768. -- Table structure for t_machine_model
  769. -- ----------------------------
  770. DROP TABLE IF EXISTS `t_machine_model`;
  771. CREATE TABLE `t_machine_model` (
  772. `model_id` int(11) NOT NULL AUTO_INCREMENT,
  773. `model_name` varchar(255) NOT NULL,
  774. `model_des` text NULL DEFAULT NULL,
  775. `status` int(11) NULL DEFAULT 99,
  776. `ctime` datetime(0) NOT NULL,
  777. `utime` datetime(0) NULL DEFAULT NULL,
  778. PRIMARY KEY (`model_id`) USING BTREE,
  779. INDEX `model_name`(`model_name`) USING BTREE
  780. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  781. -- ----------------------------
  782. -- Table structure for t_machine_record
  783. -- ----------------------------
  784. DROP TABLE IF EXISTS `t_machine_record`;
  785. CREATE TABLE `t_machine_record` (
  786. `record_id` int(11) NOT NULL AUTO_INCREMENT,
  787. `machine_id` int(11) NOT NULL,
  788. `record_des` text NULL DEFAULT NULL,
  789. `affair_data_id` varchar(25) NULL DEFAULT NULL,
  790. `change_time` varchar(50) NULL DEFAULT NULL,
  791. `production_time` varchar(50) NULL DEFAULT NULL,
  792. `stop_time` varchar(50) NULL DEFAULT NULL,
  793. `utime` datetime(0) NOT NULL,
  794. `ctime` datetime(0) NOT NULL,
  795. PRIMARY KEY (`record_id`) USING BTREE
  796. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  797. -- ----------------------------
  798. -- Table structure for t_machine_settings
  799. -- ----------------------------
  800. DROP TABLE IF EXISTS `t_machine_settings`;
  801. CREATE TABLE `t_machine_settings` (
  802. `id` int(11) NOT NULL AUTO_INCREMENT,
  803. `produced_affair_id` int(11) NULL DEFAULT NULL,
  804. `produced_sheet_id` int(11) NULL DEFAULT NULL,
  805. `produced_affair_tag_ids` text NULL DEFAULT NULL,
  806. `produced_user_ids` text NULL DEFAULT NULL,
  807. `produced_affair_summary` text NULL DEFAULT NULL,
  808. `produced_affair_summary_permission` tinyint(1) NULL DEFAULT 1,
  809. `utime` datetime(0) NULL DEFAULT NULL,
  810. PRIMARY KEY (`id`) USING BTREE,
  811. INDEX `produced_sheet`(`produced_sheet_id`) USING BTREE,
  812. INDEX `produced_affair_id`(`produced_affair_id`) USING BTREE,
  813. CONSTRAINT `t_machine_settings_ibfk_3` FOREIGN KEY (`produced_sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  814. CONSTRAINT `t_machine_settings_ibfk_4` FOREIGN KEY (`produced_affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE
  815. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  816. -- ----------------------------
  817. -- Table structure for t_pattribute
  818. -- ----------------------------
  819. DROP TABLE IF EXISTS `t_pattribute`;
  820. CREATE TABLE `t_pattribute` (
  821. `pattribute_id` int(11) NOT NULL AUTO_INCREMENT,
  822. `user_id` int(11) NULL DEFAULT NULL,
  823. `company_id` int(11) NULL DEFAULT NULL,
  824. `product_id` int(11) NOT NULL,
  825. `image_id` int(11) NULL DEFAULT NULL,
  826. `pattribute_image_id` int(11) NULL DEFAULT NULL,
  827. `pattribute_image` varchar(255) NULL DEFAULT NULL,
  828. `pattribute_pname` varchar(255) NOT NULL,
  829. `pattribute_cname` varchar(255) NOT NULL,
  830. `pattribute_type` int(255) NULL DEFAULT NULL,
  831. `pattribute_price` varchar(255) NULL DEFAULT NULL,
  832. `pattribute_price_unit` varchar(255) NULL DEFAULT NULL,
  833. `pattribute_inventory` decimal(13, 3) NULL DEFAULT NULL,
  834. `pattribute_inventory_unit` varchar(255) NULL DEFAULT NULL,
  835. `pattribute_width` decimal(13, 2) NULL DEFAULT NULL,
  836. `pattribute_width_unit` varchar(255) NULL DEFAULT NULL,
  837. `pattribute_height` decimal(13, 2) NULL DEFAULT NULL,
  838. `pattribute_height_unit` varchar(255) NULL DEFAULT NULL,
  839. `pattribute_freeheight` decimal(13, 2) NULL DEFAULT NULL,
  840. `pattribute_freeheight_unit` varchar(255) NULL DEFAULT NULL,
  841. `pattribute_weight` varchar(255) NULL DEFAULT NULL,
  842. `pattribute_weight_unit` varchar(255) NULL DEFAULT NULL,
  843. `pattribute_elasticity` varchar(255) NULL DEFAULT NULL,
  844. `pattribute_mtype` varchar(255) NULL DEFAULT NULL,
  845. `pattribute_material` varchar(255) NULL DEFAULT NULL,
  846. `pattribute_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  847. `pattribute_address` varchar(255) NULL DEFAULT NULL,
  848. `pattribute_from` tinyint(1) NULL DEFAULT NULL,
  849. `ctime` datetime(0) NULL DEFAULT NULL,
  850. PRIMARY KEY (`pattribute_id`) USING BTREE,
  851. UNIQUE INDEX `pattribute_id`(`pattribute_id`) USING BTREE,
  852. INDEX `product_id`(`product_id`) USING BTREE,
  853. INDEX `image_id`(`image_id`) USING BTREE,
  854. CONSTRAINT `t_pattribute_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE
  855. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  856. -- ----------------------------
  857. -- Table structure for t_pattribute_linkman
  858. -- ----------------------------
  859. DROP TABLE IF EXISTS `t_pattribute_linkman`;
  860. CREATE TABLE `t_pattribute_linkman` (
  861. `linkman_id` int(11) NOT NULL AUTO_INCREMENT,
  862. `user_id` int(11) NULL DEFAULT NULL,
  863. `pattribute_id` int(11) NULL DEFAULT NULL,
  864. `linkman_realname` varchar(255) NULL DEFAULT NULL,
  865. `linkman_phone` varchar(255) NULL DEFAULT NULL,
  866. `linkman_qq` varchar(255) NULL DEFAULT NULL,
  867. `linkman_email` varchar(255) NULL DEFAULT NULL,
  868. `linkman_rolename` varchar(255) NULL DEFAULT NULL,
  869. `ctime` datetime(0) NULL DEFAULT NULL,
  870. PRIMARY KEY (`linkman_id`) USING BTREE,
  871. UNIQUE INDEX `linkman_id`(`linkman_id`) USING BTREE,
  872. INDEX `pattribute_id`(`pattribute_id`) USING BTREE,
  873. INDEX `user_id`(`user_id`) USING BTREE,
  874. CONSTRAINT `t_pattribute_linkman_ibfk_1` FOREIGN KEY (`pattribute_id`) REFERENCES `t_pattribute` (`pattribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  875. CONSTRAINT `t_pattribute_linkman_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE
  876. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  877. -- ----------------------------
  878. -- Table structure for t_printer
  879. -- ----------------------------
  880. DROP TABLE IF EXISTS `t_printer`;
  881. CREATE TABLE `t_printer` (
  882. `printer_id` int(11) NOT NULL AUTO_INCREMENT,
  883. `need_user_id` int(11) NULL DEFAULT NULL,
  884. `printer_user_id` int(11) NULL DEFAULT NULL,
  885. `printer_type` int(11) NULL DEFAULT NULL,
  886. `printer_from_id` int(11) NULL DEFAULT NULL,
  887. `printer_data` text NULL DEFAULT NULL,
  888. `printer_state` int(11) NULL DEFAULT 0,
  889. `ctime` varchar(25) NULL DEFAULT '',
  890. `ptime` varchar(25) NULL DEFAULT '',
  891. `ttime` varchar(25) NULL DEFAULT '',
  892. `printer_page` int(11) NULL,
  893. `version` int(11) NULL,
  894. PRIMARY KEY (`printer_id`) USING BTREE,
  895. UNIQUE INDEX `printer_id`(`printer_id`) USING BTREE,
  896. INDEX `need_user_id`(`need_user_id`) USING BTREE,
  897. INDEX `printer_user_id`(`printer_user_id`) USING BTREE,
  898. CONSTRAINT `t_printer_ibfk_1` FOREIGN KEY (`need_user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  899. CONSTRAINT `t_printer_ibfk_2` FOREIGN KEY (`printer_user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  900. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  901. -- ----------------------------
  902. -- Table structure for t_printer_frequently
  903. -- ----------------------------
  904. DROP TABLE IF EXISTS `t_printer_frequently`;
  905. CREATE TABLE `t_printer_frequently` (
  906. `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
  907. `user_id` int(11) NULL DEFAULT NULL,
  908. `printer_user_ids` text NULL DEFAULT NULL,
  909. `utime` varchar(25) NULL DEFAULT '',
  910. UNIQUE INDEX `frequently_id`(`frequently_id`) USING BTREE,
  911. INDEX `user_id`(`user_id`) USING BTREE,
  912. CONSTRAINT `t_printer_frequently_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  913. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  914. -- ----------------------------
  915. -- Table structure for t_product
  916. -- ----------------------------
  917. DROP TABLE IF EXISTS `t_product`;
  918. CREATE TABLE `t_product` (
  919. `product_id` int(11) NOT NULL AUTO_INCREMENT,
  920. `user_id` int(11) NULL DEFAULT NULL,
  921. `company_id` int(11) NOT NULL,
  922. `company_type` int(11) NULL DEFAULT NULL,
  923. `image_id` int(11) NULL DEFAULT NULL,
  924. `product_image_id` int(11) NULL DEFAULT NULL,
  925. `product_image` varchar(255) NULL DEFAULT NULL,
  926. `product_pname` varchar(255) NOT NULL,
  927. `product_cname` varchar(255) NOT NULL,
  928. `product_type` tinyint(2) NULL DEFAULT NULL,
  929. `product_state` tinyint(2) NULL DEFAULT 0,
  930. `product_price` varchar(13) NULL DEFAULT NULL,
  931. `product_price_unit` varchar(255) NULL DEFAULT NULL,
  932. `product_cloth_price` varchar(255) NULL DEFAULT NULL,
  933. `product_cloth_price_unit` varchar(255) NULL DEFAULT NULL,
  934. `product_product_price` varchar(255) NULL DEFAULT NULL,
  935. `product_product_price_unit` varchar(255) NULL DEFAULT NULL,
  936. `product_inventory` decimal(13, 3) NULL DEFAULT NULL,
  937. `product_inventory_unit` varchar(255) NULL DEFAULT NULL,
  938. `product_width` decimal(13, 2) NULL DEFAULT NULL,
  939. `product_width_unit` varchar(255) NULL DEFAULT NULL,
  940. `product_height` decimal(13, 2) NULL DEFAULT NULL,
  941. `product_height_unit` varchar(255) NULL DEFAULT NULL,
  942. `product_freeheight` decimal(13, 2) NULL DEFAULT NULL,
  943. `product_freeheight_unit` varchar(255) NULL DEFAULT NULL,
  944. `product_weight` varchar(255) NULL DEFAULT NULL,
  945. `product_weight_unit` varchar(255) NULL DEFAULT NULL,
  946. `product_elasticity` varchar(255) NULL DEFAULT NULL,
  947. `product_mtype` varchar(255) NULL DEFAULT NULL,
  948. `product_material` varchar(255) NULL DEFAULT NULL,
  949. `product_uptime` text NULL DEFAULT NULL,
  950. `product_uptime_density` varchar(255) NULL DEFAULT NULL,
  951. `product_uptime_density_unit` varchar(255) NULL DEFAULT NULL,
  952. `product_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  953. `product_chart` varchar(255) NULL DEFAULT NULL,
  954. `chart_image_id` int(11) NULL DEFAULT NULL,
  955. `chart_image` varchar(255) NULL DEFAULT NULL,
  956. `product_hits` int(255) NULL DEFAULT 0,
  957. `product_tag_ids` text NULL DEFAULT NULL,
  958. `ctime` datetime(0) NOT NULL,
  959. `utime` datetime(0) NULL DEFAULT NULL,
  960. `dtime` datetime(0) NULL DEFAULT NULL,
  961. `status` tinyint(2) NOT NULL DEFAULT 99,
  962. `product_exhibition_id` int(11) NULL DEFAULT NULL,
  963. `product_partially_id` int(11) NULL DEFAULT NULL,
  964. `product_beginning_id` int(11) NULL DEFAULT NULL,
  965. `product_gram_weight` decimal(13, 2) NULL DEFAULT NULL,
  966. `product_gram_weight_unit` varchar(255) NULL DEFAULT 'g/m2',
  967. `push_result` longtext NULL,
  968. `recv_result` longtext NULL,
  969. `product_public_notes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL,
  970. `search_id` int(11) NULL,
  971. `search_status` int(11) NULL,
  972. `product_cabinet_id` int(11) NULL,
  973. `product_partially` text CHARACTER SET utf8 NULL,
  974. PRIMARY KEY (`product_id`) USING BTREE,
  975. UNIQUE INDEX `product_id`(`product_id`) USING BTREE,
  976. INDEX `user_id`(`user_id`) USING BTREE,
  977. INDEX `ctime`(`ctime`) USING BTREE,
  978. INDEX `status`(`status`) USING BTREE,
  979. INDEX `company_id`(`company_id`) USING BTREE,
  980. INDEX `image_id`(`image_id`) USING BTREE,
  981. INDEX `product_pname`(`product_pname`, `product_cname`, `product_type`, `status`) USING BTREE,
  982. CONSTRAINT `t_product_ibfk_2` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  983. CONSTRAINT `t_product_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  984. CONSTRAINT `t_product_ibfk_4` FOREIGN KEY (`product_cabinet_id`) REFERENCES `t_confidential_cabinet` (`cabinet_id`) ON DELETE SET NULL ON UPDATE CASCADE
  985. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  986. -- ----------------------------
  987. -- Table structure for t_product_share
  988. -- ----------------------------
  989. DROP TABLE IF EXISTS `t_product_share`;
  990. CREATE TABLE `t_product_share` (
  991. `share_id` varchar(50) NOT NULL,
  992. `product_ids` longtext NULL,
  993. `user_id` int(11) NULL DEFAULT NULL,
  994. `company_id` int(11) NULL DEFAULT NULL,
  995. `title` varchar(50) NULL DEFAULT '',
  996. `ctime` datetime NULL,
  997. `share_time` varchar(25) NULL DEFAULT NULL,
  998. `desc` varchar(255) NULL DEFAULT NULL,
  999. `imgUrl` varchar(255) NULL DEFAULT NULL,
  1000. `share_type` varchar(25) NULL DEFAULT NULL,
  1001. `share_password` varchar(50) NULL DEFAULT NULL,
  1002. `hits` int(11) NULL DEFAULT 0,
  1003. `permission` int(1) NULL DEFAULT 2,
  1004. `permission_view` int(1) NULL DEFAULT 2,
  1005. INDEX `share_id`(`share_id`),
  1006. PRIMARY KEY (`share_id`) USING BTREE
  1007. ) ENGINE = InnoDB ROW_FORMAT = Compact;
  1008. -- ----------------------------
  1009. -- Table structure for t_product_template
  1010. -- ----------------------------
  1011. DROP TABLE IF EXISTS `t_product_template`;
  1012. CREATE TABLE `t_product_template` (
  1013. `template_md5` varchar(50) NOT NULL,
  1014. `user_id` int(11) DEFAULT NULL,
  1015. `company_id` int(11) DEFAULT NULL,
  1016. `ctime` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  1017. `template_imgUrl` varchar(255) DEFAULT '',
  1018. `template_number` varchar(25) DEFAULT '',
  1019. `template_color` varchar(50) DEFAULT '',
  1020. PRIMARY KEY (`template_md5`)
  1021. ) ENGINE=InnoDB ROW_FORMAT=COMPACT;
  1022. -- ----------------------------
  1023. -- Table structure for t_r_product_collection
  1024. -- ----------------------------
  1025. DROP TABLE IF EXISTS `t_r_product_collection`;
  1026. CREATE TABLE `t_r_product_collection` (
  1027. `collection_id` int(11) NOT NULL,
  1028. `product_id` int(11) NOT NULL,
  1029. PRIMARY KEY (`collection_id`, `product_id`) USING BTREE,
  1030. INDEX `product_id`(`product_id`) USING BTREE,
  1031. INDEX `collection_id`(`collection_id`) USING BTREE,
  1032. CONSTRAINT `t_r_product_collection_ibfk_1` FOREIGN KEY (`collection_id`) REFERENCES `t_collection` (`collection_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1033. CONSTRAINT `t_r_product_collection_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1034. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1035. -- ----------------------------
  1036. -- Table structure for t_report_forms
  1037. -- ----------------------------
  1038. DROP TABLE IF EXISTS `t_report_forms`;
  1039. CREATE TABLE `t_report_forms` (
  1040. `report_forms_id` int(11) NOT NULL AUTO_INCREMENT,
  1041. `report_forms_name` varchar(255) NULL DEFAULT NULL,
  1042. `report_forms_title` varchar(255) NULL DEFAULT NULL,
  1043. `report_forms_desc` text NULL DEFAULT NULL,
  1044. `report_forms_count` int(11) NULL DEFAULT 0,
  1045. `status` int(2) NULL DEFAULT 99,
  1046. `ctime` datetime(0) NULL DEFAULT NULL,
  1047. `utime` datetime(0) NULL DEFAULT NULL,
  1048. `forms_data` text NULL DEFAULT NULL,
  1049. `report_forms_limit` text NULL DEFAULT NULL,
  1050. `report_forms_url` varchar(255) NULL DEFAULT NULL,
  1051. `forms_affair_Ids` text NULL DEFAULT NULL,
  1052. `tag_limit` text NULL DEFAULT NULL,
  1053. `set_begin` tinyint(1) NULL DEFAULT 2,
  1054. `set_inventory` tinyint(1) NULL DEFAULT 2,
  1055. `report_forms_pid` int(11) NULL DEFAULT NULL,
  1056. `report_forms_prompt` varchar(255) NULL DEFAULT '',
  1057. `print_forms_data` text NULL DEFAULT NULL,
  1058. `report_forms_group_id` int(11) NULL DEFAULT NULL,
  1059. `set_seal_account` tinyint(1) NULL DEFAULT 2,
  1060. `set_achievements` tinyint(1) NULL DEFAULT 2,
  1061. `set_company_account` tinyint(1) NULL DEFAULT 2,
  1062. PRIMARY KEY (`report_forms_id`) USING BTREE,
  1063. INDEX `report_forms_group_id`(`report_forms_group_id`) USING BTREE,
  1064. CONSTRAINT `t_report_forms_ibfk_1` FOREIGN KEY (`report_forms_group_id`) REFERENCES `t_report_forms_group` (`report_forms_group_id`) ON DELETE SET NULL ON UPDATE NO ACTION
  1065. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1066. -- ----------------------------
  1067. -- Table structure for t_report_forms_begin
  1068. -- ----------------------------
  1069. DROP TABLE IF EXISTS `t_report_forms_begin`;
  1070. CREATE TABLE `t_report_forms_begin` (
  1071. `begin_id` int(11) NOT NULL AUTO_INCREMENT,
  1072. `user_id` int(11) NULL DEFAULT NULL,
  1073. `report_forms_id` int(11) NULL DEFAULT NULL,
  1074. `begin_customer` varchar(20) NULL DEFAULT NULL,
  1075. `status` int(2) NULL DEFAULT 99,
  1076. `ctime` datetime(0) NULL DEFAULT NULL,
  1077. `utime` datetime(0) NULL DEFAULT NULL,
  1078. `begin_cumulative` double(16, 2) NULL DEFAULT NULL,
  1079. `admission` tinyint(1) NULL DEFAULT 0,
  1080. PRIMARY KEY (`begin_id`) USING BTREE,
  1081. INDEX `user_id`(`user_id`) USING BTREE,
  1082. INDEX `report_forms_id`(`report_forms_id`) USING BTREE,
  1083. CONSTRAINT `t_report_forms_begin_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1084. CONSTRAINT `t_report_forms_begin_ibfk_2` FOREIGN KEY (`report_forms_id`) REFERENCES `t_report_forms` (`report_forms_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1085. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1086. -- ----------------------------
  1087. -- Table structure for t_report_forms_group
  1088. -- ----------------------------
  1089. DROP TABLE IF EXISTS `t_report_forms_group`;
  1090. CREATE TABLE `t_report_forms_group` (
  1091. `report_forms_group_id` int(11) NOT NULL AUTO_INCREMENT,
  1092. `report_forms_group_title` varchar(255) NOT NULL,
  1093. `report_forms_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  1094. `status` int(11) NULL DEFAULT 99,
  1095. `ctime` datetime(0) NULL DEFAULT NULL,
  1096. `utime` datetime(0) NULL DEFAULT NULL,
  1097. `dtime` datetime(0) NULL DEFAULT NULL,
  1098. PRIMARY KEY (`report_forms_group_id`) USING BTREE
  1099. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1100. -- ----------------------------
  1101. -- Table structure for t_report_forms_permission
  1102. -- ----------------------------
  1103. DROP TABLE IF EXISTS `t_report_forms_permission`;
  1104. CREATE TABLE `t_report_forms_permission` (
  1105. `report_forms_per_id` int(11) NOT NULL AUTO_INCREMENT,
  1106. `report_forms_id` int(11) NOT NULL,
  1107. `user_id` int(11) NOT NULL DEFAULT 0,
  1108. PRIMARY KEY (`report_forms_per_id`) USING BTREE,
  1109. INDEX `user_id`(`user_id`) USING BTREE,
  1110. INDEX `bill_per_id`(`report_forms_per_id`) USING BTREE,
  1111. INDEX `bill_id`(`report_forms_id`) USING BTREE,
  1112. CONSTRAINT `t_report_forms_permission_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1113. CONSTRAINT `t_report_forms_permission_ibfk_2` FOREIGN KEY (`report_forms_id`) REFERENCES `t_report_forms` (`report_forms_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1114. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1115. -- ----------------------------
  1116. -- Table structure for t_role
  1117. -- ----------------------------
  1118. DROP TABLE IF EXISTS `t_role`;
  1119. CREATE TABLE `t_role` (
  1120. `role_id` int(11) NOT NULL AUTO_INCREMENT,
  1121. `role_name` varchar(50) NOT NULL,
  1122. `role_desc` varchar(255) NULL DEFAULT NULL,
  1123. PRIMARY KEY (`role_id`) USING BTREE
  1124. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1125. -- ----------------------------
  1126. -- Table structure for t_rule_new
  1127. -- ----------------------------
  1128. DROP TABLE IF EXISTS `t_rule_new`;
  1129. CREATE TABLE `t_rule_new` (
  1130. `rule_new_id` int(11) NOT NULL AUTO_INCREMENT,
  1131. `user_id` int(11) NULL DEFAULT NULL,
  1132. `product_modular` tinyint(1) NULL DEFAULT 0,
  1133. `product_modular_delete` tinyint(1) NULL DEFAULT 0,
  1134. `product_modular_add` tinyint(1) NULL DEFAULT 0,
  1135. `product_modular_public` tinyint(1) NULL DEFAULT 0,
  1136. `product_modular_private` tinyint(1) NULL DEFAULT 0,
  1137. `product_modular_supplier` tinyint(1) NULL DEFAULT 0,
  1138. `product_modular_push` tinyint(1) NULL DEFAULT 0,
  1139. `product_modular_template` tinyint(1) NULL DEFAULT 0,
  1140. `product_modular_batch_share` tinyint(1) NULL DEFAULT 0,
  1141. `material_modular` tinyint(1) NULL DEFAULT 0,
  1142. `material_modular_edit` tinyint(1) NULL DEFAULT 0,
  1143. `material_modular_delete` tinyint(1) NULL DEFAULT 0,
  1144. `material_modular_push` tinyint(1) NULL DEFAULT 0,
  1145. `documentary_modular_statistics` tinyint(1) NULL DEFAULT 0,
  1146. `documentary_modular_remove` tinyint(1) NULL DEFAULT 0,
  1147. `product_modular_internal_price` tinyint(1) NULL DEFAULT 0,
  1148. `product_cost_accounting` tinyint(1) NULL DEFAULT 0,
  1149. `product_cost_view` tinyint(1) NULL DEFAULT 0,
  1150. `product_confidential_set` tinyint(1) NULL DEFAULT 0,
  1151. `product_confidential_use` tinyint(1) NULL DEFAULT 0,
  1152. `customer_modular_group_secrecy` tinyint(1) NULL DEFAULT 0,
  1153. `customer_modular_group` tinyint(1) NULL DEFAULT 0,
  1154. `product_watermark` tinyint(1) NULL DEFAULT 0,
  1155. `customer_modular` tinyint(1) NULL DEFAULT 0,
  1156. `customer_modular_delete` tinyint(1) NULL DEFAULT 0,
  1157. `customer_modular_customer_edit` tinyint(1) NULL DEFAULT 0,
  1158. `customer_modular_company_edit` tinyint(1) NULL DEFAULT 0,
  1159. `customer_modular_add` tinyint(1) NULL DEFAULT 0,
  1160. `customer_modular_transfer` tinyint(1) NULL DEFAULT 0,
  1161. `customer_modular_set_visible` tinyint(1) NULL DEFAULT 0,
  1162. `machine_modular` tinyint(1) NULL DEFAULT 0,
  1163. `machine_modular_add` tinyint(1) NULL DEFAULT 0,
  1164. `machine_modular_edit` tinyint(1) NULL DEFAULT 0,
  1165. `machine_modular_record` tinyint(1) NULL DEFAULT 0,
  1166. `machine_modular_wait` tinyint(1) NULL DEFAULT 0,
  1167. `machine_modular_pause` tinyint(1) NULL DEFAULT 0,
  1168. `shop_modular` tinyint(1) NULL DEFAULT 0,
  1169. `shop_modular_update` tinyint(1) NULL DEFAULT 0,
  1170. `bill_modular` tinyint(1) NULL DEFAULT 0,
  1171. `bill_modular_waste` tinyint(1) NULL DEFAULT 0,
  1172. `bill_modular_set` tinyint(1) NULL DEFAULT 0,
  1173. `affair_modular` tinyint(1) NULL DEFAULT 0,
  1174. `employee_modular` tinyint(1) NULL DEFAULT 0,
  1175. `tag_modular` tinyint(1) NULL DEFAULT 0,
  1176. `report_modular` tinyint(1) NULL DEFAULT 0,
  1177. `report_modular_download` tinyint(1) NULL DEFAULT 0,
  1178. `company_modular` tinyint(1) NULL DEFAULT 0,
  1179. `company_modular_authentication` tinyint(1) NULL DEFAULT 0,
  1180. `affair_recycle_bin` tinyint(1) NULL DEFAULT 0,
  1181. `documentary_modular` tinyint(1) NULL DEFAULT 0,
  1182. `documentary_modular_control` tinyint(1) NULL DEFAULT 0,
  1183. `documentary_modular_report` tinyint(1) NULL DEFAULT 0,
  1184. `print_modular` tinyint(1) NULL DEFAULT 0,
  1185. `documentary_modular_adjustment` tinyint(1) NULL DEFAULT 0,
  1186. `product_modular_public_see` tinyint(1) NULL DEFAULT 0,
  1187. `product_modular_private_see` tinyint(1) NULL DEFAULT 0,
  1188. `affair_all_modify_record_see` tinyint(1) NULL DEFAULT 0,
  1189. `inventory_modular_edit` tinyint(1) NULL DEFAULT 0,
  1190. `image_search` tinyint(1) NULL DEFAULT 0,
  1191. PRIMARY KEY (`rule_new_id`) USING BTREE,
  1192. UNIQUE INDEX `rule_new_id`(`rule_new_id`) USING BTREE,
  1193. INDEX `user_id`(`user_id`) USING BTREE,
  1194. CONSTRAINT `t_rule_new_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1195. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1196. -- ----------------------------
  1197. -- Table structure for t_seal_account
  1198. -- ----------------------------
  1199. DROP TABLE IF EXISTS `t_seal_account`;
  1200. CREATE TABLE `t_seal_account` (
  1201. `seal_id` int(11) NOT NULL AUTO_INCREMENT,
  1202. `user_id` int(11) NULL DEFAULT NULL,
  1203. `content_id` int(11) NULL DEFAULT NULL,
  1204. `content_type` tinyint(1) NULL DEFAULT 0,
  1205. `content_time` varchar(25) NULL DEFAULT NULL,
  1206. PRIMARY KEY (`seal_id`) USING BTREE,
  1207. INDEX `user_id`(`user_id`) USING BTREE,
  1208. CONSTRAINT `t_seal_account_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1209. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1210. -- ----------------------------
  1211. -- Table structure for t_shop
  1212. -- ----------------------------
  1213. DROP TABLE IF EXISTS `t_shop`;
  1214. CREATE TABLE `t_shop` (
  1215. `shop_id` int(11) NOT NULL AUTO_INCREMENT,
  1216. `company_id` int(11) NULL DEFAULT NULL,
  1217. `shop_name` varchar(255) NULL DEFAULT NULL,
  1218. `shop_urlname` varchar(255) NULL DEFAULT NULL,
  1219. `shop_intro` varchar(255) NULL DEFAULT NULL,
  1220. `shop_allow_subdomain` smallint(6) NULL DEFAULT 0,
  1221. `shop_open_time` datetime(0) NULL DEFAULT NULL,
  1222. `shop_hits` int(255) NULL DEFAULT 0,
  1223. `shop_wechat_hits` int(255) NULL DEFAULT 0,
  1224. PRIMARY KEY (`shop_id`) USING BTREE
  1225. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  1226. -- ----------------------------
  1227. -- Table structure for t_shop_product
  1228. -- ----------------------------
  1229. DROP TABLE IF EXISTS `t_shop_product`;
  1230. CREATE TABLE `t_shop_product` (
  1231. `product_id` int(11) NOT NULL,
  1232. `company_id` int(11) NULL DEFAULT NULL,
  1233. `user_id` int(11) NULL DEFAULT NULL,
  1234. `shop_id` int(11) NULL DEFAULT NULL,
  1235. `product_shop_pname` varchar(255) NULL DEFAULT NULL,
  1236. `product_shop_material` varchar(255) NULL DEFAULT NULL,
  1237. `product_shop_height` varchar(255) NULL DEFAULT NULL,
  1238. `product_shop_height_unit` varchar(255) NULL DEFAULT NULL,
  1239. `product_shop_width` varchar(255) NULL DEFAULT NULL,
  1240. `product_shop_width_unit` varchar(255) NULL DEFAULT NULL,
  1241. `product_shop_elasticity` varchar(255) NULL DEFAULT NULL,
  1242. `product_shop_price_origin` varchar(255) NULL DEFAULT NULL,
  1243. `product_shop_price_origin_unit` varchar(255) NULL DEFAULT NULL,
  1244. `product_shop_price_on_sale` varchar(255) NULL DEFAULT NULL,
  1245. `product_shop_price_on_sale_unit` varchar(255) NULL DEFAULT NULL,
  1246. `product_shop_inventory` varchar(255) NULL DEFAULT NULL,
  1247. `product_shop_inventory_unit` varchar(255) NULL DEFAULT NULL,
  1248. `product_intro` varchar(255) NULL DEFAULT NULL,
  1249. `product_is_promotion` int(11) NULL DEFAULT NULL,
  1250. `product_is_order` int(255) NULL DEFAULT NULL,
  1251. `product_on_time` datetime(0) NULL DEFAULT NULL,
  1252. `product_tag_ids` text NULL DEFAULT NULL,
  1253. `product_order` int(255) NULL DEFAULT 0,
  1254. `product_promotion` tinyint(1) NULL DEFAULT NULL,
  1255. `product_promotion_start` datetime(0) NULL DEFAULT NULL,
  1256. `product_promotion_end` datetime(0) NULL DEFAULT NULL,
  1257. `product_shop_hits` int(255) UNSIGNED NULL DEFAULT 0,
  1258. `product_shop_hits_weight` int(11) NULL DEFAULT 0,
  1259. PRIMARY KEY (`product_id`) USING BTREE,
  1260. UNIQUE INDEX `product_id`(`product_id`) USING BTREE,
  1261. CONSTRAINT `t_shop_product_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE RESTRICT
  1262. ) ENGINE = InnoDB ROW_FORMAT = Compact;
  1263. -- ----------------------------
  1264. -- Table structure for t_statement_calculation
  1265. -- ----------------------------
  1266. DROP TABLE IF EXISTS `t_statement_calculation`;
  1267. CREATE TABLE `t_statement_calculation` (
  1268. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  1269. `data_id` varchar(25) NOT NULL DEFAULT '',
  1270. `affair_id` int(11) NOT NULL,
  1271. `user_id` int(11) NOT NULL,
  1272. `tagIds` varchar(100) NOT NULL DEFAULT '',
  1273. `bill_order_id` int(11) NOT NULL,
  1274. `calculation_key` varchar(13) NOT NULL DEFAULT '',
  1275. `calculation_time` datetime(0) NOT NULL,
  1276. `calculation_product_specification` varchar(255) NOT NULL,
  1277. `calculation_product_color` varchar(255) NOT NULL,
  1278. `calculation_account_category_out` varchar(255) NOT NULL,
  1279. `calculation_receivables_payment_category` varchar(255) NOT NULL,
  1280. `receivables_mode` tinyint(1) NOT NULL,
  1281. `bill_order_number` varchar(255) NOT NULL DEFAULT '',
  1282. `tag_numbers` tinyint(1) NULL DEFAULT 0,
  1283. `bill_ids` text NULL,
  1284. `calculation_value` decimal(22, 6) NOT NULL DEFAULT 0.000000,
  1285. `calculation_condition` varchar(120) NOT NULL,
  1286. `calculation_supplement` varchar(50) NOT NULL DEFAULT '',
  1287. `call_time` datetime(0) NOT NULL,
  1288. `calculation_senior_screen` varchar(50) NOT NULL,
  1289. `calculation_account_category` varchar(50) NOT NULL,
  1290. `calculation_product_id` int(11) NOT NULL,
  1291. `calculation_collection_id` int(11) NOT NULL,
  1292. `day` INT ( 11 ) NULL,
  1293. `calculation_ctime` datetime(0) NULL DEFAULT NULL,
  1294. `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  1295. PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
  1296. INDEX `bill_order_number`(`bill_order_number`) USING BTREE,
  1297. INDEX `bill_order_id`(`bill_order_id`) USING BTREE,
  1298. INDEX `call_time`(`call_time`) USING BTREE,
  1299. UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
  1300. INDEX `calculation_value`(`calculation_key`, `affair_id`, `calculation_time`, `calculation_value`, `calculation_condition`, `tagIds`) USING BTREE,
  1301. INDEX `calculation_time`(`calculation_time`, `affair_id`, `calculation_condition`, `tagIds`) USING BTREE
  1302. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1303. -- ----------------------------
  1304. -- Table structure for t_statement_calculation
  1305. -- ----------------------------
  1306. DROP TABLE IF EXISTS `t_product_share_permission`;
  1307. CREATE TABLE IF NOT EXISTS `t_product_share_permission` (
  1308. `per_id` int(11) NOT NULL AUTO_INCREMENT,
  1309. `share_id` varchar(50) NOT NULL,
  1310. `user_id` int(11) NOT NULL DEFAULT 0,
  1311. `allow` int(1) DEFAULT 1,
  1312. PRIMARY KEY (`per_id`) USING BTREE,
  1313. KEY `per_id` (`per_id`) USING BTREE,
  1314. KEY `user_id` (`user_id`,`share_id`) USING BTREE,
  1315. KEY `share_id` (`share_id`,`user_id`),
  1316. CONSTRAINT `t_product_share_permission_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1317. CONSTRAINT `t_product_share_permission_ibfk_3` FOREIGN KEY (`share_id`) REFERENCES `t_product_share` (`share_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1318. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
  1319. -- ----------------------------
  1320. -- Table structure for t_tag_frequently
  1321. -- ----------------------------
  1322. DROP TABLE IF EXISTS `t_tag_frequently`;
  1323. CREATE TABLE `t_tag_frequently` (
  1324. `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
  1325. `user_id` int(11) NOT NULL,
  1326. `tag_id` int(11) NOT NULL,
  1327. `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  1328. PRIMARY KEY (`frequently_id`) USING BTREE,
  1329. INDEX `user_id`(`user_id`) USING BTREE,
  1330. INDEX `tag_id`(`tag_id`) USING BTREE,
  1331. CONSTRAINT `t_tag_frequently_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1332. CONSTRAINT `t_tag_frequently_ibfk_3` FOREIGN KEY (`tag_id`) REFERENCES `t_tag_list` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1333. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  1334. -- ----------------------------
  1335. -- Table structure for t_tag_list
  1336. -- ----------------------------
  1337. DROP TABLE IF EXISTS `t_tag_list`;
  1338. CREATE TABLE `t_tag_list` (
  1339. `tag_id` int(11) NOT NULL AUTO_INCREMENT,
  1340. `company_id` int(11) NULL DEFAULT NULL,
  1341. `user_id` int(11) NULL DEFAULT NULL,
  1342. `tag_category` int(11) NULL DEFAULT 0,
  1343. `tag_image_id` int(11) NULL DEFAULT NULL,
  1344. `tag_image` varchar(255) NULL DEFAULT NULL,
  1345. `tag_title` varchar(255) NULL DEFAULT NULL,
  1346. `tag_desc` varchar(255) NULL DEFAULT NULL,
  1347. `used_count` int(11) NULL DEFAULT 0,
  1348. `status` int(2) NULL DEFAULT 99,
  1349. `ctime` datetime(0) NULL DEFAULT NULL,
  1350. `utime` datetime(0) NULL DEFAULT NULL,
  1351. `permission` int(1) NULL DEFAULT 1,
  1352. `necessary` int(1) NULL DEFAULT 0,
  1353. `data_protection` int(1) NULL DEFAULT 0,
  1354. `position` int(11) NULL DEFAULT 0,
  1355. `permission_view` INT ( 1 ) NULL DEFAULT 1,
  1356. `tag_group_id` int(11) NULL DEFAULT 0,
  1357. PRIMARY KEY (`tag_id`) USING BTREE,
  1358. INDEX `tag_image_id`(`tag_image_id`) USING BTREE
  1359. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1360. -- ----------------------------
  1361. -- Table structure for t_tag_list_rel
  1362. -- ----------------------------
  1363. DROP TABLE IF EXISTS `t_tag_list_rel`;
  1364. CREATE TABLE `t_tag_list_rel` (
  1365. `rel_id` int(11) NOT NULL AUTO_INCREMENT,
  1366. `user_id` int(11) NOT NULL,
  1367. `tag_category` int(11) NULL DEFAULT NULL,
  1368. `content_id` varchar(25) NULL DEFAULT NULL,
  1369. `content_type` int(11) NULL DEFAULT 0,
  1370. `tag_id` int(11) NULL DEFAULT NULL,
  1371. `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  1372. PRIMARY KEY (`rel_id`) USING BTREE,
  1373. INDEX `tag_id`(`tag_id`) USING BTREE,
  1374. CONSTRAINT `t_tag_list_rel_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `t_tag_list` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1375. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1376. -- ----------------------------
  1377. -- Table structure for t_tag_permission
  1378. -- ----------------------------
  1379. DROP TABLE IF EXISTS `t_tag_permission`;
  1380. CREATE TABLE `t_tag_permission` (
  1381. `per_id` int(11) NOT NULL AUTO_INCREMENT,
  1382. `tag_id` int(11) NOT NULL,
  1383. `user_id` int(11) NOT NULL DEFAULT 0,
  1384. PRIMARY KEY (`per_id`) USING BTREE,
  1385. INDEX `per_id`(`per_id`) USING BTREE,
  1386. INDEX `tag_id`(`tag_id`) USING BTREE,
  1387. INDEX `user_id`(`user_id`) USING BTREE,
  1388. `allow` INT ( 1 ) NULL DEFAULT 1,
  1389. CONSTRAINT `t_tag_permission_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `t_tag_list` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1390. CONSTRAINT `t_tag_permission_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1391. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1392. -- ----------------------------
  1393. -- Table structure for t_user
  1394. -- ----------------------------
  1395. DROP TABLE IF EXISTS `t_user`;
  1396. CREATE TABLE `t_user` (
  1397. `user_id` int(11) NOT NULL AUTO_INCREMENT,
  1398. `company_id` int(11) NULL DEFAULT NULL,
  1399. `role_id` int(11) NOT NULL,
  1400. `location_id` int(11) NULL DEFAULT NULL,
  1401. `department_id` int(11) NULL DEFAULT NULL,
  1402. `user_addr` varchar(255) NULL DEFAULT NULL,
  1403. `user_company_name` varchar(255) NULL DEFAULT NULL,
  1404. `user_name` varchar(255) NOT NULL,
  1405. `user_password` varchar(32) NOT NULL,
  1406. `user_pwdhash` varchar(255) NULL DEFAULT NULL,
  1407. `user_realname` varchar(10) NOT NULL,
  1408. `user_gender` tinyint(1) NULL DEFAULT 1,
  1409. `user_avatar` varchar(100) NULL DEFAULT NULL,
  1410. `user_phonenum` varchar(11) NULL DEFAULT NULL,
  1411. `user_state` tinyint(1) NULL DEFAULT 0,
  1412. `user_qq` varchar(15) NULL DEFAULT NULL,
  1413. `user_email` varchar(255) NULL DEFAULT NULL,
  1414. `user_uid` varchar(18) NULL DEFAULT NULL,
  1415. `user_region` varchar(255) NULL DEFAULT NULL,
  1416. `visible` tinyint(255) NULL DEFAULT NULL,
  1417. `ctime` datetime(0) NOT NULL,
  1418. `utime` datetime(0) NULL DEFAULT NULL,
  1419. `dtime` datetime(0) NULL DEFAULT NULL,
  1420. `status` decimal(2, 0) NOT NULL DEFAULT 99,
  1421. `user_logtimes` int(11) NULL DEFAULT NULL,
  1422. `user_lastip` varchar(255) NULL DEFAULT NULL,
  1423. `user_lastlogintime` datetime(0) NULL DEFAULT NULL,
  1424. `user_lastackqstring` varchar(255) NULL DEFAULT NULL,
  1425. `user_lastackurl` varchar(255) NULL DEFAULT NULL,
  1426. `avos_session_token` varchar(50) NULL DEFAULT NULL,
  1427. `user_lastacktime` datetime(0) NULL DEFAULT NULL,
  1428. `user_lastackdevice` varchar(255) NULL DEFAULT NULL,
  1429. `user_signup_user_agent` varchar(255) NULL DEFAULT NULL,
  1430. `auth_key` varchar(255) NULL DEFAULT NULL,
  1431. `access_token` varchar(255) NULL DEFAULT NULL,
  1432. `tgt` varchar(255) NULL DEFAULT NULL,
  1433. `st` varchar(255) NULL DEFAULT NULL,
  1434. `sid` varchar(255) NULL DEFAULT NULL,
  1435. `avos_token` varchar(255) NULL DEFAULT NULL,
  1436. `referral_code` int(6) NULL DEFAULT NULL,
  1437. `user_lastaddress` varchar(255) NULL DEFAULT NULL,
  1438. `necessary` tinyint(1) NULL DEFAULT 0,
  1439. `work_time` varchar(60) NULL DEFAULT NULL,
  1440. `attendance_id` int(11) NULL DEFAULT NULL,
  1441. `bill_header` varchar(255) NULL,
  1442. `report_header` varchar(255) NULL,
  1443. `report_password` varchar(32) NULL,
  1444. `report_password_type` tinyint(1) NULL DEFAULT 0,
  1445. `second_token` varchar(50) CHARACTER SET utf8mb4 NULL DEFAULT '',
  1446. PRIMARY KEY (`user_id`) USING BTREE,
  1447. INDEX `role_id`(`role_id`) USING BTREE,
  1448. INDEX `company_id`(`company_id`) USING BTREE,
  1449. INDEX `department_id`(`department_id`) USING BTREE,
  1450. INDEX `user_name`(`user_name`) USING BTREE,
  1451. INDEX `referral_code`(`referral_code`) USING BTREE,
  1452. INDEX `referral_code_2`(`referral_code`) USING BTREE,
  1453. INDEX `user_phonenum`(`user_phonenum`) USING BTREE,
  1454. CONSTRAINT `FK_Relationship_2` FOREIGN KEY (`role_id`) REFERENCES `t_role` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1455. CONSTRAINT `t_user_ibfk_2` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1456. CONSTRAINT `t_user_ibfk_3` FOREIGN KEY (`department_id`) REFERENCES `t_department` (`department_id`) ON DELETE SET NULL ON UPDATE CASCADE
  1457. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1458. -- ----------------------------
  1459. -- Table structure for t_user_attendance
  1460. -- ----------------------------
  1461. DROP TABLE IF EXISTS `t_user_attendance`;
  1462. CREATE TABLE `t_user_attendance` (
  1463. `attendance_id` int(11) NOT NULL AUTO_INCREMENT,
  1464. `attendance_name` varchar(20) NOT NULL,
  1465. `attendance_time` varchar(60) NOT NULL DEFAULT '',
  1466. `monday` varchar(60) NULL DEFAULT '',
  1467. `tuesday` varchar(60) NULL DEFAULT '',
  1468. `wednesday` varchar(60) NULL DEFAULT '',
  1469. `thursday` varchar(60) NULL DEFAULT '',
  1470. `friday` varchar(60) NULL DEFAULT '',
  1471. `saturday` varchar(60) NULL DEFAULT '',
  1472. `sunday` varchar(60) NULL DEFAULT '',
  1473. PRIMARY KEY (`attendance_id`) USING BTREE
  1474. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1475. -- ----------------------------
  1476. -- Table structure for t_work
  1477. -- ----------------------------
  1478. DROP TABLE IF EXISTS `t_work`;
  1479. CREATE TABLE `t_work` (
  1480. `work_id` int(11) NOT NULL AUTO_INCREMENT,
  1481. `work_pid` int(11) NULL DEFAULT NULL,
  1482. `work_children_ids` varchar(255) NULL DEFAULT NULL,
  1483. `affair_id` int(11) NULL DEFAULT NULL,
  1484. `user_id` int(11) NULL DEFAULT NULL,
  1485. `work_type` int(11) NULL DEFAULT NULL,
  1486. `reminder_id` int(11) NULL DEFAULT NULL,
  1487. `image_ids` varchar(255) NULL DEFAULT NULL,
  1488. `voice_ids` varchar(255) NULL DEFAULT NULL,
  1489. `content_text` varchar(255) NULL DEFAULT NULL,
  1490. `ctime` datetime(0) NULL DEFAULT NULL,
  1491. `utime` datetime(0) NULL DEFAULT NULL,
  1492. `work_data_id` varchar(50) NULL DEFAULT NULL,
  1493. `work_object_type` tinyint(1) NULL DEFAULT 1,
  1494. `work_object_ids` text NULL DEFAULT NULL,
  1495. `work_theme` varchar(255) NULL DEFAULT NULL,
  1496. `affair_data_id` varchar(50) NULL DEFAULT NULL,
  1497. PRIMARY KEY (`work_id`) USING BTREE
  1498. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1499. -- ----------------------------
  1500. -- Table structure for t_work_frequently
  1501. -- ----------------------------
  1502. DROP TABLE IF EXISTS `t_work_frequently`;
  1503. CREATE TABLE `t_work_frequently` (
  1504. `work_frequently_id` int(11) NOT NULL AUTO_INCREMENT,
  1505. `user_id` int(11) NOT NULL,
  1506. `affair_id` int(11) NOT NULL,
  1507. `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  1508. `work_type_notice` tinyint(1) NULL DEFAULT 0,
  1509. `work_type_instructions` tinyint(1) NULL DEFAULT 0,
  1510. `work_type_Assign` tinyint(1) NULL DEFAULT 0,
  1511. PRIMARY KEY (`work_frequently_id`) USING BTREE,
  1512. INDEX `affair_id`(`affair_id`) USING BTREE,
  1513. INDEX `user_id`(`user_id`) USING BTREE,
  1514. CONSTRAINT `t_work_frequently_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1515. CONSTRAINT `t_work_frequently_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1516. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Compact;
  1517. -- ----------------------------
  1518. -- Table structure for t_work_reminder
  1519. -- ----------------------------
  1520. DROP TABLE IF EXISTS `t_work_reminder`;
  1521. CREATE TABLE `t_work_reminder` (
  1522. `work_id` int(11) NOT NULL AUTO_INCREMENT,
  1523. `reply_id` int(11) NULL DEFAULT NULL,
  1524. `set_object_type` tinyint(1) NULL DEFAULT NULL,
  1525. `set_object_ids` text NULL DEFAULT NULL,
  1526. `set_frequency` int(11) NULL DEFAULT 0,
  1527. `set_interval` int(11) NULL DEFAULT NULL,
  1528. `set_interval_unit` tinyint(1) NULL DEFAULT NULL,
  1529. `reminder_object_ids` text NULL DEFAULT NULL,
  1530. `reminder_frequency` int(11) NULL DEFAULT 0,
  1531. `reminder_time` datetime(0) NULL DEFAULT NULL,
  1532. `is_reminder` tinyint(1) NULL DEFAULT 0,
  1533. PRIMARY KEY (`work_id`) USING BTREE,
  1534. CONSTRAINT `t_work_reminder_ibfk_1` FOREIGN KEY (`work_id`) REFERENCES `t_work` (`work_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1535. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1536. -- ----------------------------
  1537. -- Table structure for t_work_reply
  1538. -- ----------------------------
  1539. DROP TABLE IF EXISTS `t_work_reply`;
  1540. CREATE TABLE `t_work_reply` (
  1541. `reply_id` int(11) NOT NULL AUTO_INCREMENT,
  1542. `reply_pid` int(11) NULL DEFAULT NULL,
  1543. `work_id` int(11) NULL DEFAULT NULL,
  1544. `reply_user_id` int(11) NULL DEFAULT NULL,
  1545. `reply_txt` varchar(255) NULL DEFAULT NULL,
  1546. `reply_affair_old_data` text NULL DEFAULT NULL,
  1547. `reply_affair_new_data` text NULL DEFAULT NULL,
  1548. `reply_time` datetime(0) NULL DEFAULT NULL,
  1549. `reply_object_ids` text NULL DEFAULT NULL,
  1550. `reply_image` varchar(255) NULL DEFAULT NULL,
  1551. `reply_voice` varchar(255) NULL DEFAULT NULL,
  1552. `reply_content` varchar(255) NULL DEFAULT NULL,
  1553. PRIMARY KEY (`reply_id`) USING BTREE,
  1554. INDEX `work_id`(`work_id`) USING BTREE,
  1555. CONSTRAINT `t_work_reply_ibfk_1` FOREIGN KEY (`work_id`) REFERENCES `t_work` (`work_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1556. ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
  1557. -- ----------------------------
  1558. -- Table structure for t_process_in_calculation
  1559. -- ----------------------------
  1560. DROP TABLE IF EXISTS `t_process_in_calculation`;
  1561. CREATE TABLE `t_process_in_calculation` (
  1562. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  1563. `data_id` varchar(25) NOT NULL,
  1564. `affair_id` int(11) NOT NULL,
  1565. `tagIds` varchar(100) NOT NULL,
  1566. `calculation_key` varchar(15) NOT NULL,
  1567. `calculation_time` datetime(0) NOT NULL,
  1568. `product_id` int(11) NOT NULL,
  1569. `collection_id` int(11) NOT NULL,
  1570. `product_color` varchar(255) NOT NULL,
  1571. `product_color_number` varchar(255) NOT NULL,
  1572. `sale_object` varchar(15) NOT NULL,
  1573. `product_width` decimal(14, 2) NOT NULL,
  1574. `product_height` decimal(14, 2) NOT NULL,
  1575. `machining_price` decimal(15, 3) NOT NULL,
  1576. `calculation_condition` varchar(120) NOT NULL,
  1577. `actual_in_storehouse_quantity` decimal(22, 2) NOT NULL,
  1578. `call_time` datetime(0) NOT NULL,
  1579. `tag_numbers` tinyint(1) NULL DEFAULT 0,
  1580. `user_id` int(11) NOT NULL,
  1581. PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
  1582. INDEX `call_time`(`call_time`) USING BTREE,
  1583. UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
  1584. INDEX `affair_id`(`affair_id`, `calculation_time`, `calculation_condition`, `tagIds`, `calculation_key`, `product_id`, `product_color`, `sale_object`) USING BTREE
  1585. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1586. -- ----------------------------
  1587. -- Table structure for t_process_out_calculation
  1588. -- ----------------------------
  1589. DROP TABLE IF EXISTS `t_process_out_calculation`;
  1590. CREATE TABLE `t_process_out_calculation` (
  1591. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  1592. `data_id` varchar(25) NOT NULL,
  1593. `affair_id` int(11) NOT NULL,
  1594. `tagIds` varchar(100) NOT NULL,
  1595. `calculation_condition` varchar(120) NOT NULL,
  1596. `calculation_time` datetime(0) NOT NULL,
  1597. `machining_price` decimal(15, 3) NOT NULL,
  1598. `machining_quantity` decimal(15, 2) NOT NULL,
  1599. `machining_total_amount` decimal(15, 3) NOT NULL,
  1600. `out_storehouse_quantity` decimal(22, 2) NOT NULL,
  1601. `from_data_id` varchar(25) NOT NULL,
  1602. `is_complete` int(1) NOT NULL DEFAULT 0,
  1603. `call_time` datetime(0) NOT NULL,
  1604. `clearing_storehouse` int(1) NOT NULL DEFAULT 0,
  1605. `tag_numbers` tinyint(1) NULL DEFAULT 0,
  1606. `user_id` int(11) NOT NULL,
  1607. PRIMARY KEY (`calculation_id`, `data_id`, `from_data_id`) USING BTREE,
  1608. INDEX `call_time`(`call_time`) USING BTREE,
  1609. UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
  1610. INDEX `affair_id`(`affair_id`, `calculation_time`, `calculation_condition`, `tagIds`, `from_data_id`) USING BTREE
  1611. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1612. -- ----------------------------
  1613. -- Table structure for t_machine_calculation
  1614. -- ----------------------------
  1615. DROP TABLE IF EXISTS `t_machine_calculation`;
  1616. CREATE TABLE `t_machine_calculation` (
  1617. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  1618. `data_id` varchar(25) NOT NULL DEFAULT '',
  1619. `affair_id` int(11) NOT NULL,
  1620. `tagIds` varchar(100) NOT NULL DEFAULT '',
  1621. `calculation_condition` varchar(120) NOT NULL ,
  1622. `call_time` datetime(0) NOT NULL,
  1623. `calculation_key` varchar(13) NOT NULL DEFAULT '',
  1624. `calculation_time` datetime(0) NOT NULL ,
  1625. `calculation_time2` datetime(0) NOT NULL ,
  1626. `product_id` int(11) NOT NULL DEFAULT 0,
  1627. `single_weight` decimal(22, 2) NULL DEFAULT 0.00 ,
  1628. `pipe_weight` decimal(22, 2) NULL DEFAULT 0.00 ,
  1629. `machine_horse` bigint(22) NULL DEFAULT NULL,
  1630. `pan_head_type` varchar(255) NULL DEFAULT NULL,
  1631. `public_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  1632. `stop_reason_id` int(11) NULL,
  1633. `object_key` varchar(25) NULL,
  1634. `calculation_value` decimal(22,2) NULL,
  1635. `needle_position` int(11) NULL,
  1636. `net_needle` int(11) NULL,
  1637. `product_specification` varchar(255) NULL DEFAULT '',
  1638. `machine_production_state` tinyint(1) NULL DEFAULT 0,
  1639. PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
  1640. INDEX `call_time`(`call_time`) USING BTREE,
  1641. UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
  1642. INDEX `calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `product_id`, `tagIds`, `calculation_time2`) USING BTREE
  1643. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1644. -- ----------------------------
  1645. -- Table structure for t_ticket_calculation
  1646. -- ----------------------------
  1647. DROP TABLE IF EXISTS `t_ticket_calculation`;
  1648. CREATE TABLE `t_ticket_calculation` (
  1649. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  1650. `data_id` varchar(25) NOT NULL DEFAULT '',
  1651. `affair_id` int(11) NOT NULL,
  1652. `tagIds` varchar(100) NOT NULL DEFAULT '',
  1653. `calculation_condition` varchar(120) NOT NULL ,
  1654. `calculation_key` varchar(13) NOT NULL DEFAULT '',
  1655. `calculation_time` datetime(0) NOT NULL ,
  1656. `calculation_value` decimal(22, 6) NOT NULL DEFAULT 0.000000 ,
  1657. `call_time` datetime(0) NOT NULL,
  1658. `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  1659. `tag_numbers` tinyint(1) NULL DEFAULT 0,
  1660. `ticket_key` varchar(13) NOT NULL DEFAULT '',
  1661. `ticket_time` datetime(0) NOT NULL ,
  1662. PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
  1663. INDEX `call_time`(`call_time`) USING BTREE,
  1664. UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
  1665. INDEX `calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `tagIds`, `ticket_key`, `ticket_time`) USING BTREE
  1666. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1667. -- ----------------------------
  1668. -- Table structure for t_customer_given
  1669. -- ----------------------------
  1670. DROP TABLE IF EXISTS `t_customer_given`;
  1671. CREATE TABLE `t_customer_given` (
  1672. `id` int(11) NOT NULL AUTO_INCREMENT,
  1673. `givenKey` varchar(50) NOT NULL,
  1674. `companyId` int(11) DEFAULT NULL,
  1675. PRIMARY KEY (`id`)
  1676. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1677. -- ----------------------------
  1678. -- Table structure for t_customer_visible
  1679. -- ----------------------------
  1680. DROP TABLE IF EXISTS `t_customer_visible`;
  1681. CREATE TABLE `t_customer_visible` (
  1682. `id` int(20) NOT NULL AUTO_INCREMENT,
  1683. `userId` int(11) NOT NULL,
  1684. `objectKey` varchar(50) NOT NULL,
  1685. `companyId` int(11) DEFAULT NULL,
  1686. PRIMARY KEY (`id`),
  1687. KEY `userId` (`userId`,`objectKey`) USING BTREE,
  1688. CONSTRAINT `t_customer_visible_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1689. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1690. -- ----------------------------
  1691. -- Table structure for t_documentary_statistics
  1692. -- ----------------------------
  1693. DROP TABLE IF EXISTS `t_documentary_statistics`;
  1694. CREATE TABLE `t_documentary_statistics` (
  1695. `statistics_id` int(11) NOT NULL AUTO_INCREMENT,
  1696. `statistics_name` varchar(20) NOT NULL DEFAULT '',
  1697. `statistics_number` int(11) NOT NULL DEFAULT 0,
  1698. `permission` tinyint(1) NULL DEFAULT 0,
  1699. `user_ids` text NULL DEFAULT NULL,
  1700. `companyId` int(11) NULL DEFAULT NULL,
  1701. PRIMARY KEY (`statistics_id`) USING BTREE
  1702. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1703. -- ----------------------------
  1704. -- Table structure for t_documentary_step
  1705. -- ----------------------------
  1706. DROP TABLE IF EXISTS `t_documentary_step`;
  1707. CREATE TABLE `t_documentary_step` (
  1708. `step_id` int(11) NOT NULL AUTO_INCREMENT,
  1709. `step_name` varchar(20) NULL DEFAULT '',
  1710. `step_number` int(11) NOT NULL,
  1711. `affairIds` text NULL DEFAULT NULL,
  1712. `companyId` int(11) NULL DEFAULT 0,
  1713. `ctime` datetime(0) NULL DEFAULT NULL,
  1714. `utime` datetime(0) NULL DEFAULT NULL,
  1715. `tag_ids` text NULL DEFAULT NULL,
  1716. PRIMARY KEY (`step_id`) USING BTREE
  1717. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1718. -- ----------------------------
  1719. -- Table structure for t_report_account
  1720. -- ----------------------------
  1721. DROP TABLE IF EXISTS `t_report_account`;
  1722. CREATE TABLE `t_report_account` (
  1723. `account_id` int(11) NOT NULL AUTO_INCREMENT,
  1724. `account_name` varchar(255) NOT NULL,
  1725. `account_bank_name` varchar(255) NULL DEFAULT '',
  1726. `account_bank_number` varchar(255) NULL DEFAULT '',
  1727. `account_cumulative` double(13, 2) NULL DEFAULT 0,
  1728. `ctime` datetime(0) NULL DEFAULT NULL,
  1729. `utime` datetime(0) NULL DEFAULT NULL,
  1730. `user_id` int(11) NULL DEFAULT NULL,
  1731. `permission` tinyint(1) NULL DEFAULT 1,
  1732. `see_user_ids` text NULL DEFAULT NULL,
  1733. PRIMARY KEY (`account_id`) USING BTREE
  1734. ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
  1735. -- ----------------------------
  1736. -- Table structure for t_inventory_frequently
  1737. -- ----------------------------
  1738. DROP TABLE IF EXISTS `t_inventory_frequently`;
  1739. CREATE TABLE `t_inventory_frequently` (
  1740. `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
  1741. `user_id` int(11) NULL DEFAULT NULL,
  1742. `inventory_user_ids` text NULL DEFAULT NULL,
  1743. `utime` varchar(25) NULL DEFAULT '',
  1744. UNIQUE INDEX `frequently_id`(`frequently_id`) USING BTREE
  1745. ) ENGINE = InnoDB ROW_FORMAT = Compact;
  1746. -- ----------------------------
  1747. -- Table structure for t_inventory_notice
  1748. -- ----------------------------
  1749. DROP TABLE IF EXISTS `t_inventory_notice`;
  1750. CREATE TABLE `t_inventory_notice` (
  1751. `notice_id` int(11) NOT NULL AUTO_INCREMENT,
  1752. `user_id` int(11) NULL DEFAULT NULL,
  1753. `data_ids` text NULL DEFAULT NULL,
  1754. `ctime` varchar(25) NULL DEFAULT '',
  1755. `content` varchar(255) NULL DEFAULT NULL,
  1756. `data_count` int(11) NULL DEFAULT NULL,
  1757. PRIMARY KEY (`notice_id`) USING BTREE,
  1758. UNIQUE INDEX `frequently_id`(`notice_id`) USING BTREE
  1759. ) ENGINE = InnoDB ROW_FORMAT = Compact;
  1760. -- ----------------------------
  1761. -- Table structure for t_inventory_notice_user
  1762. -- ----------------------------
  1763. DROP TABLE IF EXISTS `t_inventory_notice_user`;
  1764. CREATE TABLE `t_inventory_notice_user` (
  1765. `id` int(11) NOT NULL AUTO_INCREMENT,
  1766. `notice_id` int(11) NOT NULL,
  1767. `user_id` int(11) NOT NULL,
  1768. `ctime` varchar(25) NULL DEFAULT '',
  1769. `notice_state` tinyint(1) NULL DEFAULT NULL,
  1770. PRIMARY KEY (`id`) USING BTREE,
  1771. UNIQUE INDEX `id`(`id`) USING BTREE
  1772. ) ENGINE = InnoDB ROW_FORMAT = Compact;
  1773. -- ----------------------------
  1774. -- Table structure for t_screen
  1775. -- ----------------------------
  1776. DROP TABLE IF EXISTS `t_screen`;
  1777. CREATE TABLE `t_screen` (
  1778. `screen_id` int(11) NOT NULL AUTO_INCREMENT,
  1779. `user_id` int(11) NULL DEFAULT NULL,
  1780. `column_ids` text NULL DEFAULT NULL,
  1781. `utime` varchar(25) NULL DEFAULT '',
  1782. `screen_type` tinyint(1) NULL DEFAULT 1,
  1783. UNIQUE INDEX `frequently_id`(`screen_id`) USING BTREE
  1784. ) ENGINE = InnoDB ROW_FORMAT = Compact;
  1785. -- ----------------------------
  1786. -- Table structure for t_user_reminder
  1787. -- ----------------------------
  1788. DROP TABLE IF EXISTS `t_user_reminder`;
  1789. CREATE TABLE `t_user_reminder` (
  1790. `user_id` int(11) NOT NULL,
  1791. `sale_price_reminder` tinyint(1) DEFAULT 0,
  1792. `purchase_price_reminder` tinyint(1) DEFAULT 0,
  1793. `documentary_add_reminder` tinyint(1) DEFAULT 0,
  1794. `documentary_add_son_reminder` tinyint(1) DEFAULT 0,
  1795. `documentary_join_reminder` tinyint(1) DEFAULT 0,
  1796. `documentary_new_affair_join_reminder` tinyint(1) NULL DEFAULT 0,
  1797. `product_image_shear` tinyint(1) NULL DEFAULT 0,
  1798. `documentary_copy_order` tinyint(1) NULL DEFAULT 0,
  1799. `customer_tag_reminder` tinyint(1) NULL DEFAULT 0,
  1800. PRIMARY KEY (`user_id`),
  1801. UNIQUE KEY `user_id` (`user_id`) USING BTREE
  1802. ) ENGINE=InnoDB ROW_FORMAT=COMPACT;
  1803. -- ----------------------------
  1804. -- Table structure for t_notification
  1805. -- ----------------------------
  1806. DROP TABLE IF EXISTS `t_notification`;
  1807. CREATE TABLE `t_notification` (
  1808. `notification_id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT,
  1809. `notification_code` int(11) NULL,
  1810. `is_read` int(2) NULL,
  1811. `ctime` datetime(0) NULL,
  1812. PRIMARY KEY (`notification_id`)
  1813. )ENGINE=InnoDB ROW_FORMAT=COMPACT;;
  1814. -- ----------------------------
  1815. -- Table structure for t_confidential_cabinet
  1816. -- ----------------------------
  1817. DROP TABLE IF EXISTS `t_confidential_cabinet`;
  1818. CREATE TABLE `t_confidential_cabinet` (
  1819. `cabinet_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '公司单号ID',
  1820. `cabinet_name` varchar(20) NOT NULL DEFAULT '',
  1821. `permission` tinyint(1) DEFAULT 0,
  1822. `user_ids` text DEFAULT NULL,
  1823. `user_id` int(11) DEFAULT NULL,
  1824. `company_id` int(11) DEFAULT NULL,
  1825. `ctime` datetime DEFAULT NULL,
  1826. `utime` datetime DEFAULT NULL,
  1827. PRIMARY KEY (`cabinet_id`)
  1828. ) ENGINE=InnoDB;
  1829. -- ----------------------------
  1830. -- Table structure for t_confidential_lock
  1831. -- ----------------------------
  1832. DROP TABLE IF EXISTS `t_confidential_lock`;
  1833. CREATE TABLE `t_confidential_lock` (
  1834. `lock_id` int(11) NOT NULL AUTO_INCREMENT,
  1835. `lock_name` varchar(20) NOT NULL DEFAULT '',
  1836. `lock_password` varchar(50) NOT NULL DEFAULT '',
  1837. `lock_time` varchar(25) DEFAULT '',
  1838. `user_id` int(11) DEFAULT NULL,
  1839. `company_id` int(11) DEFAULT NULL,
  1840. `ctime` datetime DEFAULT NULL,
  1841. `utime` datetime DEFAULT NULL,
  1842. PRIMARY KEY (`lock_id`)
  1843. ) ENGINE=InnoDB;
  1844. -- ----------------------------
  1845. -- Table structure for t_confidential_relation
  1846. -- ----------------------------
  1847. DROP TABLE IF EXISTS `t_confidential_relation`;
  1848. CREATE TABLE `t_confidential_relation` (
  1849. `relation_id` int(11) NOT NULL AUTO_INCREMENT,
  1850. `lock_id` int(11) NOT NULL,
  1851. `cabinet_id` int(11) NOT NULL,
  1852. PRIMARY KEY (`relation_id`),
  1853. KEY `lock_id` (`lock_id`),
  1854. KEY `cabinet_id` (`cabinet_id`),
  1855. CONSTRAINT `t_confidential_relation_ibfk_1` FOREIGN KEY (`lock_id`) REFERENCES `t_confidential_lock` (`lock_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  1856. CONSTRAINT `t_confidential_relation_ibfk_2` FOREIGN KEY (`cabinet_id`) REFERENCES `t_confidential_cabinet` (`cabinet_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1857. ) ENGINE=InnoDB;
  1858. -- ----------------------------
  1859. -- Table structure for t_product_share_error
  1860. -- ----------------------------
  1861. DROP TABLE IF EXISTS `t_product_share_error`;
  1862. CREATE TABLE `t_product_share_error` (
  1863. `error_id` int(11) NOT NULL AUTO_INCREMENT,
  1864. `error_ip` varchar(30) NOT NULL DEFAULT '',
  1865. `error_number` tinyint(1) DEFAULT NULL,
  1866. `error_time` datetime DEFAULT NULL,
  1867. PRIMARY KEY (`error_id`)
  1868. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1869. -- ----------------------------
  1870. -- Table structure for t_customized
  1871. -- ----------------------------
  1872. DROP TABLE IF EXISTS `t_customized`;
  1873. CREATE TABLE `t_customized` (
  1874. `customized_id` int(11) NOT NULL AUTO_INCREMENT,
  1875. `customized_name` varchar(255) NOT NULL DEFAULT '',
  1876. `customized_shortname` varchar(255) DEFAULT '',
  1877. `customized_title` varchar(255) NOT NULL DEFAULT '',
  1878. `customized_class` varchar(255) DEFAULT '',
  1879. `customized_content` varchar(255) DEFAULT '',
  1880. `customized_type` tinyint(1) DEFAULT NULL,
  1881. `permission` tinyint(1) DEFAULT 0,
  1882. `user_ids` text DEFAULT NULL,
  1883. `ctime` datetime DEFAULT NULL,
  1884. `utime` datetime DEFAULT NULL,
  1885. `company_id` int(11) DEFAULT NULL,
  1886. `customized_other` text DEFAULT NULL,
  1887. `view_permission` tinyint(1) NULL DEFAULT 2,
  1888. `view_user_ids` text NULL,
  1889. PRIMARY KEY (`customized_id`)
  1890. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1891. -- ----------------------------
  1892. -- Table structure for t_fast_input
  1893. -- ----------------------------
  1894. DROP TABLE IF EXISTS `t_fast_input`;
  1895. CREATE TABLE `t_fast_input` (
  1896. `fast_input_id` int(11) NOT NULL AUTO_INCREMENT,
  1897. `customized_id` int(11) NOT NULL,
  1898. `fast_input_number` varchar(50) NOT NULL DEFAULT '',
  1899. `fast_input_state` tinyint(1) DEFAULT 0,
  1900. `fast_input_data_ids` text NOT NULL,
  1901. `fast_input_content` text DEFAULT NULL,
  1902. `fast_input_other` longtext NULL,
  1903. `ctime` datetime DEFAULT NULL,
  1904. `utime` datetime DEFAULT NULL,
  1905. `company_id` int(11) DEFAULT NULL,
  1906. `user_id` int(11) DEFAULT NULL,
  1907. `status` int(2) NULL DEFAULT 99,
  1908. PRIMARY KEY (`fast_input_id`),
  1909. INDEX `user_id`(`status`, `customized_id`, `user_id`)
  1910. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1911. -- ----------------------------
  1912. -- Table structure for t_inventory_price_record
  1913. -- ----------------------------
  1914. DROP TABLE IF EXISTS `t_inventory_price_record`;
  1915. CREATE TABLE `t_inventory_price_record` (
  1916. `inventory_price_record_id` int(11) NOT NULL AUTO_INCREMENT,
  1917. `inventory_id` int(11) NOT NULL,
  1918. `record_time` datetime NOT NULL,
  1919. `inventory_price` double(22,6) NOT NULL,
  1920. `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  1921. `status` int(2) DEFAULT 99,
  1922. `ctime` datetime DEFAULT NULL,
  1923. `utime` datetime DEFAULT NULL,
  1924. `user_id` int(11) DEFAULT NULL,
  1925. PRIMARY KEY (`inventory_price_record_id`),
  1926. KEY `inventory_id` (`inventory_id`),
  1927. CONSTRAINT `t_inventory_price_record_ibfk_1` FOREIGN KEY (`inventory_id`) REFERENCES `t_inventory` (`inventory_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1928. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1929. -- ----------------------------
  1930. -- Table structure for t_machine_pause
  1931. -- ----------------------------
  1932. DROP TABLE IF EXISTS `t_machine_pause`;
  1933. CREATE TABLE `t_machine_pause` (
  1934. `machine_id` int(11) NOT NULL,
  1935. `ctime` datetime DEFAULT NULL,
  1936. `utime` datetime DEFAULT NULL,
  1937. `user_id` int(11) DEFAULT NULL,
  1938. `permission` tinyint(1) DEFAULT 1,
  1939. `pause_user_ids` text DEFAULT NULL,
  1940. PRIMARY KEY (`machine_id`) USING BTREE
  1941. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1942. -- ----------------------------
  1943. -- Table structure for t_machine_stop_reason
  1944. -- ----------------------------
  1945. DROP TABLE IF EXISTS `t_machine_stop_reason`;
  1946. CREATE TABLE `t_machine_stop_reason` (
  1947. `stop_reason_id` int(11) NOT NULL AUTO_INCREMENT,
  1948. `stop_reason_name` varchar(255) NOT NULL,
  1949. `ctime` datetime DEFAULT NULL,
  1950. `utime` datetime DEFAULT NULL,
  1951. `user_id` int(11) DEFAULT NULL,
  1952. `permission` tinyint(1) DEFAULT 1,
  1953. `stop_reason_user_ids` text DEFAULT NULL,
  1954. PRIMARY KEY (`stop_reason_id`) USING BTREE
  1955. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1956. -- ----------------------------
  1957. -- Table structure for t_offer_cost_float
  1958. -- ----------------------------
  1959. DROP TABLE IF EXISTS `t_offer_cost_float`;
  1960. CREATE TABLE `t_offer_cost_float` (
  1961. `offer_cost_float_id` int(11) NOT NULL AUTO_INCREMENT,
  1962. `offer_cost_float_number` double(13,2) DEFAULT 0.00,
  1963. `product_ids` text DEFAULT NULL,
  1964. `ctime` datetime DEFAULT NULL,
  1965. `utime` datetime DEFAULT NULL,
  1966. `user_id` int(11) DEFAULT NULL,
  1967. PRIMARY KEY (`offer_cost_float_id`) USING BTREE
  1968. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1969. -- ----------------------------
  1970. -- Table structure for t_offer_price
  1971. -- ----------------------------
  1972. DROP TABLE IF EXISTS `t_offer_price`;
  1973. CREATE TABLE `t_offer_price` (
  1974. `offer_price_id` int(11) NOT NULL AUTO_INCREMENT,
  1975. `offer_price_des` varchar(255) NOT NULL,
  1976. `offer_price_number` double(13,2) DEFAULT 0.00,
  1977. `ctime` datetime DEFAULT NULL,
  1978. `utime` datetime DEFAULT NULL,
  1979. `user_id` int(11) DEFAULT NULL,
  1980. `permission` tinyint(1) DEFAULT 1,
  1981. `see_user_ids` text DEFAULT NULL,
  1982. PRIMARY KEY (`offer_price_id`) USING BTREE
  1983. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1984. -- ----------------------------
  1985. -- Table structure for t_user_report_password
  1986. -- ----------------------------
  1987. DROP TABLE IF EXISTS `t_user_report_password`;
  1988. CREATE TABLE `t_user_report_password` (
  1989. `user_id` int(11) NOT NULL,
  1990. `report_password` varchar(32) NOT NULL DEFAULT '',
  1991. `report_password_type` tinyint(1) NOT NULL DEFAULT 0,
  1992. `report_password_interval` int(11) DEFAULT 0,
  1993. `use_time` datetime DEFAULT NULL,
  1994. `ctime` datetime DEFAULT NULL,
  1995. PRIMARY KEY (`user_id`) USING BTREE,
  1996. CONSTRAINT `t_user_report_password_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  1997. ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
  1998. -- ----------------------------
  1999. -- Table structure for t_user_report_password
  2000. -- ----------------------------
  2001. DROP TABLE IF EXISTS `t_product_watermark`;
  2002. CREATE TABLE `t_product_watermark` (
  2003. `watermark_id` int(11) NOT NULL AUTO_INCREMENT,
  2004. `product_id` int(11) NOT NULL,
  2005. `user_id` int(11) DEFAULT NULL,
  2006. `company_id` int(11) DEFAULT NULL,
  2007. `ctime` datetime DEFAULT NULL,
  2008. `utime` datetime DEFAULT NULL,
  2009. `watermark_name` varchar(50) DEFAULT '',
  2010. `logo_image_id` int(11) DEFAULT NULL,
  2011. `watermark_title` varchar(50) DEFAULT '',
  2012. `font_type` tinyint(1) DEFAULT 0,
  2013. `watermark_colour` varchar(50) DEFAULT '',
  2014. `transparency` int(11) DEFAULT 0,
  2015. `font_szie` int(11) DEFAULT 0,
  2016. `row_number` int(11) DEFAULT 0,
  2017. `row_spacing` int(11) DEFAULT 0,
  2018. `column_number` int(11) DEFAULT 0,
  2019. `column_spacing` int(11) DEFAULT 0,
  2020. `angle` int(11) DEFAULT 0,
  2021. PRIMARY KEY (`watermark_id`,`product_id`),
  2022. UNIQUE KEY `watermark_id` (`watermark_id`) USING BTREE,
  2023. UNIQUE KEY `product_id` (`product_id`) USING BTREE
  2024. ) ENGINE=InnoDB AUTO_INCREMENT=1 ROW_FORMAT=DYNAMIC;
  2025. -- ----------------------------
  2026. -- Table structure for t_tag_group
  2027. -- ----------------------------
  2028. DROP TABLE IF EXISTS `t_tag_group`;
  2029. CREATE TABLE `t_tag_group` (
  2030. `tag_group_id` int(11) NOT NULL AUTO_INCREMENT,
  2031. `tag_group_title` varchar(255) NOT NULL,
  2032. `tag_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  2033. `tag_category` tinyint(1) DEFAULT NULL,
  2034. `status` tinyint(1) DEFAULT 99,
  2035. `ctime` datetime DEFAULT NULL,
  2036. `utime` datetime DEFAULT NULL,
  2037. `dtime` datetime DEFAULT NULL,
  2038. PRIMARY KEY (`tag_group_id`) USING BTREE
  2039. ) ENGINE=InnoDB AUTO_INCREMENT=1 ROW_FORMAT=DYNAMIC;
  2040. -- ----------------------------
  2041. -- Table structure for t_tag_group
  2042. -- ----------------------------
  2043. DROP TABLE IF EXISTS `t_home`;
  2044. CREATE TABLE IF NOT EXISTS `t_home` (
  2045. `id` int(11) NOT NULL AUTO_INCREMENT,
  2046. `home_type_ids` longtext NOT NULL,
  2047. `user_id` int(11) DEFAULT 99,
  2048. `utime` datetime DEFAULT NULL,
  2049. PRIMARY KEY (`id`) USING BTREE
  2050. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
  2051. -- ----------------------------
  2052. -- Function structure for Fun_GetPY
  2053. -- ----------------------------
  2054. SET GLOBAL log_bin_trust_function_creators = 1;
  2055. delimiter ;;
  2056. CREATE FUNCTION IF NOT EXISTS `Fun_GetPY`(in_string VARCHAR(255) CHARSET utf8mb4)
  2057. RETURNS varchar(255) CHARSET utf8mb4
  2058. BEGIN
  2059. DECLARE tmp_str VARCHAR(255) CHARSET utf8mb4 DEFAULT '' ;
  2060. DECLARE tmp_len SMALLINT DEFAULT 0;
  2061. DECLARE tmp_loc SMALLINT DEFAULT 0;
  2062. DECLARE tmp_char VARCHAR(2) CHARSET utf8mb4 DEFAULT '';
  2063. DECLARE tmp_rs VARCHAR(255)CHARSET utf8mb4 DEFAULT '';
  2064. DECLARE tmp_cc VARCHAR(2) CHARSET utf8mb4 DEFAULT '';
  2065. SET tmp_str = in_string;
  2066. SET tmp_len = LENGTH(tmp_str);
  2067. WHILE tmp_len > 0 DO
  2068. SET tmp_char = LEFT(tmp_str,1);
  2069. SET tmp_cc = tmp_char;
  2070. SET tmp_loc=INTERVAL(CONV(HEX(tmp_char),16,10),0xB0A1,0xB0C5,0xB2C1,0xB4EE,0xB6EA,0xB7A2,0xB8C1,0xB9FE,0xBBF7,0xBFA6,0xC0AC
  2071. ,0xC2E8,0xC4C3,0xC5B6,0xC5BE,0xC6DA,0xC8BB,0xC8F6,0xCBFA,0xCDDA ,0xCEF4,0xD1B9,0xD4D1);
  2072. IF (LENGTH(tmp_char)>1 AND tmp_loc>0 AND tmp_loc<24) THEN
  2073. SELECT ELT(tmp_loc,'a','b','c','d','e','f','g','h','j','k','l','m','n','o','p','q','r','s','t','w','x','y','z') INTO tmp_cc;
  2074. END IF;
  2075. IF ASCII(tmp_cc)>96 AND ASCII(tmp_cc) <123
  2076. THEN
  2077. SET tmp_rs = CONCAT(tmp_rs,tmp_cc);
  2078. ELSE
  2079. SET tmp_rs = CONCAT(tmp_rs,tmp_char);
  2080. END IF;
  2081. SET tmp_str = SUBSTRING(tmp_str,2);
  2082. SET tmp_len = LENGTH(tmp_str);
  2083. END WHILE;
  2084. RETURN tmp_rs;
  2085. END
  2086. ;;
  2087. delimiter ;
  2088. DROP TABLE IF EXISTS `t_affair_detail`;
  2089. CREATE TABLE `t_affair_detail` (
  2090. `detail_id` int(11) NOT NULL AUTO_INCREMENT,
  2091. `detail_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  2092. `affair_id` int(11) NOT NULL,
  2093. `column_id` int(11) NOT NULL,
  2094. `is_manual` int(1) NULL DEFAULT 0,
  2095. `is_system` int(1) NULL DEFAULT 0,
  2096. PRIMARY KEY (`detail_id`) USING BTREE,
  2097. INDEX `affair_id`(`affair_id`) USING BTREE,
  2098. CONSTRAINT `t_affair_detail_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE
  2099. ) ENGINE = InnoDB AUTO_INCREMENT = 33 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2100. -- ----------------------------
  2101. -- Table structure for t_affair_detail_calculation
  2102. -- ----------------------------
  2103. DROP TABLE IF EXISTS `t_affair_detail_calculation`;
  2104. CREATE TABLE `t_affair_detail_calculation` (
  2105. `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
  2106. `detail_sub_id` int(11) NOT NULL,
  2107. `calculation_formula` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2108. `calculation_formula_title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2109. `calculation_result` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2110. `calculation_result_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2111. `calculation_result_accuracy` tinyint(1) NULL DEFAULT 0,
  2112. `all_algebras` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2113. `calculation_steps` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL,
  2114. PRIMARY KEY (`calculation_id`) USING BTREE,
  2115. INDEX `detail_sub_id`(`detail_sub_id`) USING BTREE,
  2116. CONSTRAINT `t_affair_detail_calculation_ibfk_2` FOREIGN KEY (`detail_sub_id`) REFERENCES `t_affair_detail_sub` (`detail_sub_id`) ON DELETE CASCADE ON UPDATE CASCADE
  2117. ) ENGINE = InnoDB AUTO_INCREMENT = 163 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2118. -- ----------------------------
  2119. -- Table structure for t_affair_detail_sub
  2120. -- ----------------------------
  2121. DROP TABLE IF EXISTS `t_affair_detail_sub`;
  2122. CREATE TABLE `t_affair_detail_sub` (
  2123. `detail_sub_id` int(11) NOT NULL AUTO_INCREMENT,
  2124. `detail_sub_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  2125. `detail_id` int(11) NOT NULL,
  2126. `detail_sub_column_names` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  2127. `result_column_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2128. `result_column_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2129. `detail_sub_order` int(11) NULL DEFAULT 0,
  2130. `is_horizontal` tinyint(1) NULL DEFAULT 0,
  2131. `subscript_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2132. PRIMARY KEY (`detail_sub_id`) USING BTREE,
  2133. INDEX `detail_id`(`detail_id`) USING BTREE,
  2134. CONSTRAINT `t_affair_detail_sub_ibfk_1` FOREIGN KEY (`detail_id`) REFERENCES `t_affair_detail` (`detail_id`) ON DELETE CASCADE ON UPDATE CASCADE
  2135. ) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2136. -- ----------------------------
  2137. -- Table structure for t_affair_detail_system_column
  2138. -- ----------------------------
  2139. DROP TABLE IF EXISTS `t_affair_detail_system_column`;
  2140. CREATE TABLE `t_affair_detail_system_column` (
  2141. `column_id` int(11) NOT NULL AUTO_INCREMENT,
  2142. `column_pid` int(11) NULL DEFAULT 0,
  2143. `group_id` int(11) NULL DEFAULT NULL,
  2144. `column_order` int(11) NULL DEFAULT NULL,
  2145. `column_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2146. `column_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  2147. `column_unit` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '[]',
  2148. `column_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2149. `column_control` tinyint(1) NULL DEFAULT 0,
  2150. `column_rule` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2151. `column_is_virtual` tinyint(1) NULL DEFAULT 0,
  2152. `column_unit_symbiosis` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2153. `column_detachable` tinyint(1) NULL DEFAULT 0,
  2154. `column_branch_calculation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2155. `status` tinyint(2) NULL DEFAULT NULL,
  2156. PRIMARY KEY (`column_id`, `column_name`) USING BTREE,
  2157. UNIQUE INDEX `column_name`(`column_name`) USING BTREE,
  2158. INDEX `group_id`(`group_id`) USING BTREE
  2159. ) ENGINE = InnoDB AUTO_INCREMENT = 618 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2160. -- ----------------------------
  2161. -- Table structure for t_affair_detail_system_column_group
  2162. -- ----------------------------
  2163. DROP TABLE IF EXISTS `t_affair_detail_system_column_group`;
  2164. CREATE TABLE `t_affair_detail_system_column_group` (
  2165. `group_id` int(11) NOT NULL AUTO_INCREMENT,
  2166. `group_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2167. PRIMARY KEY (`group_id`) USING BTREE
  2168. ) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2169. DROP TABLE IF EXISTS `t_inventory_detail_calculation`;
  2170. CREATE TABLE `t_inventory_detail_calculation` (
  2171. `detail_calculation_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  2172. `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2173. `warehouse_type` int(11) NOT NULL,
  2174. `common_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  2175. `detail_calculation_key` int(11) NOT NULL,
  2176. `detail_calculation_time` datetime(0) NOT NULL,
  2177. `detail_calculation_value` decimal(22, 6) NULL DEFAULT NULL,
  2178. `detail_calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2179. `user_id` int(11) NULL DEFAULT NULL,
  2180. `status` int(2) NULL DEFAULT 99,
  2181. `ctime` datetime(0) NULL DEFAULT NULL,
  2182. `call_time` datetime(0) NOT NULL,
  2183. PRIMARY KEY (`detail_calculation_id`) USING BTREE,
  2184. INDEX `inventory`(`detail_calculation_key`, `common_id`, `detail_calculation_time`) USING BTREE
  2185. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2186. -- ----------------------------
  2187. -- Table structure for t_inventory_detail_record
  2188. -- ----------------------------
  2189. DROP TABLE IF EXISTS `t_inventory_detail_record`;
  2190. CREATE TABLE `t_inventory_detail_record` (
  2191. `detail_record_id` int(11) NOT NULL AUTO_INCREMENT,
  2192. `inventory_id` int(11) NOT NULL,
  2193. `detail_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2194. `detail_record_time` datetime(0) NOT NULL,
  2195. `detail_record_value` decimal(22, 6) NOT NULL,
  2196. `detail_record_type` tinyint(1) NOT NULL DEFAULT 0,
  2197. `detail_diff_value` decimal(22, 6) NULL DEFAULT NULL,
  2198. `transfer_in_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2199. `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2200. `user_id` int(11) NULL DEFAULT NULL,
  2201. `status` int(2) NULL DEFAULT 99,
  2202. `ctime` datetime(0) NULL DEFAULT NULL,
  2203. `utime` datetime(0) NULL DEFAULT NULL,
  2204. PRIMARY KEY (`detail_record_id`) USING BTREE
  2205. ) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2206. -- ----------------------------
  2207. -- Table structure for t_inventory_detail_sub_record
  2208. -- ----------------------------
  2209. DROP TABLE IF EXISTS `t_inventory_detail_sub_record`;
  2210. CREATE TABLE `t_inventory_detail_sub_record` (
  2211. `detail_sub_record_id` int(11) NOT NULL AUTO_INCREMENT,
  2212. `detail_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  2213. `detail_sub_qrcode_id` int(11) NOT NULL,
  2214. `detail_sub_record_time` datetime(0) NOT NULL,
  2215. `detail_sub_record_value` decimal(22, 6) NOT NULL,
  2216. `detail_sub_record_type` tinyint(1) NOT NULL DEFAULT 0,
  2217. `detail_sub_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  2218. `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2219. `user_id` int(11) NULL DEFAULT NULL,
  2220. `status` int(2) NULL DEFAULT 99,
  2221. `ctime` datetime(0) NULL DEFAULT NULL,
  2222. `utime` datetime(0) NULL DEFAULT NULL,
  2223. PRIMARY KEY (`detail_sub_record_id`) USING BTREE
  2224. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2225. -- ----------------------------
  2226. -- Table structure for t_inventory_fast
  2227. -- ----------------------------
  2228. DROP TABLE IF EXISTS `t_inventory_fast`;
  2229. CREATE TABLE `t_inventory_fast` (
  2230. `inventory_fast_id` int(11) NOT NULL AUTO_INCREMENT,
  2231. `affair_id` int(11) NOT NULL,
  2232. `inventory_fast_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  2233. `inventory_fast_data_ids` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  2234. `inventory_fast_content` text CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
  2235. `notice_affair_id` int(11) NULL DEFAULT NULL,
  2236. `from_affair_id` int(11) NULL DEFAULT NULL,
  2237. `from_affair_data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
  2238. `requirement_quantity` decimal(22, 6) NULL DEFAULT NULL,
  2239. `requirement_quantity_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '',
  2240. `requirement_note` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  2241. `requirement_voice` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2242. `synchronous_quantity` decimal(22, 6) NULL DEFAULT NULL,
  2243. `synchronous_quantity_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '',
  2244. `ctime` datetime(0) NULL DEFAULT NULL,
  2245. `utime` datetime(0) NULL DEFAULT NULL,
  2246. `company_id` int(11) NULL DEFAULT NULL,
  2247. `user_id` int(11) NULL DEFAULT NULL,
  2248. `status` int(2) NULL DEFAULT 99,
  2249. PRIMARY KEY (`inventory_fast_id`) USING BTREE,
  2250. INDEX `status`(`status`, `affair_id`, `user_id`) USING BTREE
  2251. ) ENGINE = InnoDB AUTO_INCREMENT = 111 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
  2252. -- ----------------------------
  2253. -- Table structure for t_inventory_notice_affair
  2254. -- ----------------------------
  2255. DROP TABLE IF EXISTS `t_inventory_notice_affair`;
  2256. CREATE TABLE `t_inventory_notice_affair` (
  2257. `notice_affair_id` int(11) NOT NULL AUTO_INCREMENT,
  2258. `affair_id` int(11) NOT NULL,
  2259. `from_affair_id` int(11) NOT NULL,
  2260. `from_affair_data_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  2261. `notice_state` tinyint(1) NULL DEFAULT 0,
  2262. `requirement_quantity` decimal(22, 6) NULL DEFAULT NULL,
  2263. `requirement_quantity_unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2264. `requirement_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2265. `requirement_voice` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2266. `allow_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2267. `ignore_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2268. `user_id` int(11) NULL DEFAULT NULL,
  2269. `ctime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  2270. PRIMARY KEY (`notice_affair_id`) USING BTREE,
  2271. UNIQUE INDEX `id`(`notice_affair_id`) USING BTREE
  2272. ) ENGINE = InnoDB AUTO_INCREMENT = 1567 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Compact;
  2273. DROP TABLE IF EXISTS `t_link_set`;
  2274. CREATE TABLE `t_link_set` (
  2275. `id` int(11) NOT NULL AUTO_INCREMENT,
  2276. `utime` datetime(0) NULL DEFAULT NULL,
  2277. `manual_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2278. `replace_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2279. `multiplex_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2280. `print_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2281. PRIMARY KEY (`id`) USING BTREE
  2282. ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2283. SET FOREIGN_KEY_CHECKS = 1;