import { Injectable } from '@nestjs/common'; import { PrismaService } from './prisma/prisma.service'; @Injectable() export class AppService { constructor(private readonly prisma: PrismaService) {} getRoot() { return { service: 'lms-be', status: 'ok', }; } getHealth() { return { status: 'ok', uptime: process.uptime(), timestamp: new Date().toISOString(), }; } async getDatabaseHealth() { await this.prisma.$queryRaw`SELECT 1`; return { status: 'ok', provider: 'postgresql', timestamp: new Date().toISOString(), }; } }