// 系统参数类型定义

// 主题类型
export type Theme = 'light' | 'dark';

// 系统设置
export interface SystemSettings {
  platformName: string;
  platformLogo?: string;
  systemAnnouncement?: string;
  contactEmail?: string;
  contactPhone?: string;
  address?: string;
  defaultTheme: Theme; // 默认主题
}

// 分类字典（树形结构）
export interface CategoryDictionary {
  id: string;
  code: string;
  name: string;
  type: string; // 分类类型：industry, equipment, crop等
  parentId?: string;
  level: number;
  sortOrder: number;
  description?: string;
  isActive: boolean;
  children?: CategoryDictionary[];
  createdAt: string;
  updatedAt: string;
}

export type CategoryType = 'industry' | 'equipment' | 'crop' | 'operation' | 'other';

// 数据字典（键值对）
export interface DataDictionary {
  id: string;
  code: string;
  name: string;
  category: string; // 字典分类
  value: string;
  label: string;
  sortOrder: number;
  description?: string;
  isSystem: boolean; // 是否系统内置
  isActive: boolean;
  extendData?: Record<string, any>;
  createdAt: string;
  updatedAt: string;
}

export type DictionaryCategory = 
  | 'gender' 
  | 'status' 
  | 'unit' 
  | 'weather' 
  | 'soil_type'
  | 'irrigation_method'
  | 'fertilizer_type'
  | 'pesticide_type'
  | 'task_status'
  | 'task_priority'
  | 'approval_status'
  | 'operation_type'
  | 'other';
