CREATE TABLE IF NOT EXISTS `fa_shopro_order_print_task` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `order_id` int(10) unsigned NOT NULL, `order_sn` varchar(64) NOT NULL DEFAULT '', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0待处理,1成功,2处理中,-1失败', `attempts` int(10) unsigned NOT NULL DEFAULT '0', `printer_response` varchar(1000) NOT NULL DEFAULT '', `last_error` varchar(500) NOT NULL DEFAULT '', `created_at` int(10) unsigned NOT NULL, `updated_at` int(10) unsigned NOT NULL, `printed_at` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `uniq_order_id` (`order_id`), KEY `idx_status_updated_at` (`status`,`updated_at`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单云打印任务';