Files
TERES_web_frontend/src/interfaces/database/base.ts
guangfei.zhao d475a0e982 feat(knowledge): enhance knowledge base management with improved interfaces and components
refactor(interfaces): add comprehensive documentation and type definitions
feat(components): implement empty state handling and team filtering in KnowledgeGridView
refactor(hooks): optimize knowledge list fetching with better parameter handling
style(interfaces): improve code readability with detailed comments
2025-10-11 18:30:41 +08:00

42 lines
976 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 通用响应类型接口
* 定义API响应的标准格式
* @template T 响应数据的类型默认为any
*/
export interface ResponseType<T = any> {
/** 响应状态码 */
code: number;
/** 响应数据 */
data: T;
/** 响应消息 */
message: string;
/** HTTP状态码 */
status: number;
}
/**
* GET请求响应类型接口
* 用于GET请求的响应数据结构
* @template T 响应数据的类型默认为any
*/
export interface ResponseGetType<T = any> {
/** 响应数据 */
data: T;
/** 加载状态,可选字段 */
loading?: boolean;
}
/**
* POST请求响应类型接口
* 用于POST请求的响应数据结构支持扩展字段
* @template T 响应数据的类型默认为any
*/
export interface ResponsePostType<T = any> {
/** 响应数据 */
data: T;
/** 加载状态,可选字段 */
loading?: boolean;
/** 其他扩展字段,键为字符串,值为未知类型 */
[key: string]: unknown;
}