1
This commit is contained in:
46
sql/batch_publish.sql
Normal file
46
sql/batch_publish.sql
Normal file
@@ -0,0 +1,46 @@
|
||||
-- 批量发品任务表
|
||||
CREATE TABLE IF NOT EXISTS `batch_publish_task` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务ID',
|
||||
`task_name` varchar(200) DEFAULT NULL COMMENT '任务名称',
|
||||
`original_message` text COMMENT '原始线报消息',
|
||||
`total_products` int(11) DEFAULT NULL COMMENT '解析出的商品数量',
|
||||
`selected_products` int(11) DEFAULT NULL COMMENT '选中的商品数量',
|
||||
`target_accounts` varchar(500) DEFAULT NULL COMMENT '目标ERP账号(JSON数组)',
|
||||
`status` int(11) DEFAULT '0' COMMENT '任务状态:0待处理 1处理中 2已完成 3失败',
|
||||
`success_count` int(11) DEFAULT '0' COMMENT '成功发品数量',
|
||||
`fail_count` int(11) DEFAULT '0' COMMENT '失败发品数量',
|
||||
`common_params` text COMMENT '通用参数(JSON)',
|
||||
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_user_name` varchar(100) DEFAULT NULL COMMENT '创建人姓名',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`complete_time` datetime DEFAULT NULL COMMENT '完成时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_create_user` (`create_user_id`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_create_time` (`create_time`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='批量发品任务表';
|
||||
|
||||
-- 批量发品明细表
|
||||
CREATE TABLE IF NOT EXISTS `batch_publish_item` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '明细ID',
|
||||
`task_id` bigint(20) NOT NULL COMMENT '任务ID',
|
||||
`skuid` varchar(100) DEFAULT NULL COMMENT 'SKUID',
|
||||
`product_name` varchar(500) DEFAULT NULL COMMENT '商品名称',
|
||||
`target_account` varchar(100) DEFAULT NULL COMMENT '目标ERP账号',
|
||||
`account_remark` varchar(100) DEFAULT NULL COMMENT '账号备注名',
|
||||
`status` int(11) DEFAULT '0' COMMENT '发品状态:0待发布 1发布中 2发布成功 3发布失败 4上架中 5已上架 6上架失败',
|
||||
`product_id` bigint(20) DEFAULT NULL COMMENT 'ERP商品ID(发品成功后返回)',
|
||||
`product_status` int(11) DEFAULT NULL COMMENT '商品状态(发品成功后返回)',
|
||||
`outer_id` varchar(100) DEFAULT NULL COMMENT '商家编码(发品成功后返回)',
|
||||
`publish_price` bigint(20) DEFAULT NULL COMMENT '发品价格(分)',
|
||||
`error_message` varchar(1000) DEFAULT NULL COMMENT '失败原因',
|
||||
`publish_time` datetime DEFAULT NULL COMMENT '上架时间',
|
||||
`delay_seconds` int(11) DEFAULT '3' COMMENT '延迟上架时间(秒)',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_task_id` (`task_id`),
|
||||
KEY `idx_skuid` (`skuid`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_product_id` (`product_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='批量发品明细表';
|
||||
|
||||
Reference in New Issue
Block a user