diff --git a/ShoppingAssistantApi.Application/IRepositories/IRefreshTokensRepository.cs b/ShoppingAssistantApi.Application/IRepositories/IRefreshTokensRepository.cs new file mode 100644 index 0000000..492e62e --- /dev/null +++ b/ShoppingAssistantApi.Application/IRepositories/IRefreshTokensRepository.cs @@ -0,0 +1,8 @@ +using ShoppingAssistantApi.Domain.Entities; + +namespace ShoppingAssistantApi.Application.IRepositories; + +public interface IRefreshTokensRepository : IBaseRepository +{ + +} diff --git a/ShoppingAssistantApi.Domain/Entities/RefreshToken.cs b/ShoppingAssistantApi.Domain/Entities/RefreshToken.cs new file mode 100644 index 0000000..e36974b --- /dev/null +++ b/ShoppingAssistantApi.Domain/Entities/RefreshToken.cs @@ -0,0 +1,10 @@ +using ShoppingAssistantApi.Domain.Common; + +namespace ShoppingAssistantApi.Domain.Entities; + +public class RefreshToken : EntityBase +{ + public string Token { get; set; } + + public DateTime ExpiryDateUTC { get; set; } +} diff --git a/ShoppingAssistantApi.Persistance/PersistanceExtentions/RepositoriesExtention.cs b/ShoppingAssistantApi.Persistance/PersistanceExtentions/RepositoriesExtention.cs index e48ae73..3d076e3 100644 --- a/ShoppingAssistantApi.Persistance/PersistanceExtentions/RepositoriesExtention.cs +++ b/ShoppingAssistantApi.Persistance/PersistanceExtentions/RepositoriesExtention.cs @@ -13,6 +13,7 @@ public static class RepositoriesExtention services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(); diff --git a/ShoppingAssistantApi.Persistance/Repositories/RefreshTokensRepository.cs b/ShoppingAssistantApi.Persistance/Repositories/RefreshTokensRepository.cs new file mode 100644 index 0000000..0228cf9 --- /dev/null +++ b/ShoppingAssistantApi.Persistance/Repositories/RefreshTokensRepository.cs @@ -0,0 +1,10 @@ +using ShoppingAssistantApi.Application.IRepositories; +using ShoppingAssistantApi.Domain.Entities; +using ShoppingAssistantApi.Persistance.Database; + +namespace ShoppingAssistantApi.Persistance.Repositories; + +public class RefreshTokensRepository : BaseRepository, IRefreshTokensRepository +{ + public RefreshTokensRepository(MongoDbContext db) : base(db, "RefreshTokens") { } +}