- Add Nuxt 3 + Prisma + SQLite full-stack setup - Add student CRUD API with batch import/export - Add stats dashboard with gender/class distribution - Add target community settings feature - Add Docker deployment support (Dockerfile + docker-compose) - Add README with development and deployment instructions
17 lines
588 B
TypeScript
17 lines
588 B
TypeScript
import { PrismaClient } from '@prisma/client'
|
|
|
|
const globalForPrisma = globalThis as unknown as {
|
|
prisma: PrismaClient | undefined
|
|
}
|
|
|
|
export const prisma = globalForPrisma.prisma ?? new PrismaClient()
|
|
|
|
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
|
|
|
|
// 默认目标小区配置
|
|
export const defaultCommunities = [
|
|
'恒大雅苑', '百悦尚城', '金域中央', '御泉山', '金域华府',
|
|
'金悦香树', '凯旋国际', '康华医院', '幸福公馆', '御花苑',
|
|
'景湖湾畔', '景湖时代城', '景湖花园', '香树丽舍', '恒大御景'
|
|
]
|