diff --git a/app/model/store.js b/app/model/store.js index 274c6cd..5a0538c 100644 --- a/app/model/store.js +++ b/app/model/store.js @@ -509,21 +509,11 @@ module.exports = app => { defaultValue: app.Sequelize.literal('CURRENT_TIMESTAMP'), comment: '更新时间', }, - logo_url: { - type: STRING(255), - allowNull: true, - comment: 'logo链接', - }, project: { type: STRING(20), allowNull: true, comment: '应用', }, - domain: { - type: STRING(100), - allowNull: true, - comment: '绑定域名', - }, auth_end: { type: DATE, allowNull: true, diff --git a/app/service/systems/store.js b/app/service/systems/store.js index d43daf9..f093303 100644 --- a/app/service/systems/store.js +++ b/app/service/systems/store.js @@ -237,8 +237,6 @@ class StoreService extends Service { status: 1, // 直接启用 created_by: userId, is_warehouse: 0, // 默认不是仓库 - logo_url: data.logo_url, - domain: data.domain, auth_start: data.auth_start, auth_end: data.auth_end, subject_config: subjectConfig, @@ -374,8 +372,6 @@ class StoreService extends Service { status: 1, // 直接通过 created_by: userId, is_warehouse: 1, // 标记为仓库 - logo_url: data.logo_url, - domain: data.domain, auth_start: new Date(), // 设置当前时间为授权开始时间 auth_end: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), // 默认授权7天试用 subject_config: subjectConfig, diff --git a/app/service/systems/store_warehouse.js b/app/service/systems/store_warehouse.js index 57b04b1..59e0896 100644 --- a/app/service/systems/store_warehouse.js +++ b/app/service/systems/store_warehouse.js @@ -3279,8 +3279,6 @@ class SettingStoreWarehouseService extends Service { * @param {string} [data.contact_email] 可选,联系邮箱。 * @param {string} [data.address] 可选,公司地址。 * @param {string} [data.industry] 可选,所属行业。 - * @param {string} [data.logo_url] 可选,Logo链接。 - * @param {string} [data.domain] 可选,绑定域名。 * @param {string} [data.auth_start] 可选,授权开始日期,默认当天。 * @param {string} [data.auth_end] 可选,授权结束日期。 * @param {number} [data.print_quantity=0] 可选,初始面单余额。 @@ -3374,8 +3372,6 @@ class SettingStoreWarehouseService extends Service { status: 1, created_by: accountId, is_warehouse: 0, - logo_url: data.logo_url || null, - domain: data.domain || null, auth_end: authEnd, }; diff --git a/database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js b/database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js new file mode 100644 index 0000000..9b4e33e --- /dev/null +++ b/database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = { + async up(queryInterface) { + await queryInterface.removeColumn('wms_store', 'logo_url'); + await queryInterface.removeColumn('wms_store', 'domain'); + }, + + async down(queryInterface, Sequelize) { + const { STRING } = Sequelize; + await queryInterface.addColumn('wms_store', 'logo_url', { + type: STRING(255), + allowNull: true, + comment: 'logo链接', + }); + await queryInterface.addColumn('wms_store', 'domain', { + type: STRING(100), + allowNull: true, + comment: '绑定域名', + }); + }, +};