Spaces:
Sleeping
Sleeping
Download Backend/Features/Wallet/IWalletService.cs from Yuruyuruu/LibraryManagement: direct link, hf CLI and curl.
- Browser
- Download file 748 Bytes
-
https://huggingface.co/spaces/Yuruyuruu/LibraryManagement/resolve/main/Backend/Features/Wallet/IWalletService.cs
- Command line
-
hf download hf://spaces/Yuruyuruu/LibraryManagement/Backend/Features/Wallet/IWalletService.cs
-
curl -L -o IWalletService.cs https://huggingface.co/spaces/Yuruyuruu/LibraryManagement/resolve/main/Backend/Features/Wallet/IWalletService.cs
748 Bytes
| using LibraryManagement.Shared.Models; | |
| namespace Backend.Features.Wallet | |
| { | |
| public interface IWalletService | |
| { | |
| Task<decimal> GetBalanceAsync(Guid userId); | |
| Task<IEnumerable<WalletTransactionDto>> GetHistoryAsync(Guid userId); | |
| Task<bool> TopUpAsync(Guid userId, decimal amount, Guid librarianId, string? description = null); | |
| Task<bool> DeductAsync(Guid userId, decimal amount, string description, Guid? referenceId = null); | |
| } | |
| public class WalletTransactionDto | |
| { | |
| public Guid Id { get; set; } | |
| public decimal Amount { get; set; } | |
| public string Type { get; set; } = null!; | |
| public string? Description { get; set; } | |
| public DateTime CreatedAt { get; set; } | |
| } | |
| } | |