feat(service): add pagination to GetJobs endpoint
GetJobs now accepts page/page_size query parameters and returns JobListResponse instead of raw array. Uses in-memory pagination matching GetJobHistory pattern. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -66,6 +66,12 @@ type JobListResponse struct {
|
||||
PageSize int `json:"page_size"` // 每页条数
|
||||
}
|
||||
|
||||
// JobListQuery contains pagination parameters for active job listing.
|
||||
type JobListQuery struct {
|
||||
Page int `form:"page,default=1" json:"page,omitempty"` // 页码 (从 1 开始)
|
||||
PageSize int `form:"page_size,default=20" json:"page_size,omitempty"` // 每页条数
|
||||
}
|
||||
|
||||
// JobHistoryQuery contains query parameters for job history.
|
||||
type JobHistoryQuery struct {
|
||||
Users string `form:"users" json:"users,omitempty"` // 按用户名过滤 (逗号分隔)
|
||||
|
||||
Reference in New Issue
Block a user