Структура

This commit is contained in:
Халимов Рустам
2026-03-30 00:09:12 +03:00
parent 0209802e9e
commit 89b2eeea6c
124 changed files with 623 additions and 599 deletions
@@ -0,0 +1,9 @@
using Microsoft.EntityFrameworkCore;
namespace Knot.Contracts.Auth.Application.Abstractions;
public interface IAuthDbContext
{
DbSet<T> Set<T>() where T : class;
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
@@ -0,0 +1,11 @@
using Knot.Contracts.Auth.Domain;
using Knot.Shared.Kernel;
namespace Knot.Contracts.Auth.Application.Abstractions;
public interface IAuthUnitOfWork : IUnitOfWork
{
IUserRepository UserRepository { get; }
void Add(UserContract user);
Task<int> SaveChangesAsync(CancellationToken ct = default);
}
@@ -0,0 +1,9 @@
namespace Knot.Contracts.Auth.Application.Abstractions;
public interface IJwtTokenProvider
{
string GenerateAccessToken(Guid userId, string username);
string GenerateRefreshToken();
string Generate(Guid userId, string username, string displayName, string? avatar);
string Generate(Domain.UserContract user);
}