/**
 * Platform service data shapes for Onebox
 */

export type TPlatformServiceType = 'mongodb' | 'minio' | 'redis' | 'postgresql' | 'rabbitmq' | 'smartproxy' | 'clickhouse' | 'mariadb';
export type TPlatformServiceStatus = 'not-deployed' | 'stopped' | 'starting' | 'running' | 'stopping' | 'failed';
export type TPlatformResourceType = 'database' | 'bucket' | 'cache' | 'queue';

export interface IPlatformRequirements {
  mongodb?: boolean;
  s3?: boolean;
  clickhouse?: boolean;
  redis?: boolean;
  mariadb?: boolean;
}

export interface IPlatformService {
  type: TPlatformServiceType;
  displayName: string;
  resourceTypes: TPlatformResourceType[];
  status: TPlatformServiceStatus;
  containerId?: string;
  isCore?: boolean;
  createdAt?: number;
  updatedAt?: number;
}

export interface IPlatformResource {
  id: number;
  resourceType: TPlatformResourceType;
  resourceName: string;
  platformService: {
    type: TPlatformServiceType;
    name: string;
    status: TPlatformServiceStatus;
  };
  envVars: Record<string, string>;
  createdAt: number;
}
