refactor(prisma): 统一导入prisma客户端方式

- 所有控制器中从libs/prisma.ts导入prisma替代旧的libs/db.ts
- 规范了step模块中zod验证架构的格式与换行
- 生成Prisma客户端及类型定义文件,包含browser、client、commonInputTypes、enums和内部类文件
- 优化listStepsQuerySchema默认参数与链式调用格式
- 保持代码风格一致,提升可维护性和类型安全性
This commit is contained in:
2025-11-22 01:06:53 +08:00
parent f8697b87e1
commit 02b7c3edb2
27 changed files with 10954 additions and 115 deletions

View 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'),
},
});