WMS_MAIN/app/model/stock_static_notice.js
liufumingren 190d3cf9e5 feat(stock.check): 盘点模块功能扩展并同步接口文档(0.3.227)
- 盘点明细/记录支持未知商品(stock_id 可空)与库位范围,模式/状态口径修正
- 新增静态盘点任务、公告相关模型与迁移,stock_warehouse 增加预警数量
- methods/system.json 同步盘点接口文档;headers platform 微信端取值 wx 修正为 miniprogram
2026-10-02 15:43:49 +08:00

58 lines
1.3 KiB
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';
module.exports = app => {
const { BIGINT, DATE } = app.Sequelize;
const StockStaticNotice = app.model.define('stock_static_notice', {
id: {
type: BIGINT(20).UNSIGNED,
primaryKey: true,
autoIncrement: true,
comment: '主键ID',
},
stock_id: {
type: BIGINT(20).UNSIGNED,
allowNull: false,
comment: '商品ID,关联 wms_stock_warehouse.id',
},
notice_time: {
type: DATE,
allowNull: false,
comment: '通知时间',
},
created_at: {
type: DATE,
allowNull: false,
comment: '创建时间',
},
updated_at: {
type: DATE,
allowNull: false,
comment: '更新时间',
},
deleted_at: {
type: DATE,
defaultValue: null,
comment: '软删除时间',
},
}, {
tableName: 'wms_stock_static_notice',
freezeTableName: true,
timestamps: false,
paranoid: true,
comment: '静态商品通知关联表(记录静态商品已通知时间,避免重复通知)',
indexes: [
{
name: 'idx_stock_notice_time',
fields: [ 'stock_id', 'notice_time' ],
},
{
name: 'idx_notice_time',
fields: [ 'notice_time' ],
},
],
});
return StockStaticNotice;
};