feat(store): 移除 wms_store 已废弃的 logo_url、domain 字段
- app/model/store.js、app/service/systems/store.js、app/service/systems/store_warehouse.js:移除 logo_url/domain 字段定义与创建写入,app/ 下无残留引用 - database/migrations/20260907140000-drop-logo-url-and-domain-from-wms-store.js:删除 wms_store 的 logo_url、domain 两列(开发库已执行完成)
This commit is contained in:
parent
c5150bc35b
commit
efadcba56e
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
|
||||
@ -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: '绑定域名',
|
||||
});
|
||||
},
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user