import { ReportType } from '../entities';

/**
 * DTO for creating a report definition.
 */
export interface CreateReportDefinitionDto {
  code: string;
  name: string;
  description?: string;
  category?: string;
  reportType?: ReportType;
  baseQuery?: string;
  queryFunction?: string;
  isSqlBased?: boolean;
  parametersSchema?: Record<string, any>[];
  defaultParameters?: Record<string, any>;
  columnsConfig?: Record<string, any>[];
  totalsConfig?: Record<string, any>[];
  requiredPermissions?: string[];
  isPublic?: boolean;
  isActive?: boolean;
}

/**
 * DTO for creating a report schedule.
 */
export interface CreateReportScheduleDto {
  reportDefinitionId: string;
  name: string;
  cronExpression: string;
  timezone?: string;
  parameters?: Record<string, any>;
  deliveryMethod?: string;
  deliveryConfig?: Record<string, any>;
  exportFormat?: string;
  isActive?: boolean;
}

/**
 * DTO for creating a report recipient.
 */
export interface CreateReportRecipientDto {
  scheduleId: string;
  userId?: string;
  email?: string;
  name?: string;
  isActive?: boolean;
}

/**
 * DTO for creating a custom report.
 */
export interface CreateCustomReportDto {
  baseDefinitionId?: string;
  name: string;
  description?: string;
  customColumns?: Record<string, any>[];
  customFilters?: Record<string, any>[];
  customGrouping?: Record<string, any>[];
  customSorting?: Record<string, any>[];
  isFavorite?: boolean;
}
