feat: fix add code-center-module
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
import { useContextKey } from '@kevisual/context';
|
||||
import { nanoid, customAlphabet } from 'nanoid';
|
||||
import { DataTypes, Model, ModelAttributes } from 'sequelize';
|
||||
@@ -234,7 +233,7 @@ export const MarkMInit = async <T = any>(opts: MarkInitOpts<T>, sync?: Opts) =>
|
||||
defaultValue: '',
|
||||
},
|
||||
key: {
|
||||
type: DataTypes.TEXT,
|
||||
type: DataTypes.TEXT, // 对应的minio的文件路径
|
||||
defaultValue: '',
|
||||
},
|
||||
markType: {
|
||||
@@ -316,8 +315,7 @@ export const MarkMInit = async <T = any>(opts: MarkInitOpts<T>, sync?: Opts) =>
|
||||
|
||||
export const markModelInit = MarkMInit;
|
||||
|
||||
export const syncMarkModel = async (sync?: Opts) => {
|
||||
export const syncMarkModel = async (sync?: Opts, tableName = 'micro_mark') => {
|
||||
const sequelize = await useContextKey('sequelize');
|
||||
await MarkMInit({ sequelize, tableName: 'micro_mark' }, sync);
|
||||
await MarkMInit({ sequelize, tableName }, sync);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export * from './mark-model.ts';
|
||||
import { markModelInit, MarkModel, syncMarkModel } from './mark-model.ts';
|
||||
export * from '@kevisual/code-center-module/src/mark/mark-model.ts';
|
||||
import { markModelInit, MarkModel, syncMarkModel } from '@kevisual/code-center-module/src/mark/mark-model.ts';
|
||||
export { markModelInit, MarkModel };
|
||||
|
||||
syncMarkModel({ sync: true, alter: true, logging: false });
|
||||
|
||||
Reference in New Issue
Block a user