mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Registration rework
+ InvitesRepository + AdminsRepository + rework jwt
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user