// =============================================================================
// GB5 Platform — Client Deployment Model
// Namespace : GB5Shared.Enums.Client
// Purpose : Single, canonical source of truth for "how is this client deployed"
// — reconciles two columns that previously assigned different
// meanings to the same byte value (see Reconciliation note below).
// =============================================================================
namespace GB5Shared.Enums.Client
{
///
/// Identifies a client's deployment model. Canonical values for both
/// MCLIENT.DEPLOYMENTTYPE and MPROVISIONINGJOB.DEPLOYMENTTYPE going forward.
///
/// Reconciliation note (2026-07-26): these two columns previously disagreed
/// on what the same byte meant —
/// MCLIENT.DeploymentType (pre-existing comment): 0=OnPrem 1=Cloud 2=Hybrid
/// MPROVISIONINGJOB.DeploymentType (pre-existing comment): 0=SaaS 1=OnPrem 2=BYOCloud
/// Harmless in practice because no code read either column at the time this was
/// found — but a real drift risk the moment anything started branching on both.
/// This enum adopts MPROVISIONINGJOB's scheme as canonical (0=SaaS matches what
/// every client created via ClientProvisioningBLL.CreateClientAsync today
/// actually is — a standard multi-tenant SaaS deployment, not on-prem), and adds
/// Hybrid as a fourth value so nothing MCLIENT's original scheme could express is lost.
///
/// As of this reconciliation, neither MCLIENT.DEPLOYMENTTYPE nor
/// MPROVISIONINGJOB.DEPLOYMENTTYPE is read by any code for a behavioral branch —
/// this enum exists to make sure that whenever one is, both tables mean the same
/// thing. See docs/Platform-Architecture-Integration-Reference.md §6.1/§9.7.
///
public enum ClientDeploymentType : byte
{
/// Standard multi-tenant SaaS — GB5-managed infrastructure, the
/// only deployment model with a real, working provisioning pipeline today.
SaaS = 0,
/// Client-hosted infrastructure. Today this is display-only (see
/// the HOSTING_NA_SENTINEL convention in gb-ent-client) — there is no
/// distinct on-prem provisioning/connection-handling path yet.
OnPrem = 1,
/// Bring-your-own-cloud. Not implemented anywhere — no
/// provisioning path, no connection-handling branch, no licensing logic.
/// Do not treat this value as a working feature.
BYOCloud = 2,
/// Mixed model (e.g. some modules SaaS, others on-prem).
/// Carried over from MCLIENT's original scheme; not implemented anywhere.
Hybrid = 3
}
}