Files
reader-star/apps/admin/src/typings/api/common.d.ts

51 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-01-16 13:06:44 +08:00
/**
* Namespace Api
*
* All backend api type
*/
declare namespace Api {
namespace Common {
/** common params of paginating */
interface PaginatingCommonParams {
/** currentPage page number */
currentPage: number
/** page pageSize */
pageSize: number
2026-01-16 13:06:44 +08:00
/** total count */
total: number
2026-01-16 13:06:44 +08:00
}
/** common params of paginating query list data */
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
list: T[]
2026-01-16 13:06:44 +08:00
}
/** common search params of table */
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'currentPage' | 'pageSize'>
2026-01-16 13:06:44 +08:00
/**
* enable status
*
* - "1": enabled
* - "2": disabled
*/
type EnableStatus = '1' | '2'
2026-01-16 13:06:44 +08:00
/** common record */
type CommonRecord<T = any> = {
/** record id */
id: number
2026-01-16 13:06:44 +08:00
/** record creator */
createBy: string
2026-01-16 13:06:44 +08:00
/** record create time */
createTime: string
2026-01-16 13:06:44 +08:00
/** record updater */
updateBy: string
2026-01-16 13:06:44 +08:00
/** record update time */
updateTime: string
2026-01-16 13:06:44 +08:00
/** record status */
status: EnableStatus | null
} & T
2026-01-16 13:06:44 +08:00
}
}