feat(services): declare entitlements + currency-spend primitives

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-05-29 13:27:22 -04:00
parent 7b5edb7c65
commit b4f6992918
3 changed files with 76 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
namespace SVSim.Database.Services;
/// <summary>The scalar wallet currencies the central debit primitive understands.</summary>
public enum SpendCurrency { Crystal, Rupee, RedEther, SpotPoint }
public enum SpendOutcome { Success, Insufficient }
/// <summary>
/// Result of a <see cref="ICurrencySpendService.TrySpendAsync"/> call. <see cref="PostStateTotal"/>
/// is the balance the client should show after the spend — the real post-deduction balance, or the
/// freeplay effective balance when the spend was a freeplay no-op.
/// </summary>
public sealed record SpendResult(SpendOutcome Outcome, long PostStateTotal)
{
public bool Success => Outcome == SpendOutcome.Success;
}