feat(service): NestJS kernel skeleton + 10-table kernel schema (P1.1+1.2)
Reuses support-service bootstrap/health/prisma patterns. Kernel-only Prisma
schema (scope/source_handle/actor/channel/thread/participant/interaction/
message_part/outbox/processed_event) with orgId/appId NOT NULL and
@@unique([scopeId, idempotencyKey]). Health verified: {status:ok,db:true}.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { PrismaService } from './prisma/prisma.service';
|
||||
|
||||
@Controller('health')
|
||||
export class HealthController {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
@Get()
|
||||
async check(): Promise<{ status: string; db: boolean }> {
|
||||
let db = false;
|
||||
try {
|
||||
await this.prisma.$queryRaw`SELECT 1`;
|
||||
db = true;
|
||||
} catch {
|
||||
db = false;
|
||||
}
|
||||
return { status: 'ok', db };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user