// ==================== 旅游系统配置类型定义 ====================

/**
 * 配置查询参数
 */
export interface ConfigQuery extends PageQuery {
  configKey?: string;
  configName?: string;
  configGroup?: string;
  configType?: string;
  status?: number;
}

/**
 * 配置表单数据
 */
export interface ConfigForm {
  id?: number;
  configKey: string;
  configName: string;
  configValue?: string;
  configType: string;
  configGroup: string;
  configDesc?: string;
  configOptions?: string;
  isRequired: number;
  isEditable: number;
  isSensitive: number;
  sortOrder: number;
  status: number;
}

/**
 * 配置VO
 */
export interface ConfigVO {
  id: number;
  configKey: string;
  configName: string;
  configValue: string;
  configType: string;
  configGroup: string;
  configDesc: string;
  configOptions: string;
  isRequired: number;
  isEditable: number;
  isSensitive: number;
  sortOrder: number;
  status: number;
  createTime: string;
  updateTime: string;
}

/**
 * 配置分类查询参数
 */
export interface ConfigCategoryQuery extends PageQuery {
  categoryCode?: string;
  categoryName?: string;
  status?: number;
}

/**
 * 配置分类表单数据
 */
export interface ConfigCategoryForm {
  id?: number;
  categoryCode: string;
  categoryName: string;
  categoryDesc?: string;
  categoryIcon?: string;
  sortOrder: number;
  status: number;
}

/**
 * 配置分类VO
 */
export interface ConfigCategoryVO {
  id: number;
  categoryCode: string;
  categoryName: string;
  categoryDesc: string;
  categoryIcon: string;
  sortOrder: number;
  status: number;
  createTime: string;
  updateTime: string;
}

/**
 * 配置分组类型
 */
export type ConfigGroup = 'basic' | 'scenic' | 'facility' | 'gis' | 'payment' | 'upload' | 'notification' | 'miniprogram' | 'banner';

/**
 * 配置类型
 */
export type ConfigType = 'text' | 'number' | 'boolean' | 'select' | 'image' | 'file' | 'textarea';

/**
 * 配置分组信息
 */
export interface ConfigGroupInfo {
  code: ConfigGroup;
  name: string;
  icon: string;
  desc: string;
}

/**
 * 配置分组映射
 */
export const CONFIG_GROUPS: Record<ConfigGroup, ConfigGroupInfo> = {
  basic: {
    code: 'basic',
    name: '基础配置',
    icon: 'Setting',
    desc: '系统基础配置信息'
  },
  scenic: {
    code: 'scenic',
    name: '景区管理',
    icon: 'Location',
    desc: '景区相关配置'
  },
  facility: {
    code: 'facility',
    name: '设施管理',
    icon: 'OfficeBuilding',
    desc: '设施相关配置'
  },
  gis: {
    code: 'gis',
    name: 'GIS地图',
    icon: 'MapLocation',
    desc: '地图服务配置'
  },
  payment: {
    code: 'payment',
    name: '支付配置',
    icon: 'Money',
    desc: '支付相关配置'
  },
  upload: {
    code: 'upload',
    name: '文件上传',
    icon: 'Upload',
    desc: '文件上传配置'
  },
  notification: {
    code: 'notification',
    name: '通知配置',
    icon: 'Message',
    desc: '短信邮件通知配置'
  },
  miniprogram: {
    code: 'miniprogram',
    name: '小程序配置',
    icon: 'Iphone',
    desc: '小程序相关配置'
  },
  banner: {
    code: 'banner',
    name: '轮播图管理',
    icon: 'Picture',
    desc: '页面轮播图配置'
  }
}; 