namespace EntitlementDAL.Enums;
// ── Core domain enums (byte-backed to match the TINYINT / SMALLINT columns) ──
/// MENTITLEMENTSUBSCRIPTION.SUBSCRIPTIONSTATUS
public enum SubscriptionStatusEnum : byte
{
Pending = 0,
Active = 1,
Expired = 2,
Suspended = 3
}
/// MENTITLEMENT.ENTITLEMENTSOURCE
public enum EntitlementSourceEnum : byte
{
Plan = 0,
Addon = 1,
Promotion = 2,
AdminOverride = 3
}
/// MENTITLEMENTLICENSE.LICENSETYPE
public enum LicenseTypeEnum : byte
{
Web = 0,
Mobile = 1,
Portal = 2,
Api = 3
}
/// MENTITLEMENTFEATURE.FEATURETYPE
public enum FeatureTypeEnum : byte
{
Boolean = 0,
Quota = 1,
Config = 2
}
/// MENTITLEMENTFEATUREFLAG.FLAGSTATUS
public enum FlagStatusEnum : byte
{
Off = 0,
On = 1,
KillSwitch = 2
}
/// MENTITLEMENTFEATUREFLAG.ROLLOUTTYPE
public enum RolloutTypeEnum : byte
{
Global = 0,
BetaClients = 1,
SelectedClients = 2,
SelectedUsers = 3,
Percentage = 4
}
/// MENTITLEMENTFEATUREFLAGTARGET.TARGETTYPE
public enum TargetTypeEnum : byte
{
Client = 0,
User = 1
}
/// MPROVISIONINGJOB.PROVISIONINGMODE
public enum ProvisioningModeEnum : byte
{
QuickStart = 0,
Managed = 1
}
/// MPROVISIONINGJOB.JOBSTATUS
public enum ProvisioningJobStatusEnum : byte
{
Queued = 0,
Running = 1,
Completed = 2,
Failed = 3,
PartialFail = 4
}
///
/// Coarse, client-safe flag state carried on BundleEntitlementItemDto.FlagState (the signed
/// GetBundle payload). Not a DB column — a bundle-level collapse of the same FlagStatusEnum /
/// RolloutTypeEnum values the 9-layer resolution algorithm (EntitlementService.IsFeatureEnabledAsync)
/// consults, chosen so a bundle consumer (gb-ent-client) never needs to see raw "Kill Switch"
/// wording — it renders "Undergoing maintenance" instead, per the client-portal design decision.
/// Bundles are issued per-client with no specific user in scope, so this mirrors only the
/// client-resolvable layers (1 kill switch, 2 not-licensed, 3 globally-off, 5 beta-programme
/// membership) — the per-user layers (4 user-target override, 6 percentage rollout) require a
/// userId and stay live-checked per request via IsFeatureEnabledAsync, never baked into the
/// signed snapshot.
///
public enum BundleFlagStateEnum : byte
{
Normal = 0, // no gating flag, or flag On/Global with no beta/kill-switch/off condition
BetaPreview = 1, // RolloutType=BetaClients and the client is enrolled in that programme
Maintenance = 2, // FlagStatus=KillSwitch — client-facing "Undergoing maintenance"
Hidden = 3 // not licensed (grant disabled) or FlagStatus=Off, or beta gating with no membership
}
/// MENTITLEMENTCLIENTUSER.ROLE — also the value carried (as "CLIENT_ADMIN"/"CLIENT_USER")
/// in the client JWT's Role claim (see EntitlementBLL.Auth.ClientJwtClaimTypes).
public enum ClientUserRoleEnum : byte
{
ClientAdmin = 0,
ClientUser = 1
}
/// MENTITLEMENTCLIENTUSER.STATUS — unlike DXP's equivalent (a Status==2 check that
/// existed but was never triggered by any threshold), this column IS the live lockout mechanism
/// for Entitlement client users: Status=2 blocks both login and refresh-token rotation.
public enum ClientUserStatusEnum : byte
{
Active = 1,
Locked = 2,
Deleted = 3
}
/// MENTITLEMENTCHANGEREQUEST.REQUESTTYPE
public enum ChangeRequestTypeEnum : byte
{
ChangePlan = 0,
Renew = 1,
BetaEnrol = 2,
BetaOptOut = 3
}
/// MENTITLEMENTCHANGEREQUEST.REQUESTSTATUS — the business status, kept separate from
/// the generic row-active STATUS column, same split MENTITLEMENTSUBSCRIPTION already uses
/// (SUBSCRIPTIONSTATUS vs STATUS).
public enum ChangeRequestStatusEnum : byte
{
Pending = 0,
Approved = 1,
Rejected = 2
}