feat(types): 修补缺失的API通用类型定义
This commit is contained in:
1 parent
0ac7bef442
commit
d9a4f4ee34
1 file changed
+44
@@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
|
||||||
|
export interface PageQueryParams {
|
||||||
|
pageNum: number;
|
||||||
|
pageSize: number;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface OptionItem {
|
||||||
|
label: string;
|
||||||
|
value: string | number;
|
||||||
|
meta?: any;
|
||||||
|
children?: OptionItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExcelResult {
|
||||||
|
/** 状态码 */
|
||||||
|
code: number;
|
||||||
|
/** 无效数据条数 */
|
||||||
|
invalidCount: number;
|
||||||
|
/** 有效数据条数 */
|
||||||
|
validCount: number;
|
||||||
|
/** 错误信息 */
|
||||||
|
messageList: Array<string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PageResult<T> {
|
||||||
|
total: number;
|
||||||
|
list: T[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiResponse<T = any> {
|
||||||
|
code: number;
|
||||||
|
msg: string;
|
||||||
|
data: T;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BaseEntity {
|
||||||
|
id: number;
|
||||||
|
createTime: string;
|
||||||
|
updateTime: string;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user