Registration rework

+ InvitesRepository
+ AdminsRepository
+ rework jwt
This commit is contained in:
Artemy
2025-06-24 14:27:08 +07:00
parent 410a1ce1cc
commit ce013eae49
37 changed files with 2084 additions and 29 deletions
@@ -0,0 +1,9 @@
using Govor.Core.Models;
namespace Govor.Core.Repositories.Admins;
public interface IAdminsExist
{
bool Exist(Guid guid);
bool Exist(Admin admin);
}
@@ -0,0 +1,9 @@
using Govor.Core.Models;
namespace Govor.Core.Repositories.Admins;
public interface IAdminsReader
{
Task<List<Admin>> GetAllAsync();
Task<Admin> GetByIdAsync(Guid id);
}
@@ -0,0 +1,6 @@
namespace Govor.Core.Repositories.Admins;
public interface IAdminsRepository : IAdminsReader, IAdminsWriter, IAdminsExist
{
}
@@ -0,0 +1,10 @@
using Govor.Core.Models;
namespace Govor.Core.Repositories.Admins;
public interface IAdminsWriter
{
Task AddAsync(Admin admin);
Task UpdateAsync(Admin admin);
Task DeleteAsync(Guid admin);
}
@@ -0,0 +1,9 @@
using Govor.Core.Models;
namespace Govor.Core.Repositories.Invaites;
public interface IInvitesExist
{
bool Exist(Invitation invitation);
bool Exist(Guid guid);
}
@@ -0,0 +1,11 @@
using Govor.Core.Models;
namespace Govor.Core.Repositories.Invaites;
public interface IInvitesReader
{
Task<List<Invitation>> GetAllAsync();
Task<Invitation> GetByIdAsync(Guid id);
Task<Invitation> GetByCodeAsync(string code);
Task<List<Invitation>> GetAdminsInvitesAsync();
}
@@ -0,0 +1,6 @@
namespace Govor.Core.Repositories.Invaites;
public interface IInvitesRepository : IInvitesReader, IInvitesWriter, IInvitesExist
{
}
@@ -0,0 +1,10 @@
using Govor.Core.Models;
namespace Govor.Core.Repositories.Invaites;
public interface IInvitesWriter
{
Task AddAsync(Invitation invitation);
Task UpdateAsync(Invitation invitation);
Task RemoveAsync(Invitation invitation);
}