'use strict'; /** * 写入店小秘平台记录(开发者维护的平台字典)。 * * 代码已按 external_print_platforms.code = 'dxm' 注册实现; * 这里只补本地/新环境的字典数据,已有同名平台时不动(避免覆盖线上维护的配置)。 */ module.exports = { async up(queryInterface) { await queryInterface.sequelize.query(` INSERT INTO external_print_platforms (code, name, url, fetch_waybill_no, has_own_waybill, sort, status, created_at, updated_at) SELECT 'dxm', '店小秘', 'www.dianxiaomi.com', 1, 1, 0, 1, NOW(), NOW() FROM DUAL WHERE NOT EXISTS ( SELECT 1 FROM external_print_platforms WHERE code = 'dxm' ) `); }, // 平台字典可能已被使用(账号/店铺关联),回滚不删数据 async down() { return null; }, };