feat(dict.d.ts): 添加字典API的TypeScript类型描述文件
This commit is contained in:
90
src/types/api/dict.d.ts
vendored
Normal file
90
src/types/api/dict.d.ts
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
import { PageQueryParam, PageResult } from "./base"
|
||||
|
||||
/**
|
||||
* 字典查询参数类型声明
|
||||
*/
|
||||
export interface DictQueryParam extends PageQueryParam {
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
name: string | undefined
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 字典分页列表项声明
|
||||
*/
|
||||
export interface Dict {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
status: number;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典分页项类型声明
|
||||
*/
|
||||
export interface DictPageResult extends PageResult<Dict[]> {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典表单类型声明
|
||||
*/
|
||||
export interface DictFormData {
|
||||
id: number | undefined,
|
||||
name: string,
|
||||
code: string,
|
||||
status: number,
|
||||
remark: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典项查询参数类型声明
|
||||
*/
|
||||
export interface DictItemQueryParam extends PageQueryParam {
|
||||
/**
|
||||
* 字典项名称
|
||||
*/
|
||||
name: string | undefined;
|
||||
/**
|
||||
* 字典编码
|
||||
*/
|
||||
dictCode: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典分页列表项声明
|
||||
*/
|
||||
export interface DictItem {
|
||||
id: number;
|
||||
name: string;
|
||||
value: string;
|
||||
dictCode: string;
|
||||
sort: number;
|
||||
status: number;
|
||||
defaulted: number;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典分页项类型声明
|
||||
*/
|
||||
export interface DictItemPageResult extends PageResult<DictItem[]> {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典表单类型声明
|
||||
*/
|
||||
export interface DictItemFormData {
|
||||
id: number | undefined;
|
||||
dictCode:string,
|
||||
name: string;
|
||||
code: string;
|
||||
value: string;
|
||||
status: number;
|
||||
sort: number;
|
||||
remark: string;
|
||||
}
|
||||
Reference in New Issue
Block a user