26 lines
1.2 KiB
C#
26 lines
1.2 KiB
C#
using QRRapidoApp.Models;
|
|
using QRRapidoApp.Models.ViewModels;
|
|
|
|
namespace QRRapidoApp.Services
|
|
{
|
|
public interface IUserService
|
|
{
|
|
Task<User?> GetUserAsync(string userId);
|
|
Task<User?> GetUserByEmailAsync(string email);
|
|
Task<User?> GetUserByProviderAsync(string provider, string providerId);
|
|
Task<User> CreateUserAsync(string email, string name, string provider, string providerId);
|
|
Task UpdateLastLoginAsync(string userId);
|
|
Task<bool> UpdateUserAsync(User user);
|
|
Task<int> GetDailyQRCountAsync(string? userId);
|
|
Task<int> DecrementDailyQRCountAsync(string userId);
|
|
Task<bool> CanGenerateQRAsync(string? userId, bool isPremium);
|
|
Task SaveQRToHistoryAsync(string? userId, QRGenerationResult qrResult);
|
|
Task<List<QRCodeHistory>> GetUserQRHistoryAsync(string userId, int limit = 50);
|
|
Task<QRCodeHistory?> GetQRDataAsync(string qrId);
|
|
Task<int> GetQRCountThisMonthAsync(string userId);
|
|
Task<string> GetUserEmailAsync(string userId);
|
|
Task MarkPremiumCancelledAsync(string userId, DateTime cancelledAt);
|
|
Task<List<User>> GetUsersForHistoryCleanupAsync(DateTime cutoffDate);
|
|
Task DeleteUserHistoryAsync(string userId);
|
|
}
|
|
} |