CREATE TABLE ' Barter_order ' (' id ' bigint (Unsigned not NULL auto_increment COMMENT ' ID ', ' Order_pid ' bigint (Unsigned not NULL COMMENT ' parent Order ID ', ' order_id ' bigint (Unsigned not NULL COMMENT ' order ID ', ' Order_source 'intUnsigned not NULL DEFAULT ' 1 ' COMMENT ' order source, 1-pc end; 2-app, 3-m and web,4-,5-hand Q ', ' order_submit_time ' datetime DEFAULT NULL COMMENT' Order Time ', ' sku_id ' bigint (Unsigned not NULL COMMENT ' SKU ID ', ' erp_prom_id ' bigint (Unsigned not NULL COMMENT ' ERP promo ID ', ' barter_id ' bigint (Unsigned not NULL COMMENT ' swap id ', ' quantity 'intUnsigned not NULL DEFAULT ' 0 ' COMMENT ' purchase quantity ', ' Bean_number 'int(ten) Not NULL DEFAULT ' 0 ' COMMENT ' total number of Izu ', ' Statistics_status 'intUnsigned not NULL DEFAULT ' 0 ' COMMENT ' Sales statistics status, 0-not counted; 1-counted. ‘, ' To_es 'intUnsigned not NULL DEFAULT ' 0 ' COMMENT ' whether data is synchronized to es,0-not synchronized; 1-synchronized ', ' created ' datetime DEFAULT NULL COMMENT' Create Time ', ' modified ' datetime DEFAULT NULL COMMENT' Update Time ', ' uuid ' varchar (+) not NULL COMMENT ' unique identity ', PRIMARY key (' id '), UNIQUE key ' uniq_uuid ' (' uuid '), key ' Idx_barter_status ' (' barter_id ', ' statistics_status ')) ENGINE=innodb DEFAULT Charset=utf8 comment= ' Redeem sales list based on order statistics '; CREATE TABLE ' ps_storeinfo ' (' ID ' bigint () Not NULL auto_increment COMMENT ' primary key ID ', ' dms_store_id ' varchar (+) DEFAULT NULL COMMENT ' sorting Center storeroom ID ', ' dms_store_name ' varchar (Not NULL DEFAULT ' COMMENT ' sorting Center storeroom name ', ' store_id 'int(one) not NULL DEFAULT ' 0 ' COMMENT ' warehouse ID ', ' Loc_no 'int(one) not NULL DEFAULT ' 0 ' COMMENT ' loc_no ', ' org_id 'int(one) not NULL DEFAULT ' 0 ' COMMENT ' agency ID ', ' create_date ' datetime DEFAULT NULL COMMENT' Create Time ', ' REMARK ' varchar () DEFAULT NULL COMMENT ' remarks ', ' YN ' tinyint (3) Not NULL DEFAULT ' 0 ' COMMENT ' is valid 1. Valid 2. Invalid ', ' dms_store_type ' varchar ((+) DEFAULT NULL COMMENT ' Sorting Center warehouse type ', ' dms_site_id 'int(one) DEFAULT NULL COMMENT ' sorting Center site ID ', ' dms_code ' varchar (+) DEFAULT NULL COMMENT ' 7-bit site number ', ' update_time ' datetime DEFAULT NULL COMMENT' Update Time ', ' create_operator_name ' varchar (DEFAULT NULL COMMENT ' Create operator account ', ' update_operator_name ' varchar (DEFAULT NULL COMMENT ' update operator account ', ' province_id 'int(one) DEFAULT NULL COMMENT ' storeroom province ', ' city_id 'int(one) DEFAULT NULL COMMENT ' warehouse City ', ' site_name_pym ' varchar (() DEFAULT NULL COMMENT ' Pinyin code ', ' county_id 'int(one) DEFAULT NULL COMMENT ' County ID ', ' town_id 'int(one) DEFAULT NULL COMMENT ' town ID ', ' address ' varchar (DEFAULT NULL COMMENT ' detailed address ', ' connector ' varchar ((+) DEFAULT NULL COMMENT ' contacts ', ' telephone ' varchar ((+) DEFAULT NULL COMMENT ' Contact phone ', ' ts ' timestamp NULL DEFAULT current_timestamp on UPDATE current_timestamp COMMENT' Time stamp ', PRIMARY key (' ID '), key ' idx_org_id ' (' org_id ')) ENGINE=innodb auto_increment=1 DEFAULT Charset=utf8 comment= ' storehouse information ';
MySQL Build table