refactor: ♻️ 重构API为静态方法实现模块化管理,并将types.ts重命名为model.ts用于存放接口模型定义

This commit is contained in:
hxr
2024-05-04 12:53:08 +08:00
parent a211053176
commit 088bc5e48f
37 changed files with 875 additions and 831 deletions

71
src/api/dept/model.ts Normal file
View File

@@ -0,0 +1,71 @@
/**
* 部门查询参数
*/
export interface DeptQuery {
keywords?: string;
status?: number;
}
/**
* 部门类型
*/
export interface DeptVO {
/**
* 子部门
*/
children?: DeptVO[];
/**
* 创建时间
*/
createTime?: Date;
/**
* 部门ID
*/
id?: number;
/**
* 部门名称
*/
name?: string;
/**
* 父部门ID
*/
parentId?: number;
/**
* 排序
*/
sort?: number;
/**
* 状态(1:启用0:禁用)
*/
status?: number;
/**
* 修改时间
*/
updateTime?: Date;
}
/**
* 部门表单类型
*/
export interface DeptForm {
/**
* 部门ID(新增不填)
*/
id?: number;
/**
* 部门名称
*/
name?: string;
/**
* 父部门ID
*/
parentId: number;
/**
* 排序
*/
sort?: number;
/**
* 状态(1:启用0禁用)
*/
status?: number;
}