import { PageResult, PageParams } from './common';

export interface SchoolItem {
  id: number;
  name: string;
  code: string;
  subOrgCode: string;
  enableDoubleTrack: boolean;
  deleteGroupAuthCode: boolean;
  province: string;
  city: string;
  address: string;
  adminLoginName: string;
  adminName: string;
  accessKey: string;
  accessSecret: string;
  description: string;
}
export interface SchoolListFilter {
  name: string;
}
export type SchoolListPageParam = PageParams<SchoolListFilter>;
export type SchoolListPageRes = PageResult<SchoolItem>;

export type SchoolUpdateParam = Partial<SchoolItem>;

export interface SchoolUpdateAdminParam {
  id: number;
  adminLoginName: string;
  adminName: string;
  password: string;
}

// set
export interface SettingItem {
  id: string | number; // 假设配置项有唯一ID
  type: string;
  detail: string | boolean | number;
  key: string; // 后端可能用key来区分配置项
}

// auth
export interface AuthInfo {
  status: string;
  expireTime: string | null;
  authMode: string;
}

export interface AuthUpdateParams {
  authMode: 'offline' | 'online' | '';
  offlineFile: File | null;
  onlineKey: string;
  onlineSecret: string;
}
