'use strict'; /** * 订单波次顺序定位副表模型。 * 表结构:database/migrations/20260513113000-create-wms_order_wave_index.js * @param {import('egg').Application} app Egg 应用实例。 * @return {import('sequelize').ModelCtor} Sequelize 模型。 */ module.exports = app => { const { BIGINT, INTEGER, DATE } = app.Sequelize; const OrderWaveIndex = app.model.define('wms_order_wave_index', { id: { type: BIGINT(20).UNSIGNED, primaryKey: true, autoIncrement: true, allowNull: false, comment: '主键ID', }, warehouse_id: { type: BIGINT(20).UNSIGNED, allowNull: false, defaultValue: 0, comment: '仓库ID', }, order_id: { type: BIGINT(20).UNSIGNED, allowNull: false, defaultValue: 0, comment: '订单ID', }, wave_id: { type: BIGINT(20).UNSIGNED, allowNull: false, defaultValue: 0, comment: '波次ID', }, wave_index: { type: INTEGER(10).UNSIGNED, allowNull: false, defaultValue: 0, comment: '订单在波次中的全局顺序', }, platforms_index: { type: INTEGER(10).UNSIGNED, allowNull: false, defaultValue: 0, comment: '订单在平台分组内顺序', }, create_at: { type: DATE, allowNull: false, comment: '创建时间', }, }, { tableName: 'wms_order_wave_index', timestamps: false, underscored: true, comment: '订单波次顺序定位副表', }); return OrderWaveIndex; };