12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243 |
- /*
- Navicat Premium Dump SQL
- Source Server : dev32&dev4.hlace.com-mariadb
- Source Server Type : MariaDB
- Source Server Version : 110602 (11.6.2-MariaDB)
- Source Host : localhost:3306
- Source Schema : dev32
- Target Server Type : MariaDB
- Target Server Version : 110602 (11.6.2-MariaDB)
- File Encoding : 65001
- Date: 20/03/2025 11:02:17
- */
- SET NAMES utf8mb4;
- SET FOREIGN_KEY_CHECKS = 0;
- -- ----------------------------
- -- Table structure for t_achievements
- -- ----------------------------
- DROP TABLE IF EXISTS `t_achievements`;
- CREATE TABLE `t_achievements` (
- `achievements_id` int(11) NOT NULL AUTO_INCREMENT,
- `total_goal` double(22, 0) NOT NULL,
- `no_customer_tag` double(5, 2) NULL DEFAULT 0.00,
- `customer_tag` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`achievements_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_achievements_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_achievements_group`;
- CREATE TABLE `t_achievements_group` (
- `achievements_group_id` int(11) NOT NULL AUTO_INCREMENT,
- `group_total_goal` double(22, 0) NOT NULL,
- `achievements_group_title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `achievements_group_users` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`achievements_group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair`;
- CREATE TABLE `t_affair` (
- `affair_id` int(11) NOT NULL AUTO_INCREMENT,
- `affair_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `affair_icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `affair_tablename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `affair_is_buildin` tinyint(255) NULL DEFAULT NULL,
- `affair_group_id` int(11) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `lock_time` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `lock_user` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`affair_id`) USING BTREE,
- UNIQUE INDEX `affair_name`(`affair_name` ASC) USING BTREE,
- INDEX `affair_group_id`(`affair_group_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_ibfk_1` FOREIGN KEY (`affair_group_id`) REFERENCES `t_affair_group` (`affair_group_id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_bar
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_bar`;
- CREATE TABLE `t_affair_bar` (
- `bar_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL,
- `affairIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `affair_category` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`bar_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_bar_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_calculation`;
- CREATE TABLE `t_affair_calculation` (
- `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
- `affair_id` int(11) NOT NULL,
- `calculation_formula` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `calculation_formula_title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `calculation_result` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `calculation_result_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `calculation_result_accuracy` tinyint(1) NULL DEFAULT 0,
- `all_algebras` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `calculation_steps` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `calculation_rounding` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`calculation_id`) USING BTREE,
- INDEX `affair_id`(`affair_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_calculation_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_frequently
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_frequently`;
- CREATE TABLE `t_affair_frequently` (
- `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL,
- `affair_id` int(11) NOT NULL,
- `ctime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`frequently_id`) USING BTREE,
- INDEX `affair_id`(`affair_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_frequently_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_affair_frequently_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_group`;
- CREATE TABLE `t_affair_group` (
- `affair_group_id` int(11) NOT NULL AUTO_INCREMENT,
- `affair_group_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `affair_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`affair_group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_modify_record
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_modify_record`;
- CREATE TABLE `t_affair_modify_record` (
- `record_id` int(11) NOT NULL AUTO_INCREMENT,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `affair_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `record_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `ctime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `type` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`record_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_modify_record_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_rule
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_rule`;
- CREATE TABLE `t_affair_rule` (
- `rule_id` int(11) NOT NULL AUTO_INCREMENT,
- `affair_id` int(11) NULL DEFAULT NULL,
- `sheet_id` int(11) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `rule_allow_use` tinyint(1) NULL DEFAULT 0,
- `rule_allow_view` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`rule_id`) USING BTREE,
- INDEX `sheet_id`(`sheet_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_rule_ibfk_1` FOREIGN KEY (`sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE RESTRICT
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_sheet
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_sheet`;
- CREATE TABLE `t_affair_sheet` (
- `sheet_id` int(11) NOT NULL AUTO_INCREMENT,
- `sheet_prev_id` int(11) NULL DEFAULT NULL,
- `sheet_next_id` int(11) NULL DEFAULT NULL,
- `affair_id` int(11) NOT NULL,
- `sheet_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `sheet_tablename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `sheet_rule_use_option` tinyint(1) NULL DEFAULT NULL,
- `sheet_rule_view_option` tinyint(1) NULL DEFAULT NULL,
- `sheet_join_order` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`sheet_id`) USING BTREE,
- INDEX `affair_id`(`affair_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_sheet_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_sheet_column
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_sheet_column`;
- CREATE TABLE `t_affair_sheet_column` (
- `sheet_column_id` int(11) NOT NULL AUTO_INCREMENT,
- `sheet_column_pid` int(11) NULL DEFAULT 0,
- `column_id` int(11) NULL DEFAULT NULL,
- `sheet_id` int(11) NULL DEFAULT NULL,
- `sheet_group_id` int(11) NULL DEFAULT NULL,
- `column_is_require` tinyint(1) NULL DEFAULT 0,
- `column_is_summary` tinyint(1) NULL DEFAULT 0,
- `column_order` int(11) NULL DEFAULT 0,
- PRIMARY KEY (`sheet_column_id`) USING BTREE,
- INDEX `sheet_id`(`sheet_id` ASC) USING BTREE,
- INDEX `system_column_id`(`column_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_sheet_column_ibfk_1` FOREIGN KEY (`sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_affair_sheet_column_ibfk_2` FOREIGN KEY (`column_id`) REFERENCES `t_affair_system_column` (`column_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_sheet_column_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_sheet_column_group`;
- CREATE TABLE `t_affair_sheet_column_group` (
- `sheet_group_id` int(11) NOT NULL AUTO_INCREMENT,
- `sheet_group_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `sheet_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`sheet_group_id`) USING BTREE,
- INDEX `sheet_id`(`sheet_id` ASC) USING BTREE,
- CONSTRAINT `t_affair_sheet_column_group_ibfk_1` FOREIGN KEY (`sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE RESTRICT
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_system_column
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_system_column`;
- CREATE TABLE `t_affair_system_column` (
- `column_id` int(11) NOT NULL AUTO_INCREMENT,
- `column_pid` int(11) NULL DEFAULT 0,
- `group_id` int(11) NULL DEFAULT NULL,
- `column_order` int(11) NULL DEFAULT NULL,
- `column_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `column_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `column_unit` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '[]',
- `column_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `column_control` tinyint(1) NULL DEFAULT 0,
- `column_rule` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `column_is_virtual` tinyint(1) NULL DEFAULT 0,
- `column_unit_symbiosis` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `column_detachable` tinyint(1) NULL DEFAULT 0,
- `column_branch_calculation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` tinyint(255) NULL DEFAULT NULL,
- PRIMARY KEY (`column_id`) USING BTREE,
- UNIQUE INDEX `column_name`(`column_name` ASC) USING BTREE,
- INDEX `group_id`(`group_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_affair_system_column_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_affair_system_column_group`;
- CREATE TABLE `t_affair_system_column_group` (
- `group_id` int(11) NOT NULL AUTO_INCREMENT,
- `group_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_bill
- -- ----------------------------
- DROP TABLE IF EXISTS `t_bill`;
- CREATE TABLE `t_bill` (
- `bill_id` int(11) NOT NULL AUTO_INCREMENT,
- `bill_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_number_user_defined` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_count` int(11) NULL DEFAULT 0,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `permission` int(1) NULL DEFAULT 1,
- `order_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_limit` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_affair_Ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_type` tinyint(1) NULL DEFAULT 0,
- `bill_template` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_merge_condition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `bill_set_explain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '0',
- `bill_use_template` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `permission_view` tinyint(1) NULL DEFAULT 1,
- PRIMARY KEY (`bill_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_bill_order
- -- ----------------------------
- DROP TABLE IF EXISTS `t_bill_order`;
- CREATE TABLE `t_bill_order` (
- `bill_order_id` int(11) NOT NULL AUTO_INCREMENT,
- `bill_id` int(11) NULL DEFAULT NULL,
- `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `bill_order_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_affair_data_Ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `ptime` datetime NULL DEFAULT NULL,
- `bill_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `printer_status` int(1) NULL DEFAULT 0,
- `bill_order_supplement` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_order_header` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `bill_explain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `bill_object` varchar(13) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `bill_amount` decimal(18, 3) NULL DEFAULT NULL,
- `bill_pnames` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `order_first_time` datetime NULL DEFAULT NULL,
- `order_last_time` datetime NULL DEFAULT NULL,
- `stime` datetime NULL DEFAULT NULL,
- `share_user_id` int(11) NULL DEFAULT NULL,
- `order_user_id` int(11) NULL DEFAULT NULL,
- `create_bill_order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `total_affair_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `waste_user_id` int(11) NULL DEFAULT NULL,
- `wtime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`bill_order_id`) USING BTREE,
- UNIQUE INDEX `bill_order_number`(`bill_order_number` ASC) USING BTREE,
- INDEX `bill_id`(`bill_id` ASC) USING BTREE,
- INDEX `status`(`status` ASC, `bill_id` ASC) USING BTREE,
- INDEX `printer_status`(`printer_status` ASC, `bill_id` ASC) USING BTREE,
- CONSTRAINT `t_bill_order_ibfk_1` FOREIGN KEY (`bill_id`) REFERENCES `t_bill` (`bill_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_bill_permission
- -- ----------------------------
- DROP TABLE IF EXISTS `t_bill_permission`;
- CREATE TABLE `t_bill_permission` (
- `bill_per_id` int(11) NOT NULL AUTO_INCREMENT,
- `bill_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL DEFAULT 0,
- `allow` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`bill_per_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- INDEX `bill_per_id`(`bill_per_id` ASC) USING BTREE,
- INDEX `bill_id`(`bill_id` ASC) USING BTREE,
- CONSTRAINT `t_bill_permission_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_bill_permission_ibfk_3` FOREIGN KEY (`bill_id`) REFERENCES `t_bill` (`bill_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_bill_subtitle
- -- ----------------------------
- DROP TABLE IF EXISTS `t_bill_subtitle`;
- CREATE TABLE `t_bill_subtitle` (
- `bill_subtitle_id` int(11) NOT NULL AUTO_INCREMENT,
- `bill_id` int(11) NOT NULL,
- `user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `bill_subtitle_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`bill_subtitle_id`) USING BTREE,
- INDEX `bill_id`(`bill_id` ASC) USING BTREE,
- CONSTRAINT `t_bill_subtitle_ibfk_2` FOREIGN KEY (`bill_id`) REFERENCES `t_bill` (`bill_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_cas_tgt
- -- ----------------------------
- DROP TABLE IF EXISTS `t_cas_tgt`;
- CREATE TABLE `t_cas_tgt` (
- `tgt_id` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `tgt_last_used` datetime NULL DEFAULT NULL,
- `tgt_use_times` int(11) NULL DEFAULT NULL,
- `tgt_platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tgt_kick_step` int(255) NULL DEFAULT NULL,
- `ctime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`tgt_id`) USING BTREE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_cas_st
- -- ----------------------------
- DROP TABLE IF EXISTS `t_cas_st`;
- CREATE TABLE `t_cas_st` (
- `st_id` varchar(23) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `tgt_id` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `st_service` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `st_device` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `deviceId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `deviceToken` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `st_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `st_last_used` datetime NULL DEFAULT NULL,
- `st_use_times` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `dtime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `status` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`st_id`) USING BTREE,
- INDEX `tgt_id`(`tgt_id` ASC) USING BTREE,
- CONSTRAINT `t_cas_st_ibfk_1` FOREIGN KEY (`tgt_id`) REFERENCES `t_cas_tgt` (`tgt_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_collection
- -- ----------------------------
- DROP TABLE IF EXISTS `t_collection`;
- CREATE TABLE `t_collection` (
- `collection_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NOT NULL,
- `image_id` int(11) NULL DEFAULT NULL,
- `product_id` int(11) NULL DEFAULT NULL,
- `collection_image_id` int(11) NULL DEFAULT NULL,
- `collection_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_pname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `collection_cname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `collection_type` tinyint(2) NOT NULL DEFAULT 0,
- `collection_state` tinyint(2) NULL DEFAULT 0,
- `collection_price` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `collection_price_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `collection_inventory` decimal(13, 3) NULL DEFAULT NULL,
- `collection_inventory_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_width` decimal(13, 2) NULL DEFAULT NULL,
- `collection_width_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_height` decimal(13, 2) NULL DEFAULT NULL,
- `collection_height_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_freeheight` decimal(13, 2) NULL DEFAULT NULL,
- `collection_freeheight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_weight` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_weight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `collection_elasticity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `collection_mtype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_material` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NOT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- `status` tinyint(2) NOT NULL DEFAULT 99,
- `collection_gram_weight` decimal(13, 2) NULL DEFAULT NULL,
- `collection_gram_weight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT 'g/m2',
- `collection_tag_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_cloth_price_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `product_product_price_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `product_cloth_price` decimal(13, 2) NULL DEFAULT NULL,
- `product_product_price` decimal(13, 2) NULL DEFAULT NULL,
- `push_result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `recv_result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `search_id` int(10) UNSIGNED NULL DEFAULT NULL,
- `search_status` int(1) NULL DEFAULT NULL,
- PRIMARY KEY (`collection_id`) USING BTREE,
- INDEX `image_id`(`image_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- INDEX `company_id`(`company_id` ASC) USING BTREE,
- FULLTEXT INDEX `collection_pname`(`collection_pname`),
- FULLTEXT INDEX `collection_cname`(`collection_cname`),
- CONSTRAINT `t_collection_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT `t_collection_ibfk_3` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_company
- -- ----------------------------
- DROP TABLE IF EXISTS `t_company`;
- CREATE TABLE `t_company` (
- `company_id` int(11) NOT NULL AUTO_INCREMENT,
- `location_id` int(11) NULL DEFAULT NULL,
- `company_type` tinyint(1) NULL DEFAULT 0,
- `company_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `company_shortname` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `company_major` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_urlname` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_cert` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_tel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_fax` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_qq` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `company_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_ctime` date NULL DEFAULT NULL,
- `company_addr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_corporation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_copy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `company_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `viewtimes` int(11) NULL DEFAULT 0,
- `company_follows` int(255) NULL DEFAULT 0,
- `is_vip` tinyint(1) NULL DEFAULT 0,
- `status` int(255) NULL DEFAULT 0,
- `ctime` datetime NOT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- `tagIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customerGroupId` int(11) NULL DEFAULT 0,
- `company_program` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `version` int(11) NULL DEFAULT NULL,
- `company_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`company_id`) USING BTREE,
- INDEX `FK_Reference_29`(`location_id` ASC) USING BTREE,
- INDEX `customerGroupId`(`customerGroupId` ASC) USING BTREE,
- INDEX `company_name`(`company_name` ASC) USING BTREE,
- INDEX `company_shortname`(`company_shortname` ASC) USING BTREE,
- INDEX `company_urlname`(`company_urlname` ASC) USING BTREE,
- CONSTRAINT `FK_Reference_29` FOREIGN KEY (`location_id`) REFERENCES `t_location` (`location_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
- CONSTRAINT `t_company_ibfk_1` FOREIGN KEY (`customerGroupId`) REFERENCES `t_customer_group` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_confidential_cabinet
- -- ----------------------------
- DROP TABLE IF EXISTS `t_confidential_cabinet`;
- CREATE TABLE `t_confidential_cabinet` (
- `cabinet_id` int(11) NOT NULL AUTO_INCREMENT,
- `cabinet_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `permission` tinyint(1) NULL DEFAULT 0,
- `user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`cabinet_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_confidential_lock
- -- ----------------------------
- DROP TABLE IF EXISTS `t_confidential_lock`;
- CREATE TABLE `t_confidential_lock` (
- `lock_id` int(11) NOT NULL AUTO_INCREMENT,
- `lock_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `lock_password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `lock_time` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`lock_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_confidential_relation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_confidential_relation`;
- CREATE TABLE `t_confidential_relation` (
- `relation_id` int(11) NOT NULL AUTO_INCREMENT,
- `lock_id` int(11) NOT NULL,
- `cabinet_id` int(11) NOT NULL,
- PRIMARY KEY (`relation_id`) USING BTREE,
- INDEX `lock_id`(`lock_id` ASC) USING BTREE,
- INDEX `cabinet_id`(`cabinet_id` ASC) USING BTREE,
- CONSTRAINT `t_confidential_relation_ibfk_1` FOREIGN KEY (`lock_id`) REFERENCES `t_confidential_lock` (`lock_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_confidential_relation_ibfk_2` FOREIGN KEY (`cabinet_id`) REFERENCES `t_confidential_cabinet` (`cabinet_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customer
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customer`;
- CREATE TABLE `t_customer` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `companyId` int(11) NOT NULL DEFAULT 0,
- `addUserId` int(11) NOT NULL,
- `customerCompanyId` int(11) NULL DEFAULT NULL,
- `avatarImageId` int(11) NULL DEFAULT NULL,
- `avatarImage` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customer_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customer_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customer_qq` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customer_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customer_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tagIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `visitUserIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `state` int(11) NULL DEFAULT 0,
- `status` int(11) NULL DEFAULT 99,
- `createAt` datetime NULL DEFAULT NULL,
- `updateAt` datetime NULL DEFAULT NULL,
- `deleteAt` datetime NULL DEFAULT NULL,
- `groupId` int(11) NULL DEFAULT NULL,
- `card1ImageId` int(11) NULL DEFAULT NULL,
- `card2ImageId` int(11) NULL DEFAULT NULL,
- `card3ImageId` int(11) NULL DEFAULT NULL,
- `representative` tinyint(1) NULL DEFAULT 0,
- `customer_add` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customer_phone2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `customer_phone3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `companyId`(`companyId` ASC) USING BTREE,
- INDEX `t_customer_ibfk_2`(`customerCompanyId` ASC) USING BTREE,
- INDEX `id`(`id` ASC, `customerCompanyId` ASC) USING BTREE,
- INDEX `groupId`(`groupId` ASC) USING BTREE,
- CONSTRAINT `t_customer_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_customer_ibfk_2` FOREIGN KEY (`customerCompanyId`) REFERENCES `t_company` (`company_id`) ON DELETE SET NULL ON UPDATE RESTRICT,
- CONSTRAINT `t_customer_ibfk_3` FOREIGN KEY (`groupId`) REFERENCES `t_customer_group` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customer_category
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customer_category`;
- CREATE TABLE `t_customer_category` (
- `customer_category_id` int(11) NOT NULL AUTO_INCREMENT,
- `companyId` int(11) NOT NULL,
- `userId` int(11) NOT NULL,
- `customer_category_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `customer_category_notes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `usedCount` int(11) NULL DEFAULT 0,
- `status` int(11) NULL DEFAULT 99,
- `createAt` datetime NULL DEFAULT NULL,
- `updateAt` datetime NULL DEFAULT NULL,
- `deleteAt` datetime NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`customer_category_id`) USING BTREE,
- INDEX `companyId`(`companyId` ASC) USING BTREE,
- INDEX `userId`(`userId` ASC) USING BTREE,
- CONSTRAINT `t_customer_category_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_customer_category_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customer_given
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customer_given`;
- CREATE TABLE `t_customer_given` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `givenKey` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `companyId` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customer_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customer_group`;
- CREATE TABLE `t_customer_group` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `companyId` int(11) NOT NULL,
- `userId` int(11) NOT NULL,
- `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `usedCount` int(11) NULL DEFAULT 0,
- `status` int(11) NULL DEFAULT 99,
- `createAt` datetime NULL DEFAULT NULL,
- `updateAt` datetime NULL DEFAULT NULL,
- `deleteAt` datetime NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customer_category_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `companyId`(`companyId` ASC) USING BTREE,
- INDEX `userId`(`userId` ASC) USING BTREE,
- CONSTRAINT `t_customer_group_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_customer_group_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customer_visible
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customer_visible`;
- CREATE TABLE `t_customer_visible` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `userId` int(11) NOT NULL,
- `objectKey` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `companyId` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `userId`(`userId` ASC, `objectKey` ASC) USING BTREE,
- CONSTRAINT `t_customer_visible_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customized
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customized`;
- CREATE TABLE `t_customized` (
- `customized_id` int(11) NOT NULL AUTO_INCREMENT,
- `customized_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `customized_shortname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `customized_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `customized_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `customized_content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `customized_type` tinyint(1) NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 0,
- `user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `customized_other` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `view_permission` tinyint(1) NULL DEFAULT 2,
- `view_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `customized_template` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `status` int(2) NULL DEFAULT 99,
- PRIMARY KEY (`customized_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_department
- -- ----------------------------
- DROP TABLE IF EXISTS `t_department`;
- CREATE TABLE `t_department` (
- `department_id` int(255) NOT NULL AUTO_INCREMENT,
- `department_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `department_pid` int(255) NULL DEFAULT 0,
- PRIMARY KEY (`department_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_documentary
- -- ----------------------------
- DROP TABLE IF EXISTS `t_documentary`;
- CREATE TABLE `t_documentary` (
- `documentary_id` int(11) NOT NULL AUTO_INCREMENT,
- `documentary_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `documentary_number_pid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `documentary_product_id` int(11) NULL DEFAULT NULL,
- `documentary_object` varchar(13) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `documentary_state` tinyint(1) NULL DEFAULT 0,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `companyId` int(11) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`documentary_id`, `documentary_number`) USING BTREE,
- UNIQUE INDEX `documentary_number`(`documentary_number_pid` ASC, `documentary_number` ASC) USING BTREE,
- INDEX `documentary_number_pid`(`documentary_number_pid` ASC, `documentary_state` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_documentary_report
- -- ----------------------------
- DROP TABLE IF EXISTS `t_documentary_report`;
- CREATE TABLE `t_documentary_report` (
- `report_id` int(11) NOT NULL AUTO_INCREMENT,
- `documentary_data_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `reply_user_id` int(11) NULL DEFAULT NULL,
- `reply_txt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_voice` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_time` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`report_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_documentary_statistics
- -- ----------------------------
- DROP TABLE IF EXISTS `t_documentary_statistics`;
- CREATE TABLE `t_documentary_statistics` (
- `statistics_id` int(11) NOT NULL AUTO_INCREMENT,
- `statistics_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `statistics_number` int(11) NOT NULL DEFAULT 0,
- `permission` tinyint(1) NULL DEFAULT 0,
- `user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `companyId` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`statistics_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_documentary_step
- -- ----------------------------
- DROP TABLE IF EXISTS `t_documentary_step`;
- CREATE TABLE `t_documentary_step` (
- `step_id` int(11) NOT NULL AUTO_INCREMENT,
- `step_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `step_number` int(11) NOT NULL,
- `affairIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `companyId` int(11) NULL DEFAULT 0,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `tag_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`step_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_fast_input
- -- ----------------------------
- DROP TABLE IF EXISTS `t_fast_input`;
- CREATE TABLE `t_fast_input` (
- `fast_input_id` int(11) NOT NULL AUTO_INCREMENT,
- `customized_id` int(11) NOT NULL,
- `fast_input_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `fast_input_state` tinyint(1) NULL DEFAULT 0,
- `fast_input_data_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `fast_input_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `fast_input_other` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `status` int(2) NULL DEFAULT 99,
- PRIMARY KEY (`fast_input_id`) USING BTREE,
- INDEX `status`(`status` ASC, `customized_id` ASC, `user_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_file_list
- -- ----------------------------
- DROP TABLE IF EXISTS `t_file_list`;
- CREATE TABLE `t_file_list` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `pid` int(11) NULL DEFAULT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `md5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `crop` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `category` int(255) NULL DEFAULT NULL,
- `props` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `mime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `extension` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `size` int(11) NULL DEFAULT NULL,
- `type` int(255) NULL DEFAULT NULL,
- `icat` int(255) NULL DEFAULT NULL,
- `icatmp` int(255) NULL DEFAULT NULL,
- `visitimes` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- `status` int(255) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `template_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `md5`(`md5` ASC, `type` ASC, `category` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_group_position
- -- ----------------------------
- DROP TABLE IF EXISTS `t_group_position`;
- CREATE TABLE `t_group_position` (
- `position_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL,
- `groupIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `categoryIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `position_type` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`position_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC, `position_type` ASC) USING BTREE,
- CONSTRAINT `t_group_position_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_home
- -- ----------------------------
- DROP TABLE IF EXISTS `t_home`;
- CREATE TABLE `t_home` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `home_type_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_id` int(11) NULL DEFAULT 99,
- `utime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_inventory
- -- ----------------------------
- DROP TABLE IF EXISTS `t_inventory`;
- CREATE TABLE `t_inventory` (
- `inventory_id` int(11) NOT NULL AUTO_INCREMENT,
- `warehouse_product_id` int(11) NULL DEFAULT NULL,
- `warehouse_product_color` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `warehouse_product_color_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `warehouse_product_height` double(22, 2) NULL DEFAULT NULL,
- `warehouse_product_width` double(22, 2) NULL DEFAULT NULL,
- `warehouse_material_composition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `warehouse_machine_id` int(11) NULL DEFAULT NULL,
- `warehouse_storage_area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `inventory_quantity_unit` int(1) NULL DEFAULT 0,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `inventory_price_unit` tinyint(1) NULL DEFAULT NULL,
- `warehouse_collection_id` int(11) NULL DEFAULT NULL,
- `warehouse_other_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- PRIMARY KEY (`inventory_id`) USING BTREE,
- INDEX `warehouse_product_id`(`warehouse_product_id` ASC) USING BTREE,
- INDEX `warehouse_machine_id`(`warehouse_machine_id` ASC) USING BTREE,
- CONSTRAINT `t_inventory_ibfk_1` FOREIGN KEY (`warehouse_product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_inventory_ibfk_2` FOREIGN KEY (`warehouse_machine_id`) REFERENCES `t_machine` (`machine_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_inventory_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_inventory_calculation`;
- CREATE TABLE `t_inventory_calculation` (
- `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_key` int(11) NOT NULL,
- `calculation_time` datetime NOT NULL,
- `calculation_value` decimal(22, 6) NOT NULL,
- `calculation_value2` decimal(22, 6) NOT NULL,
- `calculation_condition` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `call_time` datetime NOT NULL,
- `from_affair_id` int(11) NOT NULL,
- `self_built_source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `from_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `offer_price` decimal(22, 6) NULL DEFAULT -1.000000,
- `offer_product_total_cost` decimal(22, 6) NULL DEFAULT NULL,
- `calculation_ctime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- UNIQUE INDEX `data_id`(`data_id` ASC) USING BTREE,
- INDEX `call_time`(`call_time` ASC) USING BTREE,
- INDEX `calculation_value`(`calculation_key` ASC, `calculation_time` ASC, `calculation_value` ASC, `calculation_value2` ASC, `calculation_condition` ASC, `tagIds` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_inventory_frequently
- -- ----------------------------
- DROP TABLE IF EXISTS `t_inventory_frequently`;
- CREATE TABLE `t_inventory_frequently` (
- `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `inventory_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `utime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- UNIQUE INDEX `frequently_id`(`frequently_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_inventory_notice
- -- ----------------------------
- DROP TABLE IF EXISTS `t_inventory_notice`;
- CREATE TABLE `t_inventory_notice` (
- `notice_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `data_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `data_count` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`notice_id`) USING BTREE,
- UNIQUE INDEX `frequently_id`(`notice_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_inventory_notice_user
- -- ----------------------------
- DROP TABLE IF EXISTS `t_inventory_notice_user`;
- CREATE TABLE `t_inventory_notice_user` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `notice_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `ctime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `notice_state` tinyint(1) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `id`(`id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_inventory_price_record
- -- ----------------------------
- DROP TABLE IF EXISTS `t_inventory_price_record`;
- CREATE TABLE `t_inventory_price_record` (
- `inventory_price_record_id` int(11) NOT NULL AUTO_INCREMENT,
- `inventory_id` int(11) NOT NULL,
- `record_time` datetime NOT NULL,
- `inventory_price` double(22, 6) NOT NULL,
- `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`inventory_price_record_id`) USING BTREE,
- INDEX `inventory_id`(`inventory_id` ASC) USING BTREE,
- CONSTRAINT `t_inventory_price_record_ibfk_1` FOREIGN KEY (`inventory_id`) REFERENCES `t_inventory` (`inventory_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_inventory_record
- -- ----------------------------
- DROP TABLE IF EXISTS `t_inventory_record`;
- CREATE TABLE `t_inventory_record` (
- `inventory_record_id` int(11) NOT NULL AUTO_INCREMENT,
- `inventory_id` int(11) NOT NULL,
- `record_time` datetime NOT NULL,
- `inventory_quantity` double(22, 2) NOT NULL,
- `inventory_quantity_reserve` double(22, 2) NULL DEFAULT 0.00,
- `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`inventory_record_id`) USING BTREE,
- INDEX `inventory_id`(`inventory_id` ASC) USING BTREE,
- CONSTRAINT `t_inventory_record_ibfk_1` FOREIGN KEY (`inventory_id`) REFERENCES `t_inventory` (`inventory_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_keyword_log
- -- ----------------------------
- DROP TABLE IF EXISTS `t_keyword_log`;
- CREATE TABLE `t_keyword_log` (
- `keyword_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `keyword_category` int(11) NULL DEFAULT NULL,
- `keyword_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `keyword_values` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`keyword_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- INDEX `company_id`(`company_id` ASC) USING BTREE,
- CONSTRAINT `t_keyword_log_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_keyword_log_ibfk_2` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_location
- -- ----------------------------
- DROP TABLE IF EXISTS `t_location`;
- CREATE TABLE `t_location` (
- `location_id` int(11) NOT NULL AUTO_INCREMENT,
- `location_pid` int(11) NULL DEFAULT NULL,
- `location_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `location_postnum` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `location_level` tinyint(1) NULL DEFAULT NULL,
- `location_phonenum` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`location_id`) USING BTREE,
- INDEX `FK_Reference_28`(`location_pid` ASC) USING BTREE,
- CONSTRAINT `FK_Reference_28` FOREIGN KEY (`location_pid`) REFERENCES `t_location` (`location_id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_log_edit
- -- ----------------------------
- DROP TABLE IF EXISTS `t_log_edit`;
- CREATE TABLE `t_log_edit` (
- `log_edit_id` int(11) NOT NULL AUTO_INCREMENT,
- `log_company_id` int(11) NULL DEFAULT NULL,
- `log_user_id` int(11) NULL DEFAULT NULL,
- `log_edit_clazz` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `log_edit_oldvalue` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `log_edit_newvalue` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `log_action` tinyint(1) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`log_edit_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_machine
- -- ----------------------------
- DROP TABLE IF EXISTS `t_machine`;
- CREATE TABLE `t_machine` (
- `machine_id` int(11) NOT NULL AUTO_INCREMENT,
- `machine_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `machine_horse` int(11) NULL DEFAULT 0,
- `machine_des` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `machine_state` int(2) NOT NULL DEFAULT 0,
- `affair_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pause_affair_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `model_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `status` int(2) NOT NULL DEFAULT 99,
- `ctime` datetime NOT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`machine_id`) USING BTREE,
- INDEX `machine_id`(`machine_id` ASC) USING BTREE,
- INDEX `model_name`(`model_name` ASC) USING BTREE,
- CONSTRAINT `t_machine_ibfk_1` FOREIGN KEY (`model_name`) REFERENCES `t_machine_model` (`model_name`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_machine_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_machine_calculation`;
- CREATE TABLE `t_machine_calculation` (
- `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `calculation_condition` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `call_time` datetime NOT NULL,
- `calculation_key` varchar(13) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `calculation_time` datetime NOT NULL,
- `calculation_time2` datetime NOT NULL,
- `calculation_ctime` datetime NOT NULL,
- `product_id` int(11) NOT NULL DEFAULT 0,
- `single_weight` decimal(22, 2) NULL DEFAULT 0.00,
- `pipe_weight` decimal(22, 2) NULL DEFAULT 0.00,
- `machine_horse` bigint(22) NULL DEFAULT NULL,
- `pan_head_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `public_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `stop_reason_id` int(11) NULL DEFAULT NULL,
- `object_key` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `calculation_value` decimal(22, 2) NULL DEFAULT NULL,
- `needle_position` int(11) NULL DEFAULT NULL,
- `net_needle` int(11) NULL DEFAULT NULL,
- `product_specification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `machine_production_state` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- UNIQUE INDEX `data_id`(`data_id` ASC) USING BTREE,
- INDEX `call_time`(`call_time` ASC) USING BTREE,
- INDEX ` calculation_value`(`affair_id` ASC, `calculation_key` ASC, `calculation_condition` ASC, `calculation_time` ASC, `product_id` ASC, `tagIds` ASC, `calculation_time2` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_machine_model
- -- ----------------------------
- DROP TABLE IF EXISTS `t_machine_model`;
- CREATE TABLE `t_machine_model` (
- `model_id` int(11) NOT NULL AUTO_INCREMENT,
- `model_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `model_des` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime NOT NULL,
- `utime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`model_id`) USING BTREE,
- INDEX `model_name`(`model_name` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_machine_pause
- -- ----------------------------
- DROP TABLE IF EXISTS `t_machine_pause`;
- CREATE TABLE `t_machine_pause` (
- `machine_id` int(11) NOT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `pause_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`machine_id`) USING BTREE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_machine_record
- -- ----------------------------
- DROP TABLE IF EXISTS `t_machine_record`;
- CREATE TABLE `t_machine_record` (
- `record_id` int(11) NOT NULL AUTO_INCREMENT,
- `machine_id` int(11) NOT NULL,
- `record_des` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `affair_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `change_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `production_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `stop_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `utime` datetime NOT NULL,
- `ctime` datetime NOT NULL,
- PRIMARY KEY (`record_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_machine_settings
- -- ----------------------------
- DROP TABLE IF EXISTS `t_machine_settings`;
- CREATE TABLE `t_machine_settings` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `produced_affair_id` int(11) NULL DEFAULT NULL,
- `produced_sheet_id` int(11) NULL DEFAULT NULL,
- `produced_affair_tag_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `produced_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `produced_affair_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `produced_affair_summary_permission` tinyint(1) NULL DEFAULT 1,
- `utime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `produced_sheet`(`produced_sheet_id` ASC) USING BTREE,
- INDEX `produced_affair_id`(`produced_affair_id` ASC) USING BTREE,
- CONSTRAINT `t_machine_settings_ibfk_3` FOREIGN KEY (`produced_sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_machine_settings_ibfk_4` FOREIGN KEY (`produced_affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_machine_stop_reason
- -- ----------------------------
- DROP TABLE IF EXISTS `t_machine_stop_reason`;
- CREATE TABLE `t_machine_stop_reason` (
- `stop_reason_id` int(11) NOT NULL AUTO_INCREMENT,
- `stop_reason_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `stop_reason_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`stop_reason_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_offer_cost_float
- -- ----------------------------
- DROP TABLE IF EXISTS `t_offer_cost_float`;
- CREATE TABLE `t_offer_cost_float` (
- `offer_cost_float_id` int(11) NOT NULL AUTO_INCREMENT,
- `offer_cost_float_number` double(13, 2) NULL DEFAULT 0.00,
- `product_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`offer_cost_float_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_offer_price
- -- ----------------------------
- DROP TABLE IF EXISTS `t_offer_price`;
- CREATE TABLE `t_offer_price` (
- `offer_price_id` int(11) NOT NULL AUTO_INCREMENT,
- `offer_price_des` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `offer_price_number` double(13, 2) NULL DEFAULT 0.00,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `see_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`offer_price_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_pad_home
- -- ----------------------------
- DROP TABLE IF EXISTS `t_pad_home`;
- CREATE TABLE `t_pad_home` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `home_type_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `utime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- UNIQUE INDEX `id`(`id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_pad_home_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_pattribute
- -- ----------------------------
- DROP TABLE IF EXISTS `t_pattribute`;
- CREATE TABLE `t_pattribute` (
- `pattribute_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `product_id` int(11) NOT NULL,
- `image_id` int(11) NULL DEFAULT NULL,
- `pattribute_image_id` int(11) NULL DEFAULT NULL,
- `pattribute_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_pname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `pattribute_cname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `pattribute_type` int(255) NULL DEFAULT NULL,
- `pattribute_price` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_price_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_inventory` decimal(13, 3) NULL DEFAULT NULL,
- `pattribute_inventory_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_width` decimal(13, 2) NULL DEFAULT NULL,
- `pattribute_width_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_height` decimal(13, 2) NULL DEFAULT NULL,
- `pattribute_height_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_freeheight` decimal(13, 2) NULL DEFAULT NULL,
- `pattribute_freeheight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_weight` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_weight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_elasticity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_mtype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_material` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_from` tinyint(1) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`pattribute_id`) USING BTREE,
- UNIQUE INDEX `pattribute_id`(`pattribute_id` ASC) USING BTREE,
- INDEX `product_id`(`product_id` ASC) USING BTREE,
- INDEX `image_id`(`image_id` ASC) USING BTREE,
- CONSTRAINT `t_pattribute_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_pattribute_linkman
- -- ----------------------------
- DROP TABLE IF EXISTS `t_pattribute_linkman`;
- CREATE TABLE `t_pattribute_linkman` (
- `linkman_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `pattribute_id` int(11) NULL DEFAULT NULL,
- `linkman_realname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `linkman_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `linkman_qq` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `linkman_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `linkman_rolename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`linkman_id`) USING BTREE,
- UNIQUE INDEX `linkman_id`(`linkman_id` ASC) USING BTREE,
- INDEX `pattribute_id`(`pattribute_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_pattribute_linkman_ibfk_1` FOREIGN KEY (`pattribute_id`) REFERENCES `t_pattribute` (`pattribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_pattribute_linkman_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_printer
- -- ----------------------------
- DROP TABLE IF EXISTS `t_printer`;
- CREATE TABLE `t_printer` (
- `printer_id` int(11) NOT NULL AUTO_INCREMENT,
- `need_user_id` int(11) NULL DEFAULT NULL,
- `printer_user_id` int(11) NULL DEFAULT NULL,
- `printer_type` int(11) NULL DEFAULT NULL,
- `printer_from_id` int(11) NULL DEFAULT NULL,
- `printer_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `printer_state` int(11) NULL DEFAULT 0,
- `ctime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `ptime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `ttime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `printer_page` int(11) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`printer_id`) USING BTREE,
- UNIQUE INDEX `printer_id`(`printer_id` ASC) USING BTREE,
- INDEX `need_user_id`(`need_user_id` ASC) USING BTREE,
- INDEX `printer_user_id`(`printer_user_id` ASC) USING BTREE,
- CONSTRAINT `t_printer_ibfk_1` FOREIGN KEY (`need_user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_printer_ibfk_2` FOREIGN KEY (`printer_user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_printer_frequently
- -- ----------------------------
- DROP TABLE IF EXISTS `t_printer_frequently`;
- CREATE TABLE `t_printer_frequently` (
- `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `printer_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `utime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- UNIQUE INDEX `frequently_id`(`frequently_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_printer_frequently_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_process_in_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_process_in_calculation`;
- CREATE TABLE `t_process_in_calculation` (
- `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_key` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_time` datetime NOT NULL,
- `product_id` int(11) NOT NULL,
- `collection_id` int(11) NOT NULL,
- `product_color` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `product_color_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `sale_object` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `product_width` decimal(14, 2) NOT NULL,
- `product_height` decimal(14, 2) NOT NULL,
- `machining_price` decimal(15, 5) NOT NULL,
- `calculation_condition` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `actual_in_storehouse_quantity` decimal(22, 2) NOT NULL,
- `call_time` datetime NOT NULL,
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `user_id` int(11) NOT NULL,
- `width_cloth` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `height_cloth` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_gram_weight` decimal(14, 2) NULL DEFAULT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- UNIQUE INDEX `data_id`(`data_id` ASC) USING BTREE,
- INDEX `call_time`(`call_time` ASC) USING BTREE,
- INDEX `affair_id`(`affair_id` ASC, `calculation_time` ASC, `calculation_condition` ASC, `tagIds` ASC, `calculation_key` ASC, `product_id` ASC, `product_color` ASC, `sale_object` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_process_out_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_process_out_calculation`;
- CREATE TABLE `t_process_out_calculation` (
- `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_condition` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_time` datetime NOT NULL,
- `machining_price` decimal(15, 5) NOT NULL,
- `machining_quantity` decimal(15, 2) NOT NULL,
- `machining_total_amount` decimal(15, 6) NOT NULL,
- `out_storehouse_quantity` decimal(22, 2) NOT NULL,
- `out_storehouse_weight` decimal(22, 2) NOT NULL,
- `from_data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `is_complete` int(1) NOT NULL DEFAULT 0,
- `call_time` datetime NOT NULL,
- `clearing_storehouse` int(1) NOT NULL DEFAULT 0,
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `user_id` int(11) NOT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`, `from_data_id`) USING BTREE,
- UNIQUE INDEX `data_id`(`data_id` ASC) USING BTREE,
- INDEX `call_time`(`call_time` ASC) USING BTREE,
- INDEX `affair_id`(`affair_id` ASC, `calculation_time` ASC, `calculation_condition` ASC, `tagIds` ASC, `from_data_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_product
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product`;
- CREATE TABLE `t_product` (
- `product_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NOT NULL,
- `company_type` int(11) NULL DEFAULT NULL,
- `image_id` int(11) NULL DEFAULT NULL,
- `product_image_id` int(11) NULL DEFAULT NULL,
- `product_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_pname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `product_cname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `product_type` tinyint(2) NULL DEFAULT NULL,
- `product_state` tinyint(2) NULL DEFAULT 0,
- `product_price` varchar(13) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_price_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_cloth_price` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_cloth_price_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_product_price` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_product_price_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_inventory` decimal(13, 3) NULL DEFAULT NULL,
- `product_inventory_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_width` decimal(13, 2) NULL DEFAULT NULL,
- `product_width_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_height` decimal(13, 2) NULL DEFAULT NULL,
- `product_height_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_freeheight` decimal(13, 2) NULL DEFAULT NULL,
- `product_freeheight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_weight` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `product_weight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_elasticity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_mtype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_material` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_uptime` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_uptime_density` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_uptime_density_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_chart` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `chart_image_id` int(11) NULL DEFAULT NULL,
- `chart_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_hits` int(255) NULL DEFAULT 0,
- `product_tag_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NOT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- `status` tinyint(2) NOT NULL DEFAULT 99,
- `product_exhibition_id` int(11) NULL DEFAULT NULL,
- `product_partially_id` int(11) NULL DEFAULT NULL,
- `product_beginning_id` int(11) NULL DEFAULT NULL,
- `product_gram_weight` decimal(13, 2) NULL DEFAULT NULL,
- `product_gram_weight_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT 'g/m2',
- `push_result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `recv_result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_public_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `search_id` int(10) UNSIGNED NULL DEFAULT NULL,
- `search_status` int(1) NULL DEFAULT NULL,
- `product_cabinet_id` int(11) NULL DEFAULT NULL,
- `product_partially` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`product_id`) USING BTREE,
- UNIQUE INDEX `product_id`(`product_id` ASC) USING BTREE,
- INDEX `FK_Relationship_12`(`user_id` ASC) USING BTREE,
- INDEX `ctime`(`ctime` ASC) USING BTREE,
- INDEX `status`(`status` ASC) USING BTREE,
- INDEX `company_id`(`company_id` ASC) USING BTREE,
- INDEX `image_id`(`image_id` ASC) USING BTREE,
- INDEX `product_pname`(`product_pname` ASC, `product_cname` ASC, `product_type` ASC, `status` ASC) USING BTREE,
- INDEX `product_cabinet_id`(`product_cabinet_id` ASC) USING BTREE,
- CONSTRAINT `t_product_ibfk_2` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_product_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT `t_product_ibfk_4` FOREIGN KEY (`product_cabinet_id`) REFERENCES `t_confidential_cabinet` (`cabinet_id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_product_share
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product_share`;
- CREATE TABLE `t_product_share` (
- `share_id` varchar(51) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `product_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `ctime` datetime NULL DEFAULT NULL,
- `share_time` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `imgUrl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `share_type` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `share_password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `hits` int(11) NULL DEFAULT 0,
- `permission` int(1) NULL DEFAULT 2,
- `permission_view` int(1) NULL DEFAULT 2,
- `sort_type` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`share_id`) USING BTREE,
- INDEX `share_id`(`share_id` ASC) USING BTREE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_product_share_error
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product_share_error`;
- CREATE TABLE `t_product_share_error` (
- `error_id` int(11) NOT NULL AUTO_INCREMENT,
- `error_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `error_number` tinyint(1) NULL DEFAULT NULL,
- `error_time` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`error_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_product_share_permission
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product_share_permission`;
- CREATE TABLE `t_product_share_permission` (
- `per_id` int(11) NOT NULL AUTO_INCREMENT,
- `share_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_id` int(11) NOT NULL DEFAULT 0,
- `allow` int(1) NULL DEFAULT 1,
- PRIMARY KEY (`per_id`) USING BTREE,
- INDEX `per_id`(`per_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC, `share_id` ASC) USING BTREE,
- INDEX `share_id`(`share_id` ASC, `user_id` ASC) USING BTREE,
- CONSTRAINT `t_product_share_permission_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_product_share_permission_ibfk_3` FOREIGN KEY (`share_id`) REFERENCES `t_product_share` (`share_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_product_template
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product_template`;
- CREATE TABLE `t_product_template` (
- `template_md5` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `template_imgUrl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `template_number` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `template_color` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- PRIMARY KEY (`template_md5`) USING BTREE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_product_watermark
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product_watermark`;
- CREATE TABLE `t_product_watermark` (
- `watermark_id` int(11) NOT NULL AUTO_INCREMENT,
- `product_id` int(11) NOT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `watermark_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `logo_image_id` int(11) NULL DEFAULT NULL,
- `watermark_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `font_type` tinyint(1) NULL DEFAULT 0,
- `watermark_colour` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `transparency` int(11) NULL DEFAULT 0,
- `font_szie` int(11) NULL DEFAULT 0,
- `row_number` int(11) NULL DEFAULT 0,
- `row_spacing` int(11) NULL DEFAULT 0,
- `column_number` int(11) NULL DEFAULT 0,
- `column_spacing` int(11) NULL DEFAULT 0,
- `angle` int(11) NULL DEFAULT 0,
- PRIMARY KEY (`watermark_id`, `product_id`) USING BTREE,
- UNIQUE INDEX `watermark_id`(`watermark_id` ASC) USING BTREE,
- UNIQUE INDEX `product_id`(`product_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_r_product_collection
- -- ----------------------------
- DROP TABLE IF EXISTS `t_r_product_collection`;
- CREATE TABLE `t_r_product_collection` (
- `collection_id` int(11) NOT NULL,
- `product_id` int(11) NOT NULL,
- PRIMARY KEY (`collection_id`, `product_id`) USING BTREE,
- INDEX `product_id`(`product_id` ASC) USING BTREE,
- INDEX `collection_id_2`(`collection_id` ASC) USING BTREE,
- CONSTRAINT `t_r_product_collection_ibfk_1` FOREIGN KEY (`collection_id`) REFERENCES `t_collection` (`collection_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_r_product_collection_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_report_account
- -- ----------------------------
- DROP TABLE IF EXISTS `t_report_account`;
- CREATE TABLE `t_report_account` (
- `account_id` int(11) NOT NULL AUTO_INCREMENT,
- `account_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `account_bank_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `account_bank_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `account_cumulative` double(13, 2) NULL DEFAULT 0.00,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `see_user_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`account_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_report_forms
- -- ----------------------------
- DROP TABLE IF EXISTS `t_report_forms`;
- CREATE TABLE `t_report_forms` (
- `report_forms_id` int(11) NOT NULL AUTO_INCREMENT,
- `report_forms_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_forms_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_forms_desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_forms_count` int(11) NULL DEFAULT 0,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `forms_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_forms_limit` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_forms_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `forms_affair_Ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tag_limit` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `set_begin` tinyint(1) NULL DEFAULT 2,
- `set_inventory` tinyint(1) NULL DEFAULT 2,
- `report_forms_pid` int(11) NULL DEFAULT NULL,
- `report_forms_prompt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `print_forms_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_forms_group_id` int(11) NULL DEFAULT NULL,
- `set_seal_account` tinyint(1) NULL DEFAULT 2,
- `set_achievements` tinyint(1) NULL DEFAULT 2,
- `set_company_account` tinyint(1) NULL DEFAULT 2,
- `report_forms_template` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- PRIMARY KEY (`report_forms_id`) USING BTREE,
- INDEX `report_forms_group_id`(`report_forms_group_id` ASC) USING BTREE,
- 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
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_report_forms_begin
- -- ----------------------------
- DROP TABLE IF EXISTS `t_report_forms_begin`;
- CREATE TABLE `t_report_forms_begin` (
- `begin_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `report_forms_id` int(11) NULL DEFAULT NULL,
- `begin_customer` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `begin_cumulative` double(16, 2) NULL DEFAULT NULL,
- `admission` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`begin_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- INDEX `report_forms_id`(`report_forms_id` ASC) USING BTREE,
- CONSTRAINT `t_report_forms_begin_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- 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
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_report_forms_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_report_forms_group`;
- CREATE TABLE `t_report_forms_group` (
- `report_forms_group_id` int(11) NOT NULL AUTO_INCREMENT,
- `report_forms_group_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `report_forms_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`report_forms_group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_report_forms_permission
- -- ----------------------------
- DROP TABLE IF EXISTS `t_report_forms_permission`;
- CREATE TABLE `t_report_forms_permission` (
- `report_forms_per_id` int(11) NOT NULL AUTO_INCREMENT,
- `report_forms_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL DEFAULT 0,
- PRIMARY KEY (`report_forms_per_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- INDEX `bill_per_id`(`report_forms_per_id` ASC) USING BTREE,
- INDEX `bill_id`(`report_forms_id` ASC) USING BTREE,
- CONSTRAINT `t_report_forms_permission_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- 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
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_role
- -- ----------------------------
- DROP TABLE IF EXISTS `t_role`;
- CREATE TABLE `t_role` (
- `role_id` int(11) NOT NULL AUTO_INCREMENT,
- `role_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `role_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`role_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_rule_new
- -- ----------------------------
- DROP TABLE IF EXISTS `t_rule_new`;
- CREATE TABLE `t_rule_new` (
- `rule_new_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `product_modular` tinyint(1) NULL DEFAULT 0,
- `product_modular_delete` tinyint(1) NULL DEFAULT 0,
- `product_modular_add` tinyint(1) NULL DEFAULT 0,
- `product_modular_public` tinyint(1) NULL DEFAULT 0,
- `product_modular_private` tinyint(1) NULL DEFAULT 0,
- `product_modular_supplier` tinyint(1) NULL DEFAULT 0,
- `product_modular_push` tinyint(1) NULL DEFAULT 0,
- `product_modular_template` tinyint(1) NULL DEFAULT 0,
- `product_modular_batch_share` tinyint(1) NULL DEFAULT 0,
- `material_modular` tinyint(1) NULL DEFAULT 0,
- `material_modular_edit` tinyint(1) NULL DEFAULT 0,
- `material_modular_delete` tinyint(1) NULL DEFAULT 0,
- `material_modular_push` tinyint(1) NULL DEFAULT 0,
- `documentary_modular_statistics` tinyint(1) NULL DEFAULT 0,
- `documentary_modular_remove` tinyint(1) NULL DEFAULT 0,
- `product_modular_internal_price` tinyint(1) NULL DEFAULT 0,
- `product_cost_accounting` tinyint(1) NULL DEFAULT 0,
- `product_cost_view` tinyint(1) NULL DEFAULT 0,
- `product_confidential_set` tinyint(1) NULL DEFAULT 0,
- `product_confidential_use` tinyint(1) NULL DEFAULT 0,
- `product_watermark` tinyint(1) NULL DEFAULT 0,
- `customer_modular` tinyint(1) NULL DEFAULT 0,
- `customer_modular_delete` tinyint(1) NULL DEFAULT 0,
- `customer_modular_customer_edit` tinyint(1) NULL DEFAULT 0,
- `customer_modular_company_edit` tinyint(1) NULL DEFAULT 0,
- `customer_modular_add` tinyint(1) NULL DEFAULT 0,
- `customer_modular_transfer` tinyint(1) NULL DEFAULT 0,
- `customer_modular_set_visible` tinyint(1) NULL DEFAULT 0,
- `customer_modular_group_secrecy` tinyint(1) NULL DEFAULT 0,
- `customer_modular_group` tinyint(1) NULL DEFAULT 0,
- `machine_modular` tinyint(1) NULL DEFAULT 0,
- `machine_modular_add` tinyint(1) NULL DEFAULT 0,
- `machine_modular_edit` tinyint(1) NULL DEFAULT 0,
- `machine_modular_record` tinyint(1) NULL DEFAULT 0,
- `machine_modular_wait` tinyint(1) NULL DEFAULT 0,
- `machine_modular_pause` tinyint(1) NULL DEFAULT 0,
- `shop_modular` tinyint(1) NULL DEFAULT 0,
- `shop_modular_update` tinyint(1) NULL DEFAULT 0,
- `bill_modular` tinyint(1) NULL DEFAULT 0,
- `bill_modular_waste` tinyint(1) NULL DEFAULT 0,
- `bill_modular_set` tinyint(1) NULL DEFAULT 0,
- `affair_modular` tinyint(1) NULL DEFAULT 0,
- `employee_modular` tinyint(1) NULL DEFAULT 0,
- `tag_modular` tinyint(1) NULL DEFAULT 0,
- `report_modular` tinyint(1) NULL DEFAULT 0,
- `report_modular_download` tinyint(1) NULL DEFAULT 0,
- `company_modular` tinyint(1) NULL DEFAULT 0,
- `company_modular_authentication` tinyint(1) NULL DEFAULT 0,
- `affair_recycle_bin` tinyint(1) NULL DEFAULT 0,
- `documentary_modular` tinyint(1) NULL DEFAULT 0,
- `documentary_modular_control` tinyint(1) NULL DEFAULT 0,
- `documentary_modular_report` tinyint(1) NULL DEFAULT 0,
- `print_modular` tinyint(1) NULL DEFAULT 0,
- `documentary_modular_adjustment` tinyint(1) NULL DEFAULT 0,
- `product_modular_public_see` tinyint(1) NULL DEFAULT 0,
- `product_modular_private_see` tinyint(1) NULL DEFAULT 0,
- `affair_all_modify_record_see` tinyint(1) NULL DEFAULT 0,
- `inventory_modular_edit` tinyint(1) NULL DEFAULT 0,
- `image_search` tinyint(1) NULL DEFAULT 0,
- `set_inventory` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`rule_new_id`) USING BTREE,
- UNIQUE INDEX `rule_new_id`(`rule_new_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_rule_new_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_screen
- -- ----------------------------
- DROP TABLE IF EXISTS `t_screen`;
- CREATE TABLE `t_screen` (
- `screen_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `column_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `utime` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `screen_type` tinyint(1) NULL DEFAULT 1,
- `screen_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- UNIQUE INDEX `frequently_id`(`screen_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_seal_account
- -- ----------------------------
- DROP TABLE IF EXISTS `t_seal_account`;
- CREATE TABLE `t_seal_account` (
- `seal_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NULL DEFAULT NULL,
- `content_id` int(11) NULL DEFAULT NULL,
- `content_type` tinyint(1) NULL DEFAULT 0,
- `content_time` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`seal_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_seal_account_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_shop
- -- ----------------------------
- DROP TABLE IF EXISTS `t_shop`;
- CREATE TABLE `t_shop` (
- `shop_id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) NULL DEFAULT NULL,
- `shop_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `shop_urlname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `shop_intro` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `shop_allow_subdomain` smallint(6) NULL DEFAULT 0,
- `shop_open_time` datetime NULL DEFAULT NULL,
- `shop_hits` int(255) NULL DEFAULT 0,
- `shop_wechat_hits` int(255) NULL DEFAULT 0,
- PRIMARY KEY (`shop_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_shop_product
- -- ----------------------------
- DROP TABLE IF EXISTS `t_shop_product`;
- CREATE TABLE `t_shop_product` (
- `product_id` int(11) NOT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `shop_id` int(11) NULL DEFAULT NULL,
- `product_shop_pname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_material` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_height` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_height_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_width` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_width_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_elasticity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_price_origin` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_price_origin_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_price_on_sale` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_price_on_sale_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_inventory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_shop_inventory_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_intro` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_is_promotion` int(11) NULL DEFAULT NULL,
- `product_is_order` int(255) NULL DEFAULT NULL,
- `product_on_time` datetime NULL DEFAULT NULL,
- `product_tag_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_order` int(255) NULL DEFAULT 0,
- `product_promotion` tinyint(1) NULL DEFAULT NULL,
- `product_promotion_start` datetime NULL DEFAULT NULL,
- `product_promotion_end` datetime NULL DEFAULT NULL,
- `product_shop_hits` int(255) UNSIGNED NULL DEFAULT 0,
- `product_shop_hits_weight` int(11) NULL DEFAULT 0,
- PRIMARY KEY (`product_id`) USING BTREE,
- UNIQUE INDEX `product_id`(`product_id` ASC) USING BTREE,
- CONSTRAINT `t_shop_product_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE RESTRICT
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_statement_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_statement_calculation`;
- CREATE TABLE `t_statement_calculation` (
- `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `affair_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `tagIds` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `bill_order_id` int(11) NOT NULL,
- `calculation_key` varchar(13) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `calculation_time` datetime NOT NULL,
- `calculation_value` decimal(22, 6) NOT NULL DEFAULT 0.000000,
- `calculation_condition` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_supplement` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `call_time` datetime NOT NULL,
- `calculation_senior_screen` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_account_category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_product_id` int(11) NOT NULL,
- `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_collection_id` int(11) NOT NULL,
- `day` int(11) NULL DEFAULT NULL,
- `calculation_ctime` datetime NULL DEFAULT NULL,
- `calculation_product_specification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_product_color` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_account_category_out` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `receivables_mode` tinyint(1) NOT NULL,
- `bill_order_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `bill_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `calculation_receivables_payment_category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `difference_amount` decimal(22, 8) NULL DEFAULT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- UNIQUE INDEX `data_id`(`data_id` ASC) USING BTREE,
- INDEX `bill_order_id`(`bill_order_id` ASC) USING BTREE,
- INDEX ` calculation_value`(`calculation_key` ASC, `affair_id` ASC, `calculation_time` ASC, `calculation_value` ASC, `calculation_condition` ASC, `tagIds` ASC) USING BTREE,
- INDEX `calculation_time`(`calculation_time` ASC, `affair_id` ASC, `calculation_condition` ASC, `tagIds` ASC) USING BTREE,
- INDEX `call_time`(`call_time` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_tag_frequently
- -- ----------------------------
- DROP TABLE IF EXISTS `t_tag_frequently`;
- CREATE TABLE `t_tag_frequently` (
- `frequently_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL,
- `tag_id` int(11) NOT NULL,
- `ctime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`frequently_id`) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- INDEX `tag_id`(`tag_id` ASC) USING BTREE,
- CONSTRAINT `t_tag_frequently_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_tag_frequently_ibfk_3` FOREIGN KEY (`tag_id`) REFERENCES `t_tag_list` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_tag_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_tag_group`;
- CREATE TABLE `t_tag_group` (
- `tag_group_id` int(11) NOT NULL AUTO_INCREMENT,
- `tag_group_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `tag_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tag_category` tinyint(1) NULL DEFAULT NULL,
- `status` tinyint(1) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`tag_group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_tag_list
- -- ----------------------------
- DROP TABLE IF EXISTS `t_tag_list`;
- CREATE TABLE `t_tag_list` (
- `tag_id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `tag_category` int(11) NULL DEFAULT 0,
- `tag_image_id` int(11) NULL DEFAULT NULL,
- `tag_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tag_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tag_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `used_count` int(11) NULL DEFAULT 0,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `permission` int(1) NULL DEFAULT 1,
- `necessary` int(1) NULL DEFAULT 0,
- `data_protection` int(1) NULL DEFAULT 0,
- `position` int(11) NULL DEFAULT 0,
- `permission_view` int(1) NULL DEFAULT 1,
- `tag_group_id` int(11) NULL DEFAULT 0,
- PRIMARY KEY (`tag_id`) USING BTREE,
- INDEX `t_tag_list_ibfk_1`(`tag_image_id` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_tag_list_rel
- -- ----------------------------
- DROP TABLE IF EXISTS `t_tag_list_rel`;
- CREATE TABLE `t_tag_list_rel` (
- `rel_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL,
- `tag_category` int(11) NULL DEFAULT NULL,
- `content_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `content_type` int(11) NULL DEFAULT 0,
- `tag_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`rel_id`) USING BTREE,
- INDEX `tag_id`(`tag_id` ASC) USING BTREE,
- CONSTRAINT `t_tag_list_rel_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `t_tag_list` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_tag_permission
- -- ----------------------------
- DROP TABLE IF EXISTS `t_tag_permission`;
- CREATE TABLE `t_tag_permission` (
- `per_id` int(11) NOT NULL AUTO_INCREMENT,
- `tag_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL DEFAULT 0,
- `allow` int(1) NULL DEFAULT 1,
- PRIMARY KEY (`per_id`) USING BTREE,
- INDEX `per_id`(`per_id` ASC) USING BTREE,
- INDEX `tag_id`(`tag_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_tag_permission_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `t_tag_list` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_tag_permission_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_ticket_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_ticket_calculation`;
- CREATE TABLE `t_ticket_calculation` (
- `calculation_id` int(11) NOT NULL AUTO_INCREMENT,
- `data_id` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `calculation_condition` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `calculation_key` varchar(13) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `calculation_time` datetime NOT NULL,
- `calculation_value` decimal(22, 6) NOT NULL DEFAULT 0.000000,
- `call_time` datetime NOT NULL,
- `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `ticket_key` varchar(13) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `ticket_time` datetime NOT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- UNIQUE INDEX `data_id`(`data_id` ASC) USING BTREE,
- INDEX `call_time`(`call_time` ASC) USING BTREE,
- INDEX ` calculation_value`(`affair_id` ASC, `calculation_key` ASC, `calculation_condition` ASC, `calculation_time` ASC, `tagIds` ASC, `ticket_key` ASC, `ticket_time` ASC) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_user
- -- ----------------------------
- DROP TABLE IF EXISTS `t_user`;
- CREATE TABLE `t_user` (
- `user_id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) NULL DEFAULT NULL,
- `role_id` int(11) NOT NULL,
- `location_id` int(11) NULL DEFAULT NULL,
- `department_id` int(11) NULL DEFAULT NULL,
- `user_addr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_company_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_pwdhash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_realname` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `user_gender` tinyint(1) NULL DEFAULT 1,
- `user_avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_phonenum` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_state` tinyint(1) NULL DEFAULT 0,
- `user_qq` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_uid` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `visible` tinyint(255) NULL DEFAULT NULL,
- `ctime` datetime NOT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `dtime` datetime NULL DEFAULT NULL,
- `status` decimal(2, 0) NOT NULL DEFAULT 99,
- `user_logtimes` int(11) NULL DEFAULT NULL,
- `user_lastip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_lastlogintime` datetime NULL DEFAULT NULL,
- `user_lastackqstring` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_lastackurl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `avos_session_token` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_lastacktime` datetime NULL DEFAULT NULL,
- `user_lastackdevice` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `user_signup_user_agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `auth_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `access_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tgt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `st` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `sid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `avos_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `referral_code` int(6) NULL DEFAULT NULL,
- `user_lastaddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `necessary` tinyint(1) NULL DEFAULT 0,
- `work_time` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `attendance_id` int(11) NULL DEFAULT NULL,
- `bill_header` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_header` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `report_password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `report_password_type` tinyint(1) NULL DEFAULT 0,
- `second_token` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- PRIMARY KEY (`user_id`) USING BTREE,
- INDEX `FK_Relationship_2`(`role_id` ASC) USING BTREE,
- INDEX `company_id`(`company_id` ASC) USING BTREE,
- INDEX `department_id`(`department_id` ASC) USING BTREE,
- INDEX `user_name`(`user_name` ASC) USING BTREE,
- INDEX `referral_code`(`referral_code` ASC) USING BTREE,
- INDEX `referral_code_2`(`referral_code` ASC) USING BTREE,
- INDEX `user_phonenum`(`user_phonenum` ASC) USING BTREE,
- CONSTRAINT `FK_Relationship_2` FOREIGN KEY (`role_id`) REFERENCES `t_role` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_user_ibfk_2` FOREIGN KEY (`company_id`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_user_ibfk_3` FOREIGN KEY (`department_id`) REFERENCES `t_department` (`department_id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_user_attendance
- -- ----------------------------
- DROP TABLE IF EXISTS `t_user_attendance`;
- CREATE TABLE `t_user_attendance` (
- `attendance_id` int(11) NOT NULL AUTO_INCREMENT,
- `attendance_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `attendance_time` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `monday` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `tuesday` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `wednesday` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `thursday` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `friday` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `saturday` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- `sunday` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
- PRIMARY KEY (`attendance_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_user_reminder
- -- ----------------------------
- DROP TABLE IF EXISTS `t_user_reminder`;
- CREATE TABLE `t_user_reminder` (
- `user_id` int(11) NOT NULL,
- `sale_price_reminder` tinyint(1) NULL DEFAULT 0,
- `purchase_price_reminder` tinyint(1) NULL DEFAULT 0,
- `documentary_add_reminder` tinyint(1) NULL DEFAULT 0,
- `documentary_add_son_reminder` tinyint(1) NULL DEFAULT 0,
- `documentary_join_reminder` tinyint(1) NULL DEFAULT 0,
- `documentary_new_affair_join_reminder` tinyint(1) NULL DEFAULT 0,
- `product_image_shear` tinyint(1) NULL DEFAULT 0,
- `documentary_copy_order` tinyint(1) NULL DEFAULT 0,
- `customer_tag_reminder` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`user_id`) USING BTREE,
- UNIQUE INDEX `user_id`(`user_id` ASC) USING BTREE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_user_report_password
- -- ----------------------------
- DROP TABLE IF EXISTS `t_user_report_password`;
- CREATE TABLE `t_user_report_password` (
- `user_id` int(11) NOT NULL,
- `report_password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
- `report_password_type` tinyint(1) NOT NULL DEFAULT 0,
- `report_password_interval` int(11) NULL DEFAULT 0,
- `use_time` datetime NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`user_id`) USING BTREE,
- CONSTRAINT `t_user_report_password_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_work
- -- ----------------------------
- DROP TABLE IF EXISTS `t_work`;
- CREATE TABLE `t_work` (
- `work_id` int(11) NOT NULL AUTO_INCREMENT,
- `work_pid` int(11) NULL DEFAULT NULL,
- `work_children_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `affair_id` int(11) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `work_type` int(11) NULL DEFAULT NULL,
- `reminder_id` int(11) NULL DEFAULT NULL,
- `image_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `voice_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `content_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `ctime` datetime NULL DEFAULT NULL,
- `utime` datetime NULL DEFAULT NULL,
- `work_data_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `work_object_type` tinyint(1) NULL DEFAULT 1,
- `work_object_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `work_theme` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `affair_data_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`work_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_work_frequently
- -- ----------------------------
- DROP TABLE IF EXISTS `t_work_frequently`;
- CREATE TABLE `t_work_frequently` (
- `work_frequently_id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL,
- `affair_id` int(11) NOT NULL,
- `ctime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `work_type_notice` tinyint(1) NULL DEFAULT 0,
- `work_type_instructions` tinyint(1) NULL DEFAULT 0,
- `work_type_Assign` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`work_frequently_id`) USING BTREE,
- INDEX `affair_id`(`affair_id` ASC) USING BTREE,
- INDEX `user_id`(`user_id` ASC) USING BTREE,
- CONSTRAINT `t_work_frequently_ibfk_1` FOREIGN KEY (`affair_id`) REFERENCES `t_affair` (`affair_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t_work_frequently_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_work_reminder
- -- ----------------------------
- DROP TABLE IF EXISTS `t_work_reminder`;
- CREATE TABLE `t_work_reminder` (
- `work_id` int(11) NOT NULL,
- `reply_id` int(11) NULL DEFAULT NULL,
- `set_object_type` tinyint(1) NULL DEFAULT NULL,
- `set_object_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `set_frequency` int(11) NULL DEFAULT 0,
- `set_interval` int(11) NULL DEFAULT NULL,
- `set_interval_unit` tinyint(1) NULL DEFAULT NULL,
- `reminder_object_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reminder_frequency` int(11) NULL DEFAULT 0,
- `reminder_time` datetime NULL DEFAULT NULL,
- `is_reminder` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`work_id`) USING BTREE,
- CONSTRAINT `t_work_reminder_ibfk_1` FOREIGN KEY (`work_id`) REFERENCES `t_work` (`work_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_work_reply
- -- ----------------------------
- DROP TABLE IF EXISTS `t_work_reply`;
- CREATE TABLE `t_work_reply` (
- `reply_id` int(11) NOT NULL AUTO_INCREMENT,
- `reply_pid` int(11) NULL DEFAULT NULL,
- `work_id` int(11) NULL DEFAULT NULL,
- `reply_user_id` int(11) NULL DEFAULT NULL,
- `reply_txt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_affair_old_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_affair_new_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_time` datetime NULL DEFAULT NULL,
- `reply_object_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_voice` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `reply_content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- PRIMARY KEY (`reply_id`) USING BTREE,
- INDEX `work_id`(`work_id` ASC) USING BTREE,
- CONSTRAINT `t_work_reply_ibfk_1` FOREIGN KEY (`work_id`) REFERENCES `t_work` (`work_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Function structure for Fun_GetPY
- -- ----------------------------
- DROP FUNCTION IF EXISTS `Fun_GetPY`;
- delimiter ;;
- CREATE DEFINER=`root`@`%` FUNCTION `Fun_GetPY`(in_string VARCHAR(255) CHARSET utf8mb4) RETURNS varchar(255) CHARSET utf8mb4 COLLATE utf8mb4_bin
- BEGIN
- DECLARE tmp_str VARCHAR(255) CHARSET utf8mb4 DEFAULT '' ;
- DECLARE tmp_len SMALLINT DEFAULT 0;
- DECLARE tmp_loc SMALLINT DEFAULT 0;
- DECLARE tmp_char VARCHAR(2) CHARSET utf8mb4 DEFAULT '';
- DECLARE tmp_rs VARCHAR(255)CHARSET utf8mb4 DEFAULT '';
- DECLARE tmp_cc VARCHAR(2) CHARSET utf8mb4 DEFAULT '';
- SET tmp_str = in_string;
- SET tmp_len = LENGTH(tmp_str);
- WHILE tmp_len > 0 DO
- SET tmp_char = LEFT(tmp_str,1);
- SET tmp_cc = tmp_char;
- SET tmp_loc=INTERVAL(CONV(HEX(tmp_char),16,10),0xB0A1,0xB0C5,0xB2C1,0xB4EE,0xB6EA,0xB7A2,0xB8C1,0xB9FE,0xBBF7,0xBFA6,0xC0AC
- ,0xC2E8,0xC4C3,0xC5B6,0xC5BE,0xC6DA,0xC8BB,0xC8F6,0xCBFA,0xCDDA ,0xCEF4,0xD1B9,0xD4D1);
- IF (LENGTH(tmp_char)>1 AND tmp_loc>0 AND tmp_loc<24) THEN
- 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;
- END IF;
- IF ASCII(tmp_cc)>96 AND ASCII(tmp_cc) <123
- THEN
- SET tmp_rs = CONCAT(tmp_rs,tmp_cc);
- ELSE
- SET tmp_rs = CONCAT(tmp_rs,tmp_char);
- END IF;
- SET tmp_str = SUBSTRING(tmp_str,2);
- SET tmp_len = LENGTH(tmp_str);
- END WHILE;
- RETURN tmp_rs;
- END
- ;;
- delimiter ;
- SET FOREIGN_KEY_CHECKS = 1;
|