'use strict'; /** * 店铺增加「自动拉取订单」配置。 * * - auto_fetch_order:是否自动拉取订单(1 是 / 0 否),默认关闭 * - auto_fetch_interval:拉取间隔(分钟),默认 3,最小 3(业务层校验) * * 具体拉单调度逻辑后续实现,本次先提供配置项。 */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.addColumn('shops', 'auto_fetch_order', { type: Sequelize.TINYINT, allowNull: false, defaultValue: 0, comment: '是否自动拉取订单:1是 0否', }); await queryInterface.addColumn('shops', 'auto_fetch_interval', { type: Sequelize.INTEGER, allowNull: false, defaultValue: 3, comment: '自动拉取订单间隔(分钟,最小 3)', }); }, async down(queryInterface) { await queryInterface.removeColumn('shops', 'auto_fetch_interval'); await queryInterface.removeColumn('shops', 'auto_fetch_order'); }, };