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

// 构建方式枚举
export enum BuildTypeEnum {
    JENKINS = 'JENKINS',
    GITLAB_RUNNER = 'GITLAB_RUNNER',
    GITHUB_ACTION = 'GITHUB_ACTION'
}

// 部署方式枚举
export enum DeployTypeEnum {
    K8S = 'K8S',
    DOCKER = 'DOCKER',
    VM = 'VM'
}

// 环境基础信息
export interface Environment extends BaseResponse {
    tenantCode: string;
    envCode: string;
    envName: string;
    envDesc?: string;
    buildType: BuildTypeEnum;
    deployType: DeployTypeEnum;
    sort: number;
}

// 创建环境请求参数
export interface CreateEnvironmentRequest extends BaseRequest {
    tenantCode: string;
    envCode: string;
    envName: string;
    envDesc?: string;
    buildType: BuildTypeEnum;
    deployType: DeployTypeEnum;
    sort: number;
}

// 更新环境请求参数
export interface UpdateEnvironmentRequest extends CreateEnvironmentRequest {
    id: number;
}

// 分页查询参数
export interface EnvironmentQueryParams extends BaseQuery {
    envCode?: string;
    envName?: string;
    buildType?: BuildTypeEnum;
    deployType?: DeployTypeEnum;
}
