79c69e1363
Co-authored-by: Copilot <copilot@github.com>
29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
namespace ControlPlane.Core.Models;
|
|
|
|
public enum ReleaseStatus { Running, Succeeded, PartialFailure, Failed }
|
|
|
|
/// <summary>
|
|
/// 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.
|
|
/// </summary>
|
|
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<TenantReleaseResult> Tenants { get; set; } = [];
|
|
public List<string> OpcNumbers { 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; }
|
|
}
|