import { ActivityEntity, ActivityType } from '@d8d/server/modules/activities/activity.entity';
import { RouteEntity } from '@d8d/server/modules/routes/route.entity';
import { LocationResponse } from './location.types';

// 活动类型定义
export type Activity = ActivityEntity;

// 活动创建请求
export interface CreateActivityRequest {
  name: string;
  description?: string | null;
  type: ActivityType;
  startDate: Date;
  endDate: Date;
  venueLocationId: number;
}

// 活动更新请求
export interface UpdateActivityRequest {
  name?: string;
  description?: string | null;
  type?: ActivityType;
  startDate?: Date;
  endDate?: Date;
  venueLocationId?: number;
  isDisabled?: number;
}

// 活动响应
export interface ActivityResponse {
  id: number;
  name: string;
  description: string | null;
  type: ActivityType;
  startDate: Date;
  endDate: Date;
  venueLocationId: number;
  venueLocation: LocationResponse;
  routes?: RouteEntity[];
  isDisabled: number;
  isDeleted: number;
  createdAt: Date;
  updatedAt: Date;
}

// 活动列表响应
export interface ActivityListResponse {
  items: ActivityResponse[];
  total: number;
  page: number;
  pageSize: number;
}

// 活动搜索参数
export interface ActivitySearchParams {
  keyword?: string;
  type?: ActivityType;
  isDisabled?: number;
  page?: number;
  pageSize?: number;
  sortBy?: string;
  sortOrder?: 'ASC' | 'DESC';
}