QrRapido/Services/IUserService.cs
Ricardo Carneiro a7af34659b
Some checks failed
Deploy QR Rapido / test (push) Successful in 29s
Deploy QR Rapido / build-and-push (push) Failing after 4s
Deploy QR Rapido / deploy-staging (push) Has been skipped
Deploy QR Rapido / deploy-production (push) Has been skipped
feat: delete e es-py
2025-08-04 20:34:29 -03:00

32 lines
1.7 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 ActivatePremiumStatus(string userId, string stripeSubscriptionId, DateTime expiryDate);
Task DeactivatePremiumStatus(string stripeSubscriptionId);
Task UpdateUserStripeCustomerIdAsync(string userId, string stripeCustomerId);
Task<User?> GetUserByStripeCustomerIdAsync(string customerId);
Task<bool> UpdateUserAsync(User user);
Task<int> GetDailyQRCountAsync(string? userId);
Task<int> IncrementDailyQRCountAsync(string userId);
Task<int> GetRemainingQRCountAsync(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<bool> DeleteQRFromHistoryAsync(string userId, 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);
}
}