/*
 Navicat Premium Dump SQL

 Source Server         : A-OMS-LB-DB
 Source Server Type    : MySQL
 Source Server Version : 80028 (8.0.28)
 Source Host           : 172.233.222.200:7033
 Source Schema         : lr01mainusa

 Target Server Type    : MySQL
 Target Server Version : 80028 (8.0.28)
 File Encoding         : 65001

 Date: 18/03/2026 11:10:04
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for label_scan_history
-- ----------------------------
DROP TABLE IF EXISTS `label_scan_history`;
CREATE TABLE `label_scan_history`  (
  `Id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `CustomerId` int NOT NULL COMMENT '客户ID',
  `ReferenceNumber` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参考号',
  `NeutralWaybillNumber` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '中性面单单号',
  `FinalMileTrackingNumber` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '尾程跟踪单号',
  `Result` tinyint NOT NULL COMMENT '扫描结果：0=已返回面单, 1=无面单数据, 2=无下单数据, 3=订单被冻结, 4=订单已销毁, 5=其他',
  `Description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述',
  `CreatedBy` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CreatedAt` datetime NOT NULL COMMENT '创建时间',
  `UpdatedAt` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`Id`) USING BTREE,
  INDEX `IX_CustomerId`(`CustomerId` ASC) USING BTREE,
  INDEX `IX_NeutralWaybillNumber`(`NeutralWaybillNumber` ASC) USING BTREE,
  INDEX `IX_ReferenceNumber`(`ReferenceNumber` ASC) USING BTREE,
  INDEX `IX_FinalMileTrackingNumber`(`FinalMileTrackingNumber` ASC) USING BTREE,
  INDEX `IX_CreatedAt`(`CreatedAt` ASC) USING BTREE,
  INDEX `IX_Result`(`Result` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7059 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '标签历史扫描记录表' ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;
