完善用户提问功能模块
This commit is contained in:
113
src/servers/api/typings.d.ts
vendored
113
src/servers/api/typings.d.ts
vendored
@ -141,44 +141,34 @@ declare namespace API {
|
||||
}[];
|
||||
}[]
|
||||
|
||||
// 基础分页请求参数
|
||||
export interface BasePageRequest {
|
||||
// 通用响应类型
|
||||
type Response<T = any> = {
|
||||
success: boolean;
|
||||
data: T;
|
||||
message?: string;
|
||||
code?: number;
|
||||
};
|
||||
|
||||
// 分页响应类型
|
||||
type PageResponse<T = any> = {
|
||||
records: T[];
|
||||
total: number;
|
||||
size: number;
|
||||
current: number;
|
||||
pages: number;
|
||||
};
|
||||
|
||||
// 基础分页请求
|
||||
interface BasePageRequest {
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
[property: string]: unknown;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 分页请求参数
|
||||
export interface PageRequest {
|
||||
interface PageRequest {
|
||||
basePageRequest: BasePageRequest;
|
||||
title?: string;
|
||||
status?: string;
|
||||
[property: string]: unknown;
|
||||
}
|
||||
|
||||
// 基础响应格式
|
||||
export interface Response<T = unknown> {
|
||||
code: number;
|
||||
data: T;
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: unknown;
|
||||
}
|
||||
|
||||
// 分页数据响应
|
||||
export interface PageResponse<T> {
|
||||
countId: null;
|
||||
current: number;
|
||||
hitCount: boolean;
|
||||
maxLimit: null;
|
||||
optimizeCountSql: boolean;
|
||||
orders: string[];
|
||||
pages: number;
|
||||
records: T[];
|
||||
searchCount: boolean;
|
||||
size: number;
|
||||
total: number;
|
||||
[property: string]: unknown;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 政策法规数据项
|
||||
@ -286,6 +276,8 @@ declare namespace API {
|
||||
export interface NoticeSearchParams {
|
||||
title?: string;
|
||||
status?: string;
|
||||
pageNo?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
// 帮助中心数据项
|
||||
@ -360,4 +352,61 @@ declare namespace API {
|
||||
pageNo?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
// 用户问题记录类型
|
||||
interface QuestionRecord {
|
||||
id: string;
|
||||
title: string;
|
||||
type: string;
|
||||
content: string;
|
||||
answerContent?: string;
|
||||
userName: string;
|
||||
companyName: string;
|
||||
fullName: string;
|
||||
contactDetails: string;
|
||||
email: string;
|
||||
askTime: string;
|
||||
answerTime?: string;
|
||||
answerBy?: string;
|
||||
isAnswer: string; // 0-未回答,1-已回答
|
||||
isPublished?: number; // 0-未发布,1-已发布
|
||||
isTop?: number; // 0-未置顶,1-已置顶
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
// 问题列表请求参数
|
||||
interface QuestionListRequest {
|
||||
isAnswer?: number; // 0-未回答,1-已回答
|
||||
title?: string;
|
||||
type?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 问题添加请求参数
|
||||
interface QuestionAddRequest {
|
||||
title: string;
|
||||
content: string;
|
||||
type: string;
|
||||
fullName: string;
|
||||
companyName: string;
|
||||
userName: string;
|
||||
contactDetails: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
// 问题回答请求参数
|
||||
interface QuestionAnswerRequest {
|
||||
id: string;
|
||||
answerContent: string;
|
||||
isPublished?: number; // 0-未发布,1-已发布
|
||||
isTop?: number; // 0-未置顶,1-已置顶
|
||||
}
|
||||
|
||||
// 问题状态更新请求参数
|
||||
interface QuestionStatusRequest {
|
||||
id: string;
|
||||
isPublished?: number; // 0-未发布,1-已发布
|
||||
isTop?: number; // 0-未置顶,1-已置顶
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user