export interface MqttCommunicationLog {
  id: number;
  logTimestamp: string;
  direction: 'UPSTREAM' | 'DOWNSTREAM';
  messageId?: string;
  clientId?: string;
  topic: string;
  payload: string;
  payloadFormat?: 'TEXT' | 'JSON' | 'BINARY';
  qos?: number;
  isRetained?: boolean;
  backendProcessingStatus?: string;
  backendProcessingInfo?: string;
  relatedSessionId?: number;
  relatedTaskId?: number;
}

export interface MqttLogQueryRequest {
  messageId?: string;
  direction?: 'UPSTREAM' | 'DOWNSTREAM';
  clientId?: string;
  topic?: string;
  payloadContains?: string;
  qos?: number;
  startTime?: string; // ISO string for backend
  endTime?: string;   // ISO string for backend
  relatedSessionId?: number;
  relatedTaskId?: number;
  current?: number;
  pageSize?: number;
  sortField?: string;
  sortOrder?: 'ascend' | 'descend';
  // For AntD RangePicker in Form, converted to startTime/endTime before API call
  dateRange?: [any, any]; 
}

export interface PageResponse<T> {
  records: T[];
  total: number;
  current: number;
  size: number;
  // Add other pagination fields if your backend returns them
} 