namespace ControlPlane.Core.Models;
public enum ReleaseStatus { Running, Succeeded, PartialFailure, Failed }
///
/// Persisted record of a release — a coordinated redeploy of all tenant containers
/// in a target environment to the latest clarity-server image.
/// Stored in ClientAssets/releases.json.
///
public class ReleaseRecord
{
public string Id { get; set; } = Guid.NewGuid().ToString("N")[..8];
public string Environment { get; set; } = string.Empty; // fdev | uat | prod | all
public string ImageName { get; set; } = string.Empty;
public ReleaseStatus Status { get; set; } = ReleaseStatus.Running;
public DateTimeOffset StartedAt { get; set; } = DateTimeOffset.UtcNow;
public DateTimeOffset? FinishedAt { get; set; }
public List Tenants { get; set; } = [];
}
public class TenantReleaseResult
{
public string Subdomain { get; set; } = string.Empty;
public string ContainerName { get; set; } = string.Empty;
public bool Success { get; set; }
public string? Error { get; set; }
}