refactor(prisma): 统一导入prisma客户端方式
- 所有控制器中从libs/prisma.ts导入prisma替代旧的libs/db.ts - 规范了step模块中zod验证架构的格式与换行 - 生成Prisma客户端及类型定义文件,包含browser、client、commonInputTypes、enums和内部类文件 - 优化listStepsQuerySchema默认参数与链式调用格式 - 保持代码风格一致,提升可维护性和类型安全性
This commit is contained in:
19
apps/server/prisma.config.ts
Normal file
19
apps/server/prisma.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'dotenv/config';
|
||||
import { defineConfig, env } from 'prisma/config';
|
||||
|
||||
export default defineConfig({
|
||||
// the main entry for your schema
|
||||
schema: 'prisma/schema.prisma',
|
||||
// where migrations should be generated
|
||||
// what script to run for "prisma db seed"
|
||||
migrations: {
|
||||
path: 'prisma/migrations',
|
||||
seed: 'tsx prisma/seed.ts',
|
||||
},
|
||||
// The database URL
|
||||
datasource: {
|
||||
// Type Safe env() helper
|
||||
// Does not replace the need for dotenv
|
||||
url: env('DATABASE_URL'),
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user