Initial commit: 风影 OA 全栈源码(API/Web/Flutter/IM)
含 Phase 1.1 IM seq 排序、断线重连、多端已读同步与微信式语音转文字 UI。 排除 node_modules、构建产物、安装包与 .env 密钥。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const ITEMS = [
|
||||
['公开招标', 1],
|
||||
['邀请招标', 2],
|
||||
['询价', 3],
|
||||
['竞谈【综合评分】', 4],
|
||||
['竞谈【最低价中】', 5],
|
||||
['单一来源', 6],
|
||||
['其他', 7],
|
||||
] as const;
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
await prisma.dictItem.deleteMany({ where: { tenantId: '1', dictType: 'tenderMethod' } });
|
||||
await prisma.dictItem.createMany({
|
||||
data: ITEMS.map(([value, sortNo]) => ({
|
||||
tenantId: '1',
|
||||
dictType: 'tenderMethod',
|
||||
label: value,
|
||||
value,
|
||||
sortNo,
|
||||
})),
|
||||
});
|
||||
console.log('tenderMethod dict synced', ITEMS.length);
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => prisma.$disconnect())
|
||||
.catch(async (e) => {
|
||||
console.error(e);
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user