OPC # 0001: Extract OPC into standalone repo
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user