forked from datawhale/whale-town-end
- 新增auth模块处理认证逻辑 - 新增security模块处理安全相关功能 - 新增user-mgmt模块管理用户相关操作 - 新增shared模块存放共享组件 - 重构admin模块,添加DTO和Guards - 为admin模块添加测试文件结构
72 lines
1.3 KiB
TypeScript
72 lines
1.3 KiB
TypeScript
/**
|
|
* 应用状态响应 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';
|
|
} |