feat: fix add code-center-module

This commit is contained in:
熊潇 2025-06-27 01:59:48 +08:00
parent b0bd771e3d
commit c7ddaf88f6
5 changed files with 336 additions and 193 deletions

View File

@ -97,7 +97,7 @@
"pg": "^8.16.2",
"pm2": "^6.0.8",
"rimraf": "^6.0.1",
"rollup": "^4.44.0",
"rollup": "^4.44.1",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-dts": "^6.2.1",
"rollup-plugin-esbuild": "^6.2.1",
@ -119,5 +119,5 @@
"picomatch": "^4.0.2"
},
"pnpm": {},
"packageManager": "pnpm@10.12.3"
"packageManager": "pnpm@10.12.4"
}

511
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -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);
};

View File

@ -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 });

@ -1 +1 @@
Subproject commit 922b0c421f02bf6b63a0d9a52ca5b8af38c591cf
Subproject commit f694299059350167d472e0b39cb439d85c118544