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

export enum ProjectGroupTypeEnum {
    PRODUCT = 'PRODUCT',
    PROJECT = 'PROJECT'
}

// 项目基础信息
export interface ProjectGroup extends BaseResponse {
    tenantCode: string;
    type: ProjectGroupTypeEnum;
    projectGroupCode: string;
    projectGroupName: string;
    projectGroupDesc?: string;
    enabled: boolean;
    totalEnvironments: number;
    totalApplications: number;
    sort: number;
}

// 创建项目请求参数
export interface CreateProjectGroupRequest extends BaseRequest {
    tenantCode: string;
    type: ProjectGroupTypeEnum;
    projectGroupCode: string;
    projectGroupName: string;
    projectGroupDesc?: string;
    enabled: boolean;
    sort: number;
}

// 更新项目请求参数
export interface UpdateProjectGroupRequest extends CreateProjectGroupRequest {
    id: number;
}

// 分页查询参数
export interface ProjectGroupQueryParams extends BaseQuery {
    projectGroupName?: string;
    projectGroupCode?: string;
    enabled?: boolean;
}
