OPC # 0001: Extract OPC into standalone repo

This commit is contained in:
amadzarak
2026-04-25 17:26:42 -04:00
commit 42383bdc03
170 changed files with 21365 additions and 0 deletions
@@ -0,0 +1,47 @@
namespace ControlPlane.Core.Models;
public enum ProvisioningStatus
{
Pending,
Running,
Compensating,
Failed,
Completed
}
[Flags]
public enum CompletedSteps
{
None = 0,
InfrastructureProvisioned = 1 << 0,
KeycloakProvisioned = 1 << 1,
VaultVerified = 1 << 2,
DatabaseMigrated = 1 << 3,
HandoffSent = 1 << 4
}
public class ProvisioningJob
{
public Guid Id { get; set; } = Guid.NewGuid();
public string ClientName { get; set; } = string.Empty;
public string StateCode { get; set; } = string.Empty;
public string Subdomain { get; set; } = string.Empty;
public string AdminEmail { get; set; } = string.Empty;
public string SiteCode { get; set; } = string.Empty;
public string Environment { get; set; } = "fdev";
public TenantTier Tier { get; set; } = TenantTier.Shared;
/// <summary>
/// Snapshot of the StackConfig at the time provisioning was requested.
/// Immutable after the job is created.
/// </summary>
public StackConfig StackConfig { get; set; } = StackConfig.DefaultForTier(TenantTier.Shared);
public ProvisioningStatus Status { get; set; } = ProvisioningStatus.Pending;
public CompletedSteps CompletedSteps { get; set; } = CompletedSteps.None;
public string? FailureReason { get; set; }
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
public DateTimeOffset? CompletedAt { get; set; }
}