package com.cameleer.server.core.runtime;

import java.util.List;
import java.util.Optional;
import java.util.UUID;

public interface DeploymentRepository {
    List<Deployment> findByAppId(UUID appId);
    List<Deployment> findByEnvironmentId(UUID environmentId);
    Optional<Deployment> findById(UUID id);
    Optional<Deployment> findActiveByAppIdAndEnvironmentId(UUID appId, UUID environmentId);
    UUID create(UUID appId, UUID appVersionId, UUID environmentId, String containerName);
    void updateStatus(UUID id, DeploymentStatus status, String containerId, String errorMessage);
    void markDeployed(UUID id);
    void markStopped(UUID id);
    void deleteTerminalByAppAndEnvironment(UUID appId, UUID environmentId);
}
