// 统一的类型定义
export interface RecordDetail {
  id: string;
  fields: Record<string, any>;
}

export interface QueryResult {
  id: string;
  pack_id: string;
  pack_type: string;
  material_code: string;
  material_name: string;
  unit_price: number;
  品类属性?: string;
}

export interface SecondaryProcessResult {
  id: string;
  pack_id: string;
  process_name: string;
  process_difficulty: string;
  estimated_time: number;
}

export interface PricingDetailsResult {
  id: string;
  pack_id: string;
  process_type: string;
  unit_price: number;
  total_price: number;
}

export interface TimelineResult {
  id: number;
  processName: string;
  duration: number;
  startDate: Date;
  endDate: Date;
  adjustedDuration?: number;
}

export interface LabelOptions {
  [key: string]: Array<{ value: string; label: string }>;
}

export interface SelectedLabels {
  [key: string]: string | string[];
}

export interface TimelineAdjustments {
  [key: number]: number;
}

// 日期格式类型
export const DATE_FORMATS = {
  DISPLAY_WITH_TIME: 'yyyy-MM-dd HH:mm',
  DISPLAY_DATE_ONLY: 'yyyy-MM-dd',
  STORAGE_FORMAT: 'yyyy-MM-dd HH:mm:ss',
  CHINESE_DATE: 'yyyy年MM月dd日',
} as const;

export type DateFormatType = keyof typeof DATE_FORMATS;

// 星期显示
export const WEEKDAYS = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] as const;