This commit is contained in:
2026-01-02 15:14:58 +08:00
parent 2f51a0498f
commit d1f2f9089e
6 changed files with 227 additions and 79 deletions

View File

@@ -0,0 +1,20 @@
import { ApiProperty } from '@nestjs/swagger';
import type { DatabaseHealth } from './app.service';
export class HealthResponseDto {
@ApiProperty({
enum: ['OK', 'DOWN'],
example: 'OK',
description: 'Overall service status',
})
status!: DatabaseHealth;
@ApiProperty({ description: 'Server build version', example: '0.0.1' })
version!: string;
@ApiProperty({ description: 'Process uptime in seconds', example: 123 })
uptimeSecs!: number;
@ApiProperty({ enum: ['OK', 'DOWN'], example: 'OK' })
db!: DatabaseHealth;
}