-- 闲鱼商品表 CREATE TABLE `erp_product` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `product_id` bigint(20) NOT NULL COMMENT '管家商品ID', `title` varchar(500) DEFAULT NULL COMMENT '商品标题', `main_image` varchar(1000) DEFAULT NULL COMMENT '商品图片(主图)', `price` bigint(20) DEFAULT NULL COMMENT '商品价格(分)', `stock` int(11) DEFAULT NULL COMMENT '商品库存', `product_status` int(11) DEFAULT NULL COMMENT '商品状态 -1:删除 21:待发布 22:销售中 23:已售罄 31:手动下架 33:售出下架 36:自动下架', `sale_status` int(11) DEFAULT NULL COMMENT '销售状态', `user_name` varchar(100) DEFAULT NULL COMMENT '闲鱼会员名', `online_time` bigint(20) DEFAULT NULL COMMENT '上架时间(时间戳)', `offline_time` bigint(20) DEFAULT NULL COMMENT '下架时间(时间戳)', `sold_time` bigint(20) DEFAULT NULL COMMENT '售出时间(时间戳)', `create_time_xy` bigint(20) DEFAULT NULL COMMENT '创建时间(闲鱼,时间戳)', `update_time_xy` bigint(20) DEFAULT NULL COMMENT '更新时间(闲鱼,时间戳)', `appid` varchar(100) DEFAULT NULL COMMENT 'ERP应用ID', `product_url` varchar(1000) DEFAULT NULL COMMENT '商品链接', `remark` varchar(500) DEFAULT NULL COMMENT '备注', `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `uk_product_id_appid` (`product_id`, `appid`), KEY `idx_product_id` (`product_id`), KEY `idx_appid` (`appid`), KEY `idx_product_status` (`product_status`), KEY `idx_user_name` (`user_name`), KEY `idx_online_time` (`online_time`), KEY `idx_update_time_xy` (`update_time_xy`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='闲鱼商品表';