import {BaseQuery, BaseResponse} from "@/types/base";

// 系统类型枚举
export enum SystemType {
  JENKINS = 'JENKINS',
  GIT = 'GIT',
  ZENTAO = 'ZENTAO'
}

// 认证方式枚举
export enum AuthType {
  BASIC = 'BASIC',
  TOKEN = 'TOKEN',
  OAUTH = 'OAUTH'
}

// 同步状态枚举
export enum SyncStatus {
  SUCCESS = 'SUCCESS',
  FAILED = 'FAILED',
  RUNNING = 'RUNNING'
}

// 查询参数接口
export interface ExternalSystemQuery extends BaseQuery {
  name?: string;
  type?: SystemType;
  enabled?: boolean;
}

// 响应数据接口
export interface ExternalSystemResponse extends BaseResponse {
  name: string;
  type: SystemType;
  url: string;
  remark?: string;
  sort: number;
  enabled: boolean;
  authType: AuthType;
  username?: string;
  password?: string;
  token?: string;
  lastConnectTime?: string;
  config?: string;
}

// 请求数据接口
export interface ExternalSystemRequest {
  name: string;
  type: SystemType;
  url: string;
  remark?: string;
  sort: number;
  enabled: boolean;
  authType: AuthType;
  username?: string;
  password?: string;
  token?: string;
  config?: string;
} 