/** * 应用状态响应 DTO * * 功能描述: * - 定义应用状态接口的响应格式 * - 提供 Swagger 文档生成支持 * * @author angjustinl * @version 1.0.0 * @since 2025-12-17 */ import { ApiProperty } from '@nestjs/swagger'; /** * 应用状态响应 DTO */ export class AppStatusResponseDto { @ApiProperty({ description: '服务名称', example: 'Pixel Game Server', type: String }) service: string; @ApiProperty({ description: '服务版本', example: '1.0.0', type: String }) version: string; @ApiProperty({ description: '运行状态', example: 'running', enum: ['running', 'starting', 'stopping', 'error'], type: String }) status: string; @ApiProperty({ description: '当前时间戳', example: '2025-12-17T15:00:00.000Z', type: String, format: 'date-time' }) timestamp: string; @ApiProperty({ description: '运行时间(秒)', example: 3600, type: Number, minimum: 0 }) uptime: number; @ApiProperty({ description: '运行环境', example: 'development', enum: ['development', 'production', 'test'], type: String }) environment: string; @ApiProperty({ description: '存储模式', example: 'memory', enum: ['database', 'memory'], type: String }) storage_mode: 'database' | 'memory'; }