oms/backend/database/migrations/20261124010000-add-no-need-ship-to-products.js
liufumingren 4c2ff95507 商品标记「不用发货」统一改称「虚拟商品」
products.no_need_ship 的业务含义统一表述为「虚拟商品」,仅改文案与注释,
字段名与行为不变:

- 商品列表列头改为「虚拟商品」,标签显示「虚拟」;编辑面板开关标签同步
- 契约、模型、迁移注释、前端类型注释统一措辞
- 订单库存(orderStock)与 WMS 推送(orderWms)的注释与错误提示改为
  「虚拟商品」,提示语保持原有可操作建议
- 单测用例描述同步更新

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-24 01:29:27 +08:00

24 lines
686 B
JavaScript
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.

'use strict';
/**
* 商品增加「虚拟商品」标记。
*
* 1 表示该商品是虚拟商品(虚拟发货、服务、赠品等):订单命中后
* - 审核时不再锁定库存、发货确认也不扣减库存;
* - 推送 WMS 时该明细行不进入报文。
*/
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.addColumn('products', 'no_need_ship', {
type: Sequelize.TINYINT,
allowNull: false,
defaultValue: 0,
comment: '虚拟商品:1 是(不锁/不扣库存、不推 WMS) 0 否',
});
},
async down(queryInterface) {
await queryInterface.removeColumn('products', 'no_need_ship');
},
};