♻️ Moving to MagicOnion

This commit is contained in:
2025-07-07 21:54:51 +08:00
parent 1672d46038
commit 8d2f4a4c47
41 changed files with 790 additions and 530 deletions

View File

@ -0,0 +1,30 @@
using DysonNetwork.Shared.Models;
using MagicOnion;
using NodaTime;
namespace DysonNetwork.Shared.Services;
public interface IMagicSpellService : IService<IMagicSpellService>
{
/// <summary>
/// Creates a new magic spell
/// </summary>
Task<MagicSpell> CreateMagicSpell(
Account account,
MagicSpellType type,
Dictionary<string, object> meta,
Instant? expiredAt = null,
Instant? affectedAt = null,
bool preventRepeat = false
);
/// <summary>
/// Gets a magic spell by its token
/// </summary>
Task<MagicSpell?> GetMagicSpellAsync(string token);
/// <summary>
/// Consumes a magic spell
/// </summary>
Task ApplyMagicSpell(string token);
}