123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163 |
- SET NAMES utf8;
- 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 NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`achievements_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NOT NULL DEFAULT '',
- `achievements_group_users` text NULL DEFAULT NULL,
- PRIMARY KEY (`achievements_group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NOT NULL,
- `affair_icon` varchar(255) NULL DEFAULT NULL,
- `affair_tablename` varchar(255) 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) NULL DEFAULT NULL,
- `lock_user` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`affair_id`) USING BTREE,
- INDEX `affair_group_id`(`affair_group_id`) 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 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 NULL DEFAULT NULL,
- `utime` datetime(0) 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`) 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 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 NULL DEFAULT NULL,
- `calculation_formula_title` text NULL DEFAULT NULL,
- `calculation_result` varchar(50) NULL DEFAULT '',
- `calculation_result_title` varchar(50) NULL DEFAULT '',
- `calculation_result_accuracy` tinyint(1) NULL DEFAULT 0,
- `all_algebras` text NULL DEFAULT NULL,
- `calculation_steps` longtext NULL,
- PRIMARY KEY (`calculation_id`) USING BTREE,
- INDEX `affair_id`(`affair_id`) 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 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(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`frequently_id`) USING BTREE,
- INDEX `affair_id`(`affair_id`) USING BTREE,
- INDEX `user_id`(`user_id`) 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 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) NOT NULL,
- `affair_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`affair_group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NOT NULL,
- `affair_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `record_data` text NOT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `type` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`record_id`) USING BTREE,
- INDEX `user_id`(`user_id`) 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 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`) 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 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) NOT NULL,
- `sheet_tablename` varchar(255) 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`) 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 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`) USING BTREE,
- INDEX `column_id`(`column_id`) 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 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) NULL DEFAULT NULL,
- `sheet_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`sheet_group_id`) USING BTREE,
- INDEX `sheet_id`(`sheet_id`) 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 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) NULL DEFAULT NULL,
- `column_name` varchar(50) NULL DEFAULT NULL,
- `column_unit` varchar(500) NULL DEFAULT '[]',
- `column_type` varchar(255) NULL DEFAULT '',
- `column_control` tinyint(1) NULL DEFAULT 0,
- `column_rule` varchar(255) NULL DEFAULT NULL,
- `column_is_virtual` tinyint(1) NULL DEFAULT 0,
- `column_unit_symbiosis` varchar(50) NULL DEFAULT NULL,
- `column_detachable` tinyint(1) NULL DEFAULT 0,
- `column_branch_calculation` text COLLATE utf8_bin DEFAULT NULL,
- `status` tinyint(255) NULL DEFAULT NULL,
- PRIMARY KEY (`column_id`) USING BTREE,
- INDEX `group_id`(`group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NULL DEFAULT NULL,
- PRIMARY KEY (`group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NULL DEFAULT NULL,
- `bill_number_user_defined` varchar(255) NULL,
- `bill_title` varchar(255) NULL DEFAULT NULL,
- `bill_desc` text NULL DEFAULT NULL,
- `bill_count` int(11) NULL DEFAULT 0,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `permission` int(1) NULL DEFAULT 1,
- `order_data` text NULL DEFAULT NULL,
- `bill_limit` text NULL DEFAULT NULL,
- `bill_url` varchar(255) NULL DEFAULT NULL,
- `bill_affair_Ids` text NULL DEFAULT NULL,
- `bill_type` tinyint(1) NULL DEFAULT 0,
- `bill_template` text NULL DEFAULT NULL,
- `bill_merge_condition` varchar(255) NULL DEFAULT '',
- `bill_set_explain` varchar(255) NULL DEFAULT '0',
- `bill_use_template` text NULL,
- `permission_view` tinyint(1) NULL DEFAULT 1,
- PRIMARY KEY (`bill_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NULL DEFAULT NULL,
- `bill_order_number` varchar(255) NULL DEFAULT NULL,
- `bill_order_unit` varchar(255) NULL DEFAULT NULL,
- `bill_affair_data_Ids` text NULL,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `ptime` datetime(0) NULL DEFAULT NULL,
- `bill_data` longtext NULL,
- `printer_status` int(1) NULL DEFAULT 0,
- `bill_order_supplement` text NULL DEFAULT NULL,
- `bill_order_header` varchar(255) NULL,
- `bill_explain` varchar(255) NULL DEFAULT NULL,
- `bill_object` varchar(13) NULL,
- `bill_amount` decimal(18, 3) NULL DEFAULT NULL,
- `bill_pnames` text NULL,
- `order_first_time` datetime NULL,
- `order_last_time` datetime 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_general_ci NULL DEFAULT '',
- PRIMARY KEY (`bill_order_id`) USING BTREE,
- INDEX `bill_id`(`bill_id`) USING BTREE,
- INDEX `status`(`status`, `bill_id`) USING BTREE,
- INDEX `printer_status`(`printer_status`, `bill_id`) 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 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`) USING BTREE,
- INDEX `bill_per_id`(`bill_per_id`) USING BTREE,
- INDEX `bill_id`(`bill_id`) 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 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 NULL DEFAULT NULL,
- `bill_subtitle_name` varchar(20) NULL DEFAULT NULL,
- PRIMARY KEY (`bill_subtitle_id`) USING BTREE,
- INDEX `bill_id`(`bill_id`) 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 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) NOT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `tgt_id` varchar(24) NULL DEFAULT NULL,
- `st_service` varchar(255) NULL DEFAULT NULL,
- `st_device` varchar(255) NULL DEFAULT NULL,
- `deviceId` varchar(255) NULL DEFAULT NULL,
- `deviceToken` varchar(255) NULL DEFAULT NULL,
- `user_agent` varchar(255) NULL DEFAULT NULL,
- `st_ip` varchar(255) NULL DEFAULT NULL,
- `st_last_used` datetime(0) NULL DEFAULT NULL,
- `st_use_times` int(11) NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `dtime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `status` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`st_id`) USING BTREE,
- INDEX `tgt_id`(`tgt_id`) 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 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) NOT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `tgt_last_used` datetime(0) NULL DEFAULT NULL,
- `tgt_use_times` int(11) NULL DEFAULT NULL,
- `tgt_platform` varchar(255) NULL DEFAULT NULL,
- `tgt_kick_step` int(255) NULL DEFAULT NULL,
- `ctime` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`tgt_id`) USING BTREE
- ) ENGINE = InnoDB 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) NULL DEFAULT NULL,
- `collection_pname` varchar(255) NOT NULL,
- `collection_cname` varchar(255) NOT NULL,
- `collection_type` tinyint(2) NOT NULL DEFAULT 0,
- `collection_state` tinyint(2) NULL DEFAULT 0,
- `collection_price` varchar(255) NULL DEFAULT NULL,
- `collection_price_unit` varchar(255) NULL DEFAULT NULL,
- `collection_inventory` decimal(13, 3) NULL DEFAULT NULL,
- `collection_inventory_unit` varchar(255) NULL DEFAULT NULL,
- `collection_width` decimal(13, 2) NULL DEFAULT NULL,
- `collection_width_unit` varchar(255) NULL DEFAULT NULL,
- `collection_height` decimal(13, 2) NULL DEFAULT NULL,
- `collection_height_unit` varchar(255) NULL DEFAULT NULL,
- `collection_freeheight` decimal(13, 2) NULL DEFAULT NULL,
- `collection_freeheight_unit` varchar(255) NULL DEFAULT NULL,
- `collection_weight` varchar(255) NULL DEFAULT NULL,
- `collection_weight_unit` varchar(255) NULL DEFAULT '',
- `collection_elasticity` varchar(255) NULL DEFAULT '',
- `collection_mtype` varchar(255) NULL DEFAULT NULL,
- `collection_material` varchar(255) NULL DEFAULT NULL,
- `collection_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `collection_gram_weight` decimal(13,2) NULL DEFAULT NULL,
- `collection_gram_weight_unit` varchar(255) NULL DEFAULT 'g/m2',
- `collection_tag_ids` text NULL DEFAULT NULL,
- `product_cloth_price_unit` varchar(255) NULL DEFAULT '',
- `product_product_price_unit` varchar(255) NULL DEFAULT '',
- `product_cloth_price` decimal(13, 2) NULL DEFAULT NULL,
- `product_product_price` decimal(13, 2) NULL DEFAULT NULL,
- `push_result` longtext NULL,
- `recv_result` longtext NULL,
- `search_id` int(11) NULL,
- `search_status` int(11) NULL,
- `ctime` datetime(0) NOT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- `status` tinyint(2) NOT NULL DEFAULT 99,
- PRIMARY KEY (`collection_id`) USING BTREE,
- INDEX `image_id`(`image_id`) USING BTREE,
- INDEX `user_id`(`user_id`) USING BTREE,
- INDEX `company_id`(`company_id`) 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 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) NOT NULL,
- `company_shortname` varchar(10) NULL DEFAULT NULL,
- `company_major` varchar(255) NULL DEFAULT NULL,
- `company_urlname` varchar(10) NULL DEFAULT NULL,
- `company_cert` varchar(255) NULL DEFAULT NULL,
- `company_tel` varchar(255) NULL DEFAULT NULL,
- `company_fax` varchar(255) NULL DEFAULT NULL,
- `company_qq` varchar(255) NULL DEFAULT '',
- `company_email` varchar(255) NULL DEFAULT NULL,
- `company_ctime` date NULL DEFAULT NULL,
- `company_addr` varchar(255) NULL DEFAULT NULL,
- `company_corporation` varchar(255) NULL DEFAULT NULL,
- `company_copy` varchar(255) 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(0) NOT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- `tagIds` text NULL DEFAULT NULL,
- `customerGroupId` int(11) NULL DEFAULT 0,
- `company_program` varchar(100) NULL DEFAULT '',
- `version` int(11) NULL DEFAULT NULL,
- `company_phone` varchar(255) NULL,
- PRIMARY KEY (`company_id`) USING BTREE,
- INDEX `location_id`(`location_id`) USING BTREE,
- INDEX `customerGroupId`(`customerGroupId`) USING BTREE,
- INDEX `company_name`(`company_name`) USING BTREE,
- INDEX `company_shortname`(`company_shortname`) USING BTREE,
- INDEX `company_urlname`(`company_urlname`) 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 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) NULL DEFAULT NULL,
- `customer_name` varchar(255) NULL DEFAULT NULL,
- `customer_phone` varchar(255) NULL DEFAULT NULL,
- `customer_qq` varchar(255) NULL DEFAULT NULL,
- `customer_email` varchar(255) NULL DEFAULT NULL,
- `customer_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `tagIds` text NULL DEFAULT NULL,
- `visitUserIds` text NULL DEFAULT NULL,
- `state` int(11) NULL DEFAULT 0,
- `status` int(11) NULL DEFAULT 99,
- `createAt` datetime(0) NULL DEFAULT NULL,
- `updateAt` datetime(0) NULL DEFAULT NULL,
- `deleteAt` datetime(0) 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 NULL DEFAULT NULL,
- `customer_phone2` varchar(255) NULL DEFAULT '',
- `customer_phone3` varchar(255) NULL DEFAULT '',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `companyId`(`companyId`) USING BTREE,
- INDEX `customerCompanyId`(`customerCompanyId`) USING BTREE,
- INDEX `id`(`id`, `customerCompanyId`) USING BTREE,
- INDEX `groupId`(`groupId`) 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 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) 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(0) NULL DEFAULT NULL,
- `updateAt` datetime(0) NULL DEFAULT NULL,
- `deleteAt` datetime(0) NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `user_ids` text NULL,
- `customer_category_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `companyId`(`companyId`) USING BTREE,
- INDEX `userId`(`userId`) 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 ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customer_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customer_category`;
- CREATE TABLE IF NOT EXISTS `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 NOT NULL,
- `customer_category_notes` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
- `usedCount` int(11) DEFAULT 0,
- `status` int(11) DEFAULT 99,
- `createAt` datetime DEFAULT NULL,
- `updateAt` datetime DEFAULT NULL,
- `deleteAt` datetime DEFAULT NULL,
- `permission` tinyint(1) DEFAULT 1,
- `user_ids` text CHARACTER SET utf8mb4 DEFAULT NULL,
- PRIMARY KEY (`customer_category_id`) USING BTREE,
- KEY `companyId` (`companyId`) USING BTREE,
- KEY `userId` (`userId`) 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 DEFAULT CHARSET=utf8 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) NULL DEFAULT '',
- `department_pid` int(255) NULL DEFAULT 0,
- PRIMARY KEY (`department_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NOT NULL DEFAULT '',
- `documentary_number_pid` varchar(50) NULL DEFAULT '',
- `documentary_product_id` int(11) NULL DEFAULT NULL,
- `documentary_object` varchar(13) NOT NULL DEFAULT '',
- `documentary_summary` varchar(50) NULL DEFAULT NULL,
- `documentary_state` tinyint(1) NULL DEFAULT 0,
- `data_id` varchar(25) NULL DEFAULT '',
- `companyId` int(11) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `status` tinyint(2) NULL DEFAULT 99,
- PRIMARY KEY (`documentary_id`) USING BTREE,
- UNIQUE INDEX `documentary_number_pid` (`documentary_number_pid`, `documentary_number`) USING BTREE
- ) ENGINE = InnoDB 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) NOT NULL,
- `reply_user_id` int(11) NULL DEFAULT NULL,
- `reply_txt` varchar(255) NULL DEFAULT NULL,
- `reply_image` varchar(255) NULL DEFAULT NULL,
- `reply_voice` varchar(255) NULL DEFAULT NULL,
- `reply_time` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`report_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NULL DEFAULT NULL,
- `md5` varchar(255) NULL DEFAULT NULL,
- `crop` varchar(255) NULL DEFAULT NULL,
- `url` varchar(255) NULL DEFAULT NULL,
- `category` int(255) NULL DEFAULT NULL,
- `props` varchar(255) NULL DEFAULT NULL,
- `mime` varchar(255) NULL DEFAULT NULL,
- `extension` varchar(255) 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(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- `status` int(255) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `template_number` varchar(50) NULL DEFAULT '',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `md5`(`md5`, `type`, `category`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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 NULL DEFAULT NULL,
- `utime` datetime(0) 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`, `position_type`) 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 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) NULL DEFAULT '',
- `warehouse_product_color_number` varchar(255) 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) NULL DEFAULT '',
- `warehouse_machine_id` int(11) NULL DEFAULT NULL,
- `warehouse_storage_area` varchar(255) NULL DEFAULT '',
- `inventory_quantity_unit` int(1) NULL DEFAULT 0,
- `warehouse_other_description` varchar(255) NULL DEFAULT '',
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `inventory_price_unit` tinyint(1) NULL,
- `warehouse_collection_id` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`inventory_id`) USING BTREE,
- INDEX `warehouse_product_id`(`warehouse_product_id`) USING BTREE,
- INDEX `warehouse_machine_id`(`warehouse_machine_id`) 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 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) NOT NULL,
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) NOT NULL,
- `calculation_key` int(11) NOT NULL,
- `calculation_time` datetime(0) NOT NULL,
- `calculation_value` decimal(22, 6) NOT NULL,
- `calculation_value2` decimal(22, 6) NOT NULL,
- `calculation_condition` varchar(120) NOT NULL,
- `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- `call_time` datetime(0) NOT NULL,
- `from_affair_id` int(11) NOT NULL,
- `self_built_source` varchar(255) NOT NULL,
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `from_data_id` varchar(25) NULL DEFAULT '',
- `offer_price` decimal(22,6) NULL DEFAULT -1,
- `offer_product_total_cost` decimal(22,6) NULL,
- `calculation_ctime` datetime NULL DEFAULT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- INDEX `call_time`(`call_time`) USING BTREE,
- UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
- INDEX `calculation_value`(`calculation_key`, `calculation_time`, `calculation_value`, `calculation_value2`, `calculation_condition`, `tagIds`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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(0) 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(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `user_id` int(11) NULL,
- PRIMARY KEY (`inventory_record_id`) USING BTREE,
- INDEX `inventory_id`(`inventory_id`) 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 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) NULL DEFAULT NULL,
- `keyword_values` text NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`keyword_id`) USING BTREE,
- INDEX `user_id`(`user_id`) USING BTREE,
- INDEX `company_id`(`company_id`) 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 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) NOT NULL,
- `location_postnum` varchar(6) NULL DEFAULT NULL,
- `location_level` tinyint(1) NULL DEFAULT NULL,
- `location_phonenum` varchar(5) NULL DEFAULT NULL,
- PRIMARY KEY (`location_id`) USING BTREE,
- INDEX `location_pid`(`location_pid`) 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 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) NULL DEFAULT NULL,
- `log_edit_oldvalue` longtext NULL,
- `log_edit_newvalue` longtext NULL,
- `log_action` tinyint(1) NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`log_edit_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NOT NULL,
- `machine_horse` int(11) NULL DEFAULT 0,
- `machine_des` varchar(255) NULL DEFAULT NULL,
- `machine_state` int(2) NOT NULL DEFAULT 0,
- `affair_data_id` varchar(25) NULL DEFAULT NULL,
- `pause_affair_data_id` varchar(25) NULL DEFAULT '',
- `model_name` varchar(255) NOT NULL,
- `status` int(2) NOT NULL DEFAULT 99,
- `ctime` datetime(0) NOT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`machine_id`) USING BTREE,
- INDEX `machine_id`(`machine_id`) USING BTREE,
- INDEX `model_name`(`model_name`) 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 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) NOT NULL,
- `model_des` text NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime(0) NOT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`model_id`) USING BTREE,
- INDEX `model_name`(`model_name`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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 NULL DEFAULT NULL,
- `affair_data_id` varchar(25) NULL DEFAULT NULL,
- `change_time` varchar(50) NULL DEFAULT NULL,
- `production_time` varchar(50) NULL DEFAULT NULL,
- `stop_time` varchar(50) NULL DEFAULT NULL,
- `utime` datetime(0) NOT NULL,
- `ctime` datetime(0) NOT NULL,
- PRIMARY KEY (`record_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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 NULL DEFAULT NULL,
- `produced_user_ids` text NULL DEFAULT NULL,
- `produced_affair_summary` text NULL DEFAULT NULL,
- `produced_affair_summary_permission` tinyint(1) NULL DEFAULT 1,
- `utime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `produced_sheet`(`produced_sheet_id`) USING BTREE,
- INDEX `produced_affair_id`(`produced_affair_id`) 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 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) NULL DEFAULT NULL,
- `pattribute_pname` varchar(255) NOT NULL,
- `pattribute_cname` varchar(255) NOT NULL,
- `pattribute_type` int(255) NULL DEFAULT NULL,
- `pattribute_price` varchar(255) NULL DEFAULT NULL,
- `pattribute_price_unit` varchar(255) NULL DEFAULT NULL,
- `pattribute_inventory` decimal(13, 3) NULL DEFAULT NULL,
- `pattribute_inventory_unit` varchar(255) NULL DEFAULT NULL,
- `pattribute_width` decimal(13, 2) NULL DEFAULT NULL,
- `pattribute_width_unit` varchar(255) NULL DEFAULT NULL,
- `pattribute_height` decimal(13, 2) NULL DEFAULT NULL,
- `pattribute_height_unit` varchar(255) NULL DEFAULT NULL,
- `pattribute_freeheight` decimal(13, 2) NULL DEFAULT NULL,
- `pattribute_freeheight_unit` varchar(255) NULL DEFAULT NULL,
- `pattribute_weight` varchar(255) NULL DEFAULT NULL,
- `pattribute_weight_unit` varchar(255) NULL DEFAULT NULL,
- `pattribute_elasticity` varchar(255) NULL DEFAULT NULL,
- `pattribute_mtype` varchar(255) NULL DEFAULT NULL,
- `pattribute_material` varchar(255) NULL DEFAULT NULL,
- `pattribute_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `pattribute_address` varchar(255) NULL DEFAULT NULL,
- `pattribute_from` tinyint(1) NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`pattribute_id`) USING BTREE,
- UNIQUE INDEX `pattribute_id`(`pattribute_id`) USING BTREE,
- INDEX `product_id`(`product_id`) USING BTREE,
- INDEX `image_id`(`image_id`) 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 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) NULL DEFAULT NULL,
- `linkman_phone` varchar(255) NULL DEFAULT NULL,
- `linkman_qq` varchar(255) NULL DEFAULT NULL,
- `linkman_email` varchar(255) NULL DEFAULT NULL,
- `linkman_rolename` varchar(255) NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`linkman_id`) USING BTREE,
- UNIQUE INDEX `linkman_id`(`linkman_id`) USING BTREE,
- INDEX `pattribute_id`(`pattribute_id`) USING BTREE,
- INDEX `user_id`(`user_id`) 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 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 NULL DEFAULT NULL,
- `printer_state` int(11) NULL DEFAULT 0,
- `ctime` varchar(25) NULL DEFAULT '',
- `ptime` varchar(25) NULL DEFAULT '',
- `ttime` varchar(25) NULL DEFAULT '',
- `printer_page` int(11) NULL,
- `version` int(11) NULL,
- PRIMARY KEY (`printer_id`) USING BTREE,
- UNIQUE INDEX `printer_id`(`printer_id`) USING BTREE,
- INDEX `need_user_id`(`need_user_id`) USING BTREE,
- INDEX `printer_user_id`(`printer_user_id`) 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 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 NULL DEFAULT NULL,
- `utime` varchar(25) NULL DEFAULT '',
- UNIQUE INDEX `frequently_id`(`frequently_id`) USING BTREE,
- INDEX `user_id`(`user_id`) 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 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) NULL DEFAULT NULL,
- `product_pname` varchar(255) NOT NULL,
- `product_cname` varchar(255) NOT NULL,
- `product_type` tinyint(2) NULL DEFAULT NULL,
- `product_state` tinyint(2) NULL DEFAULT 0,
- `product_price` varchar(13) NULL DEFAULT NULL,
- `product_price_unit` varchar(255) NULL DEFAULT NULL,
- `product_cloth_price` varchar(255) NULL DEFAULT NULL,
- `product_cloth_price_unit` varchar(255) NULL DEFAULT NULL,
- `product_product_price` varchar(255) NULL DEFAULT NULL,
- `product_product_price_unit` varchar(255) NULL DEFAULT NULL,
- `product_inventory` decimal(13, 3) NULL DEFAULT NULL,
- `product_inventory_unit` varchar(255) NULL DEFAULT NULL,
- `product_width` decimal(13, 2) NULL DEFAULT NULL,
- `product_width_unit` varchar(255) NULL DEFAULT NULL,
- `product_height` decimal(13, 2) NULL DEFAULT NULL,
- `product_height_unit` varchar(255) NULL DEFAULT NULL,
- `product_freeheight` decimal(13, 2) NULL DEFAULT NULL,
- `product_freeheight_unit` varchar(255) NULL DEFAULT NULL,
- `product_weight` varchar(255) NULL DEFAULT NULL,
- `product_weight_unit` varchar(255) NULL DEFAULT NULL,
- `product_elasticity` varchar(255) NULL DEFAULT NULL,
- `product_mtype` varchar(255) NULL DEFAULT NULL,
- `product_material` varchar(255) NULL DEFAULT NULL,
- `product_uptime` text NULL DEFAULT NULL,
- `product_uptime_density` varchar(255) NULL DEFAULT NULL,
- `product_uptime_density_unit` varchar(255) NULL DEFAULT NULL,
- `product_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `product_chart` varchar(255) NULL DEFAULT NULL,
- `chart_image_id` int(11) NULL DEFAULT NULL,
- `chart_image` varchar(255) NULL DEFAULT NULL,
- `product_hits` int(255) NULL DEFAULT 0,
- `product_tag_ids` text NULL DEFAULT NULL,
- `ctime` datetime(0) NOT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) 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) NULL DEFAULT 'g/m2',
- `push_result` longtext NULL,
- `recv_result` longtext NULL,
- `product_public_notes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL,
- `search_id` int(11) NULL,
- `search_status` int(11) NULL,
- `product_cabinet_id` int(11) NULL,
- `product_partially` text CHARACTER SET utf8 NULL,
- PRIMARY KEY (`product_id`) USING BTREE,
- UNIQUE INDEX `product_id`(`product_id`) USING BTREE,
- INDEX `user_id`(`user_id`) USING BTREE,
- INDEX `ctime`(`ctime`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `company_id`(`company_id`) USING BTREE,
- INDEX `image_id`(`image_id`) USING BTREE,
- INDEX `product_pname`(`product_pname`, `product_cname`, `product_type`, `status`) 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 ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_product_share
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product_share`;
- CREATE TABLE `t_product_share` (
- `share_id` varchar(50) NOT NULL,
- `product_ids` longtext NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `company_id` int(11) NULL DEFAULT NULL,
- `title` varchar(50) NULL DEFAULT '',
- `ctime` datetime NULL,
- `share_time` varchar(25) NULL DEFAULT NULL,
- `desc` varchar(255) NULL DEFAULT NULL,
- `imgUrl` varchar(255) NULL DEFAULT NULL,
- `share_type` varchar(25) NULL DEFAULT NULL,
- `share_password` varchar(50) NULL DEFAULT NULL,
- `hits` int(11) NULL DEFAULT 0,
- `permission` int(1) NULL DEFAULT 2,
- `permission_view` int(1) NULL DEFAULT 2,
- INDEX `share_id`(`share_id`),
- PRIMARY KEY (`share_id`) USING BTREE
- ) ENGINE = InnoDB 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) NOT NULL,
- `user_id` int(11) DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `ctime` datetime DEFAULT NULL ON UPDATE current_timestamp(),
- `template_imgUrl` varchar(255) DEFAULT '',
- `template_number` varchar(25) DEFAULT '',
- `template_color` varchar(50) DEFAULT '',
- PRIMARY KEY (`template_md5`)
- ) ENGINE=InnoDB 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`) USING BTREE,
- INDEX `collection_id`(`collection_id`) 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 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) NULL DEFAULT NULL,
- `report_forms_title` varchar(255) NULL DEFAULT NULL,
- `report_forms_desc` text NULL DEFAULT NULL,
- `report_forms_count` int(11) NULL DEFAULT 0,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `forms_data` text NULL DEFAULT NULL,
- `report_forms_limit` text NULL DEFAULT NULL,
- `report_forms_url` varchar(255) NULL DEFAULT NULL,
- `forms_affair_Ids` text NULL DEFAULT NULL,
- `tag_limit` text 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) NULL DEFAULT '',
- `print_forms_data` text 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,
- PRIMARY KEY (`report_forms_id`) USING BTREE,
- INDEX `report_forms_group_id`(`report_forms_group_id`) 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 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) NULL DEFAULT NULL,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) 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`) USING BTREE,
- INDEX `report_forms_id`(`report_forms_id`) 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 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) NOT NULL,
- `report_forms_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `status` int(11) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`report_forms_group_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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`) USING BTREE,
- INDEX `bill_per_id`(`report_forms_per_id`) USING BTREE,
- INDEX `bill_id`(`report_forms_id`) 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 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) NOT NULL,
- `role_desc` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`role_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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,
- `customer_modular_group_secrecy` tinyint(1) NULL DEFAULT 0,
- `customer_modular_group` 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,
- `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,
- PRIMARY KEY (`rule_new_id`) USING BTREE,
- UNIQUE INDEX `rule_new_id`(`rule_new_id`) USING BTREE,
- INDEX `user_id`(`user_id`) 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 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) NULL DEFAULT NULL,
- PRIMARY KEY (`seal_id`) USING BTREE,
- INDEX `user_id`(`user_id`) 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 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) NULL DEFAULT NULL,
- `shop_urlname` varchar(255) NULL DEFAULT NULL,
- `shop_intro` varchar(255) NULL DEFAULT NULL,
- `shop_allow_subdomain` smallint(6) NULL DEFAULT 0,
- `shop_open_time` datetime(0) 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 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) NULL DEFAULT NULL,
- `product_shop_material` varchar(255) NULL DEFAULT NULL,
- `product_shop_height` varchar(255) NULL DEFAULT NULL,
- `product_shop_height_unit` varchar(255) NULL DEFAULT NULL,
- `product_shop_width` varchar(255) NULL DEFAULT NULL,
- `product_shop_width_unit` varchar(255) NULL DEFAULT NULL,
- `product_shop_elasticity` varchar(255) NULL DEFAULT NULL,
- `product_shop_price_origin` varchar(255) NULL DEFAULT NULL,
- `product_shop_price_origin_unit` varchar(255) NULL DEFAULT NULL,
- `product_shop_price_on_sale` varchar(255) NULL DEFAULT NULL,
- `product_shop_price_on_sale_unit` varchar(255) NULL DEFAULT NULL,
- `product_shop_inventory` varchar(255) NULL DEFAULT NULL,
- `product_shop_inventory_unit` varchar(255) NULL DEFAULT NULL,
- `product_intro` varchar(255) NULL DEFAULT NULL,
- `product_is_promotion` int(11) NULL DEFAULT NULL,
- `product_is_order` int(255) NULL DEFAULT NULL,
- `product_on_time` datetime(0) NULL DEFAULT NULL,
- `product_tag_ids` text NULL DEFAULT NULL,
- `product_order` int(255) NULL DEFAULT 0,
- `product_promotion` tinyint(1) NULL DEFAULT NULL,
- `product_promotion_start` datetime(0) NULL DEFAULT NULL,
- `product_promotion_end` datetime(0) 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`) 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 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) NOT NULL DEFAULT '',
- `affair_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `tagIds` varchar(100) NOT NULL DEFAULT '',
- `bill_order_id` int(11) NOT NULL,
- `calculation_key` varchar(13) NOT NULL DEFAULT '',
- `calculation_time` datetime(0) NOT NULL,
- `calculation_product_specification` varchar(255) NOT NULL,
- `calculation_product_color` varchar(255) NOT NULL,
- `calculation_account_category_out` varchar(255) NOT NULL,
- `calculation_receivables_payment_category` varchar(255) NOT NULL,
- `receivables_mode` tinyint(1) NOT NULL,
- `bill_order_number` varchar(255) NOT NULL DEFAULT '',
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `bill_ids` text NULL,
- `calculation_value` decimal(22, 6) NOT NULL DEFAULT 0.000000,
- `calculation_condition` varchar(120) NOT NULL,
- `calculation_supplement` varchar(50) NOT NULL DEFAULT '',
- `call_time` datetime(0) NOT NULL,
- `calculation_senior_screen` varchar(50) NOT NULL,
- `calculation_account_category` varchar(50) NOT NULL,
- `calculation_product_id` int(11) NOT NULL,
- `calculation_collection_id` int(11) NOT NULL,
- `day` INT ( 11 ) NULL,
- `calculation_ctime` datetime(0) NULL DEFAULT NULL,
- `calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- INDEX `bill_order_number`(`bill_order_number`) USING BTREE,
- INDEX `bill_order_id`(`bill_order_id`) USING BTREE,
- INDEX `call_time`(`call_time`) USING BTREE,
- UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
- INDEX `calculation_value`(`calculation_key`, `affair_id`, `calculation_time`, `calculation_value`, `calculation_condition`, `tagIds`) USING BTREE,
- INDEX `calculation_time`(`calculation_time`, `affair_id`, `calculation_condition`, `tagIds`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_statement_calculation
- -- ----------------------------
- DROP TABLE IF EXISTS `t_product_share_permission`;
- CREATE TABLE IF NOT EXISTS `t_product_share_permission` (
- `per_id` int(11) NOT NULL AUTO_INCREMENT,
- `share_id` varchar(50) NOT NULL,
- `user_id` int(11) NOT NULL DEFAULT 0,
- `allow` int(1) DEFAULT 1,
- PRIMARY KEY (`per_id`) USING BTREE,
- KEY `per_id` (`per_id`) USING BTREE,
- KEY `user_id` (`user_id`,`share_id`) USING BTREE,
- KEY `share_id` (`share_id`,`user_id`),
- 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 DEFAULT CHARSET=utf8mb4 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(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`frequently_id`) USING BTREE,
- INDEX `user_id`(`user_id`) USING BTREE,
- INDEX `tag_id`(`tag_id`) 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 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) NULL DEFAULT NULL,
- `tag_title` varchar(255) NULL DEFAULT NULL,
- `tag_desc` varchar(255) NULL DEFAULT NULL,
- `used_count` int(11) NULL DEFAULT 0,
- `status` int(2) NULL DEFAULT 99,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) 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 `tag_image_id`(`tag_image_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) NULL DEFAULT NULL,
- `content_type` int(11) NULL DEFAULT 0,
- `tag_id` int(11) NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`rel_id`) USING BTREE,
- INDEX `tag_id`(`tag_id`) 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 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,
- PRIMARY KEY (`per_id`) USING BTREE,
- INDEX `per_id`(`per_id`) USING BTREE,
- INDEX `tag_id`(`tag_id`) USING BTREE,
- INDEX `user_id`(`user_id`) USING BTREE,
- `allow` INT ( 1 ) NULL DEFAULT 1,
- 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 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) NULL DEFAULT NULL,
- `user_company_name` varchar(255) NULL DEFAULT NULL,
- `user_name` varchar(255) NOT NULL,
- `user_password` varchar(32) NOT NULL,
- `user_pwdhash` varchar(255) NULL DEFAULT NULL,
- `user_realname` varchar(10) NOT NULL,
- `user_gender` tinyint(1) NULL DEFAULT 1,
- `user_avatar` varchar(100) NULL DEFAULT NULL,
- `user_phonenum` varchar(11) NULL DEFAULT NULL,
- `user_state` tinyint(1) NULL DEFAULT 0,
- `user_qq` varchar(15) NULL DEFAULT NULL,
- `user_email` varchar(255) NULL DEFAULT NULL,
- `user_uid` varchar(18) NULL DEFAULT NULL,
- `user_region` varchar(255) NULL DEFAULT NULL,
- `visible` tinyint(255) NULL DEFAULT NULL,
- `ctime` datetime(0) NOT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `dtime` datetime(0) NULL DEFAULT NULL,
- `status` decimal(2, 0) NOT NULL DEFAULT 99,
- `user_logtimes` int(11) NULL DEFAULT NULL,
- `user_lastip` varchar(255) NULL DEFAULT NULL,
- `user_lastlogintime` datetime(0) NULL DEFAULT NULL,
- `user_lastackqstring` varchar(255) NULL DEFAULT NULL,
- `user_lastackurl` varchar(255) NULL DEFAULT NULL,
- `avos_session_token` varchar(50) NULL DEFAULT NULL,
- `user_lastacktime` datetime(0) NULL DEFAULT NULL,
- `user_lastackdevice` varchar(255) NULL DEFAULT NULL,
- `user_signup_user_agent` varchar(255) NULL DEFAULT NULL,
- `auth_key` varchar(255) NULL DEFAULT NULL,
- `access_token` varchar(255) NULL DEFAULT NULL,
- `tgt` varchar(255) NULL DEFAULT NULL,
- `st` varchar(255) NULL DEFAULT NULL,
- `sid` varchar(255) NULL DEFAULT NULL,
- `avos_token` varchar(255) NULL DEFAULT NULL,
- `referral_code` int(6) NULL DEFAULT NULL,
- `user_lastaddress` varchar(255) NULL DEFAULT NULL,
- `necessary` tinyint(1) NULL DEFAULT 0,
- `work_time` varchar(60) NULL DEFAULT NULL,
- `attendance_id` int(11) NULL DEFAULT NULL,
- `bill_header` varchar(255) NULL,
- `report_header` varchar(255) NULL,
- `report_password` varchar(32) NULL,
- `report_password_type` tinyint(1) NULL DEFAULT 0,
- `second_token` varchar(50) CHARACTER SET utf8mb4 NULL DEFAULT '',
- PRIMARY KEY (`user_id`) USING BTREE,
- INDEX `role_id`(`role_id`) USING BTREE,
- INDEX `company_id`(`company_id`) USING BTREE,
- INDEX `department_id`(`department_id`) USING BTREE,
- INDEX `user_name`(`user_name`) USING BTREE,
- INDEX `referral_code`(`referral_code`) USING BTREE,
- INDEX `referral_code_2`(`referral_code`) USING BTREE,
- INDEX `user_phonenum`(`user_phonenum`) 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 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) NOT NULL,
- `attendance_time` varchar(60) NOT NULL DEFAULT '',
- `monday` varchar(60) NULL DEFAULT '',
- `tuesday` varchar(60) NULL DEFAULT '',
- `wednesday` varchar(60) NULL DEFAULT '',
- `thursday` varchar(60) NULL DEFAULT '',
- `friday` varchar(60) NULL DEFAULT '',
- `saturday` varchar(60) NULL DEFAULT '',
- `sunday` varchar(60) NULL DEFAULT '',
- PRIMARY KEY (`attendance_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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) 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) NULL DEFAULT NULL,
- `voice_ids` varchar(255) NULL DEFAULT NULL,
- `content_text` varchar(255) NULL DEFAULT NULL,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `work_data_id` varchar(50) NULL DEFAULT NULL,
- `work_object_type` tinyint(1) NULL DEFAULT 1,
- `work_object_ids` text NULL DEFAULT NULL,
- `work_theme` varchar(255) NULL DEFAULT NULL,
- `affair_data_id` varchar(50) NULL DEFAULT NULL,
- PRIMARY KEY (`work_id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 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(0) 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`) USING BTREE,
- INDEX `user_id`(`user_id`) 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 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 AUTO_INCREMENT,
- `reply_id` int(11) NULL DEFAULT NULL,
- `set_object_type` tinyint(1) NULL DEFAULT NULL,
- `set_object_ids` text 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 NULL DEFAULT NULL,
- `reminder_frequency` int(11) NULL DEFAULT 0,
- `reminder_time` datetime(0) 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 AUTO_INCREMENT = 1 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) NULL DEFAULT NULL,
- `reply_affair_old_data` text NULL DEFAULT NULL,
- `reply_affair_new_data` text NULL DEFAULT NULL,
- `reply_time` datetime(0) NULL DEFAULT NULL,
- `reply_object_ids` text NULL DEFAULT NULL,
- `reply_image` varchar(255) NULL DEFAULT NULL,
- `reply_voice` varchar(255) NULL DEFAULT NULL,
- `reply_content` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`reply_id`) USING BTREE,
- INDEX `work_id`(`work_id`) 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 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) NOT NULL,
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) NOT NULL,
- `calculation_key` varchar(15) NOT NULL,
- `calculation_time` datetime(0) NOT NULL,
- `product_id` int(11) NOT NULL,
- `collection_id` int(11) NOT NULL,
- `product_color` varchar(255) NOT NULL,
- `product_color_number` varchar(255) NOT NULL,
- `sale_object` varchar(15) NOT NULL,
- `product_width` decimal(14, 2) NOT NULL,
- `product_height` decimal(14, 2) NOT NULL,
- `machining_price` decimal(15, 3) NOT NULL,
- `calculation_condition` varchar(120) NOT NULL,
- `actual_in_storehouse_quantity` decimal(22, 2) NOT NULL,
- `call_time` datetime(0) NOT NULL,
- `tag_numbers` tinyint(1) NULL DEFAULT 0,
- `user_id` int(11) NOT NULL,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- INDEX `call_time`(`call_time`) USING BTREE,
- UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
- INDEX `affair_id`(`affair_id`, `calculation_time`, `calculation_condition`, `tagIds`, `calculation_key`, `product_id`, `product_color`, `sale_object`) USING BTREE
- ) ENGINE = InnoDB 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) NOT NULL,
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) NOT NULL,
- `calculation_condition` varchar(120) NOT NULL,
- `calculation_time` datetime(0) NOT NULL,
- `machining_price` decimal(15, 3) NOT NULL,
- `machining_quantity` decimal(15, 2) NOT NULL,
- `machining_total_amount` decimal(15, 3) NOT NULL,
- `out_storehouse_quantity` decimal(22, 2) NOT NULL,
- `from_data_id` varchar(25) NOT NULL,
- `is_complete` int(1) NOT NULL DEFAULT 0,
- `call_time` datetime(0) 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,
- INDEX `call_time`(`call_time`) USING BTREE,
- UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
- INDEX `affair_id`(`affair_id`, `calculation_time`, `calculation_condition`, `tagIds`, `from_data_id`) USING BTREE
- ) ENGINE = InnoDB 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) NOT NULL DEFAULT '',
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) NOT NULL DEFAULT '',
- `calculation_condition` varchar(120) NOT NULL ,
- `call_time` datetime(0) NOT NULL,
- `calculation_key` varchar(13) NOT NULL DEFAULT '',
- `calculation_time` datetime(0) NOT NULL ,
- `calculation_time2` datetime(0) 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) NULL DEFAULT NULL,
- `public_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
- `stop_reason_id` int(11) NULL,
- `object_key` varchar(25) NULL,
- `calculation_value` decimal(22,2) NULL,
- `needle_position` int(11) NULL,
- `net_needle` int(11) NULL,
- `product_specification` varchar(255) NULL DEFAULT '',
- `machine_production_state` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- INDEX `call_time`(`call_time`) USING BTREE,
- UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
- INDEX `calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `product_id`, `tagIds`, `calculation_time2`) USING BTREE
- ) ENGINE = InnoDB 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) NOT NULL DEFAULT '',
- `affair_id` int(11) NOT NULL,
- `tagIds` varchar(100) NOT NULL DEFAULT '',
- `calculation_condition` varchar(120) NOT NULL ,
- `calculation_key` varchar(13) NOT NULL DEFAULT '',
- `calculation_time` datetime(0) NOT NULL ,
- `calculation_value` decimal(22, 6) NOT NULL DEFAULT 0.000000 ,
- `call_time` datetime(0) 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) NOT NULL DEFAULT '',
- `ticket_time` datetime(0) NOT NULL ,
- PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
- INDEX `call_time`(`call_time`) USING BTREE,
- UNIQUE INDEX `data_id` (`data_id`) USING BTREE,
- INDEX `calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `tagIds`, `ticket_key`, `ticket_time`) USING BTREE
- ) ENGINE = InnoDB 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) NOT NULL,
- `companyId` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE = InnoDB ROW_FORMAT = Dynamic;
- -- ----------------------------
- -- Table structure for t_customer_visible
- -- ----------------------------
- DROP TABLE IF EXISTS `t_customer_visible`;
- CREATE TABLE `t_customer_visible` (
- `id` int(20) NOT NULL AUTO_INCREMENT,
- `userId` int(11) NOT NULL,
- `objectKey` varchar(50) NOT NULL,
- `companyId` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `userId` (`userId`,`objectKey`) USING BTREE,
- CONSTRAINT `t_customer_visible_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE = InnoDB 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) NOT NULL DEFAULT '',
- `statistics_number` int(11) NOT NULL DEFAULT 0,
- `permission` tinyint(1) NULL DEFAULT 0,
- `user_ids` text NULL DEFAULT NULL,
- `companyId` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`statistics_id`) USING BTREE
- ) ENGINE = InnoDB 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) NULL DEFAULT '',
- `step_number` int(11) NOT NULL,
- `affairIds` text NULL DEFAULT NULL,
- `companyId` int(11) NULL DEFAULT 0,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `tag_ids` text NULL DEFAULT NULL,
- PRIMARY KEY (`step_id`) USING BTREE
- ) ENGINE = InnoDB 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) NOT NULL,
- `account_bank_name` varchar(255) NULL DEFAULT '',
- `account_bank_number` varchar(255) NULL DEFAULT '',
- `account_cumulative` double(13, 2) NULL DEFAULT 0,
- `ctime` datetime(0) NULL DEFAULT NULL,
- `utime` datetime(0) NULL DEFAULT NULL,
- `user_id` int(11) NULL DEFAULT NULL,
- `permission` tinyint(1) NULL DEFAULT 1,
- `see_user_ids` text NULL DEFAULT NULL,
- PRIMARY KEY (`account_id`) USING BTREE
- ) ENGINE = InnoDB 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 NULL DEFAULT NULL,
- `utime` varchar(25) NULL DEFAULT '',
- UNIQUE INDEX `frequently_id`(`frequently_id`) USING BTREE
- ) ENGINE = InnoDB 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 NULL DEFAULT NULL,
- `ctime` varchar(25) NULL DEFAULT '',
- `content` varchar(255) NULL DEFAULT NULL,
- `data_count` int(11) NULL DEFAULT NULL,
- PRIMARY KEY (`notice_id`) USING BTREE,
- UNIQUE INDEX `frequently_id`(`notice_id`) USING BTREE
- ) ENGINE = InnoDB 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) NULL DEFAULT '',
- `notice_state` tinyint(1) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `id`(`id`) USING BTREE
- ) ENGINE = InnoDB 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 NULL DEFAULT NULL,
- `utime` varchar(25) NULL DEFAULT '',
- `screen_type` tinyint(1) NULL DEFAULT 1,
- UNIQUE INDEX `frequently_id`(`screen_id`) USING BTREE
- ) ENGINE = InnoDB 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) DEFAULT 0,
- `purchase_price_reminder` tinyint(1) DEFAULT 0,
- `documentary_add_reminder` tinyint(1) DEFAULT 0,
- `documentary_add_son_reminder` tinyint(1) DEFAULT 0,
- `documentary_join_reminder` tinyint(1) 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`),
- UNIQUE KEY `user_id` (`user_id`) USING BTREE
- ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
- -- ----------------------------
- -- Table structure for t_notification
- -- ----------------------------
- DROP TABLE IF EXISTS `t_notification`;
- CREATE TABLE `t_notification` (
- `notification_id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT,
- `notification_code` int(11) NULL,
- `is_read` int(2) NULL,
- `ctime` datetime(0) NULL,
- PRIMARY KEY (`notification_id`)
- )ENGINE=InnoDB 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 COMMENT '公司单号ID',
- `cabinet_name` varchar(20) NOT NULL DEFAULT '',
- `permission` tinyint(1) DEFAULT 0,
- `user_ids` text DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- PRIMARY KEY (`cabinet_id`)
- ) ENGINE=InnoDB;
- -- ----------------------------
- -- 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) NOT NULL DEFAULT '',
- `lock_password` varchar(50) NOT NULL DEFAULT '',
- `lock_time` varchar(25) DEFAULT '',
- `user_id` int(11) DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- PRIMARY KEY (`lock_id`)
- ) ENGINE=InnoDB;
- -- ----------------------------
- -- 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`),
- KEY `lock_id` (`lock_id`),
- KEY `cabinet_id` (`cabinet_id`),
- 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;
- -- ----------------------------
- -- 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(30) NOT NULL DEFAULT '',
- `error_number` tinyint(1) DEFAULT NULL,
- `error_time` datetime DEFAULT NULL,
- PRIMARY KEY (`error_id`)
- ) ENGINE=InnoDB 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) NOT NULL DEFAULT '',
- `customized_shortname` varchar(255) DEFAULT '',
- `customized_title` varchar(255) NOT NULL DEFAULT '',
- `customized_class` varchar(255) DEFAULT '',
- `customized_content` varchar(255) DEFAULT '',
- `customized_type` tinyint(1) DEFAULT NULL,
- `permission` tinyint(1) DEFAULT 0,
- `user_ids` text DEFAULT NULL,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `customized_other` text DEFAULT NULL,
- `view_permission` tinyint(1) NULL DEFAULT 2,
- `view_user_ids` text NULL,
- PRIMARY KEY (`customized_id`)
- ) ENGINE=InnoDB 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) NOT NULL DEFAULT '',
- `fast_input_state` tinyint(1) DEFAULT 0,
- `fast_input_data_ids` text NOT NULL,
- `fast_input_content` text DEFAULT NULL,
- `fast_input_other` longtext NULL,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `status` int(2) NULL DEFAULT 99,
- PRIMARY KEY (`fast_input_id`),
- INDEX `user_id`(`status`, `customized_id`, `user_id`)
- ) ENGINE=InnoDB 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 DEFAULT NULL,
- `status` int(2) DEFAULT 99,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`inventory_price_record_id`),
- KEY `inventory_id` (`inventory_id`),
- CONSTRAINT `t_inventory_price_record_ibfk_1` FOREIGN KEY (`inventory_id`) REFERENCES `t_inventory` (`inventory_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB 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 DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `permission` tinyint(1) DEFAULT 1,
- `pause_user_ids` text DEFAULT NULL,
- PRIMARY KEY (`machine_id`) USING BTREE
- ) ENGINE=InnoDB 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) NOT NULL,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `permission` tinyint(1) DEFAULT 1,
- `stop_reason_user_ids` text DEFAULT NULL,
- PRIMARY KEY (`stop_reason_id`) USING BTREE
- ) ENGINE=InnoDB 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) DEFAULT 0.00,
- `product_ids` text DEFAULT NULL,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`offer_cost_float_id`) USING BTREE
- ) ENGINE=InnoDB 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) NOT NULL,
- `offer_price_number` double(13,2) DEFAULT 0.00,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `permission` tinyint(1) DEFAULT 1,
- `see_user_ids` text DEFAULT NULL,
- PRIMARY KEY (`offer_price_id`) USING BTREE
- ) ENGINE=InnoDB 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) NOT NULL DEFAULT '',
- `report_password_type` tinyint(1) NOT NULL DEFAULT 0,
- `report_password_interval` int(11) DEFAULT 0,
- `use_time` datetime DEFAULT NULL,
- `ctime` datetime 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 ROW_FORMAT=DYNAMIC;
- -- ----------------------------
- -- Table structure for t_user_report_password
- -- ----------------------------
- 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) DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `watermark_name` varchar(50) DEFAULT '',
- `logo_image_id` int(11) DEFAULT NULL,
- `watermark_title` varchar(50) DEFAULT '',
- `font_type` tinyint(1) DEFAULT 0,
- `watermark_colour` varchar(50) DEFAULT '',
- `transparency` int(11) DEFAULT 0,
- `font_szie` int(11) DEFAULT 0,
- `row_number` int(11) DEFAULT 0,
- `row_spacing` int(11) DEFAULT 0,
- `column_number` int(11) DEFAULT 0,
- `column_spacing` int(11) DEFAULT 0,
- `angle` int(11) DEFAULT 0,
- PRIMARY KEY (`watermark_id`,`product_id`),
- UNIQUE KEY `watermark_id` (`watermark_id`) USING BTREE,
- UNIQUE KEY `product_id` (`product_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 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) NOT NULL,
- `tag_group_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
- `tag_category` tinyint(1) DEFAULT NULL,
- `status` tinyint(1) DEFAULT 99,
- `ctime` datetime DEFAULT NULL,
- `utime` datetime DEFAULT NULL,
- `dtime` datetime DEFAULT NULL,
- PRIMARY KEY (`tag_group_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 ROW_FORMAT=DYNAMIC;
- -- ----------------------------
- -- Table structure for t_tag_group
- -- ----------------------------
- DROP TABLE IF EXISTS `t_home`;
- CREATE TABLE IF NOT EXISTS `t_home` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `home_type_ids` longtext NOT NULL,
- `user_id` int(11) DEFAULT 99,
- `utime` datetime DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
- -- ----------------------------
- -- Function structure for Fun_GetPY
- -- ----------------------------
- SET GLOBAL log_bin_trust_function_creators = 1;
- delimiter ;;
- CREATE FUNCTION IF NOT EXISTS `Fun_GetPY`(in_string VARCHAR(255) CHARSET utf8mb4)
- RETURNS varchar(255) CHARSET utf8mb4
- 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;
|