2026-01-27 09:48:42 +08:00
|
|
|
/**
|
|
|
|
|
* Namespace Api
|
|
|
|
|
*
|
|
|
|
|
* All backend api type
|
|
|
|
|
*/
|
|
|
|
|
declare namespace Api {
|
|
|
|
|
namespace Question {
|
|
|
|
|
/** common params of paginating */
|
|
|
|
|
interface PaginatingCommonParams {
|
2026-01-28 08:33:36 +08:00
|
|
|
/** pageIndex page number */
|
|
|
|
|
pageIndex: number
|
2026-01-27 09:48:42 +08:00
|
|
|
/** page size */
|
2026-01-28 08:33:36 +08:00
|
|
|
pageSizes: number
|
2026-01-27 09:48:42 +08:00
|
|
|
/** total count */
|
|
|
|
|
total: number
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** common params of paginating query list data */
|
|
|
|
|
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
|
2026-01-28 08:33:36 +08:00
|
|
|
data: T[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** get question library list all params */
|
|
|
|
|
interface GetQuestionLibraryListAllParams {
|
|
|
|
|
/** question id */
|
|
|
|
|
questionId: number
|
|
|
|
|
/** pageIndex page number */
|
|
|
|
|
pageIndex: number
|
|
|
|
|
/** page size */
|
|
|
|
|
pageSizes: number
|
|
|
|
|
/** search keyword */
|
|
|
|
|
keyWords?: string
|
2026-01-27 09:48:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** add params */
|
|
|
|
|
interface AddParams {
|
|
|
|
|
/** question id */
|
2026-01-28 08:33:36 +08:00
|
|
|
id: number
|
2026-01-27 09:48:42 +08:00
|
|
|
/** question name */
|
|
|
|
|
name: string
|
|
|
|
|
/** question content */
|
|
|
|
|
questionContent: string
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-28 08:33:36 +08:00
|
|
|
/** add question library params */
|
|
|
|
|
interface AddQuestionLibraryParams {
|
|
|
|
|
/** question library id */
|
|
|
|
|
id: number
|
|
|
|
|
/** question library name */
|
|
|
|
|
name: string
|
|
|
|
|
/** question library content */
|
|
|
|
|
answer: string
|
|
|
|
|
/** question id */
|
|
|
|
|
questionId: number
|
|
|
|
|
/** question library image url */
|
|
|
|
|
imageUrl: string
|
|
|
|
|
/** question library type */
|
|
|
|
|
type: QuestionScoreType
|
|
|
|
|
/** is priority 0: no 1: yes */
|
|
|
|
|
IsGood: number
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-27 09:48:42 +08:00
|
|
|
/** common search params of table */
|
|
|
|
|
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* enable status
|
|
|
|
|
*
|
|
|
|
|
* - "1": enabled
|
|
|
|
|
* - "2": disabled
|
|
|
|
|
*/
|
|
|
|
|
type EnableStatus = '1' | '2'
|
|
|
|
|
|
|
|
|
|
/** question score type */
|
|
|
|
|
type QuestionScoreType = '1' | '2' /** 固定分数 | 答题个数 */
|
|
|
|
|
|
|
|
|
|
/** competition round type */
|
|
|
|
|
type CompetitionRoundType = '1' | '2' /** 题包环节 | 加时环节 */
|
|
|
|
|
|
|
|
|
|
/** 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 | null
|
|
|
|
|
} & T
|
|
|
|
|
}
|
|
|
|
|
}
|