events filter

This commit is contained in:
2025-04-02 08:55:46 +08:00
parent 4b7fb7a887
commit 9cb9f62686
7 changed files with 185 additions and 101 deletions

View File

@@ -9,8 +9,8 @@ export enum TimeGranularity {
MONTH = 'month'
}
// 获取事件列表
export async function getEvents(params: {
// 事件查询参数类型
export interface EventsQueryParams {
startTime?: string;
endTime?: string;
eventType?: string;
@@ -19,11 +19,17 @@ export async function getEvents(params: {
userId?: string;
teamId?: string;
projectId?: string;
teamIds?: string[];
projectIds?: string[];
tagIds?: string[];
page?: number;
pageSize?: number;
sortBy?: string;
sortOrder?: 'asc' | 'desc';
}): Promise<{ events: Event[]; total: number }> {
}
// 获取事件列表
export async function getEvents(params: EventsQueryParams): Promise<{ events: Event[]; total: number }> {
const filter = buildFilter(params);
const pagination = buildPagination(params.page, params.pageSize);
const orderBy = buildOrderBy(params.sortBy, params.sortOrder);