feat(backend): 入库每行新建独立产品发独立序列号(product 加生产日期/批次列)
Deploy Server / release-deploy-server (push) Successful in 59s
Deploy Server / release-deploy-server (push) Successful in 59s
入库 Create/Update 改为对每条明细新建独立 product(createIndependentProduct, nextProductCode 自增 + uk_shop_code 唯一约束兜底),回填 product_id;不再按名称复用。 product 表加 production_date/batch_no。向后兼容:保留明细/库存快照列。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZ4DskSRKsSiheQonFtQvx
This commit is contained in:
@@ -188,6 +188,8 @@ func SetupTestDB() *gorm.DB {
|
||||
brand TEXT,
|
||||
purchase_price REAL,
|
||||
sale_price REAL,
|
||||
production_date DATETIME,
|
||||
batch_no TEXT,
|
||||
min_stock INTEGER DEFAULT 0,
|
||||
description TEXT,
|
||||
custom_fields TEXT,
|
||||
|
||||
Reference in New Issue
Block a user