admin/sql/C_parcel_arrival.sql
zzh d0df7e864c 新增快递到仓 API 与表结构,并支持 SKU 图片上传。
EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 20:06:47 +08:00

21 lines
1.1 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 已有库增量:快递到仓表 C_parcel_arrival
-- 对应功能:操作 → 快递到仓;全量结构见根目录 db.sql
-- 可重复执行(IF NOT EXISTS)
CREATE TABLE IF NOT EXISTS `C_parcel_arrival` (
`Id` INT NOT NULL AUTO_INCREMENT COMMENT '主键',
`CustomerId` INT NOT NULL COMMENT '客户ID',
`WarehouseId` INT NOT NULL COMMENT '仓库ID',
`ParcelId` INT NULL COMMENT '关联包裹 C_parcel.Id',
`TrackingNo` VARCHAR(64) NOT NULL COMMENT '国内快递单号',
`IsDeleted` TINYINT NOT NULL DEFAULT 0 COMMENT '软删除:0-否,1-是',
`ConcurrencyStamp` CHAR(36) NOT NULL DEFAULT (UUID()) COMMENT '并发戳',
`CreateUserId` INT NOT NULL DEFAULT 0 COMMENT '创建人',
`CreateTime` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UpdateUserId` INT NULL COMMENT '更新人',
`UpdateTime` DATETIME NULL COMMENT '更新时间',
PRIMARY KEY (`Id`),
KEY `idx_c_parcel_arrival_tracking` (`CustomerId`, `TrackingNo`, `WarehouseId`),
KEY `idx_c_parcel_arrival_ctime` (`CreateTime`)
) COMMENT='仓储-快递到仓记录';