Files
cn-rdms-web/src/typings/api/common.d.ts

67 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-03-26 20:18:20 +08:00
/**
* Namespace Api
*
* All backend api type
*/
declare namespace Api {
namespace Common {
/** common params of paginating */
interface PaginatingCommonParams {
/** current page number */
current: number;
/** page size */
size: number;
/** total count */
total: number;
}
/** common params of paginating query list data */
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
records: T[];
}
/** common search params of table */
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
/**
* enable status
*
* - "1": enabled
* - "2": disabled
*/
type EnableStatus = '1' | '2';
2026-06-17 19:27:17 +08:00
/**
* /
*
* []
* /
*/
interface CurrentUserRole {
/**
*
* product_manager / project_manager / developer / tester / watcher / creator / implicit_observer
*/
roleKey: string;
/** 角色中文名(直接展示) */
roleName: string;
}
2026-03-26 20:18:20 +08:00
/** common record */
type CommonRecord<T = any> = {
/** record id */
id: number;
/** record creator */
createBy: string;
/** record create time */
createTime: string;
/** record updater */
updateBy: string;
/** record update time */
updateTime: string;
/** record status */
status: EnableStatus | undefined;
} & T;
}
}