mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
DbGovor init
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using Govor.Core.Models;
|
||||
|
||||
namespace Govor.Core.Repositories;
|
||||
|
||||
public interface IUsersExist
|
||||
{
|
||||
public Task<bool> Exists(User user);
|
||||
public Task<bool> ExistsById(Guid id);
|
||||
public Task<bool> ExistsUsername(string username);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Govor.Core.Models;
|
||||
|
||||
namespace Govor.Core.Repositories;
|
||||
|
||||
public interface IUsersReader
|
||||
{
|
||||
public Task<IEnumerable<User>> GetAll();
|
||||
public Task<User> FindById(Guid id);
|
||||
public Task<IEnumerable<User>> FindByRangeId(IEnumerable<Guid> ids);
|
||||
public Task<User> FindByUsername(string username);
|
||||
public Task<IEnumerable<User>> FindByRangeUsername(IEnumerable<string> usernames);
|
||||
|
||||
public Task<IEnumerable<User>> FindUsersByCreatedDate(DateOnly createdDate);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Govor.Core.Repositories;
|
||||
|
||||
public interface IUsersRepository : IUsersReader, IUsersWriter, IUsersExist
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Govor.Core.Models;
|
||||
|
||||
namespace Govor.Core.Repositories;
|
||||
|
||||
public interface IUsersWriter
|
||||
{
|
||||
public Task Add(User user);
|
||||
public Task Update(User user);
|
||||
public Task Remove(User user);
|
||||
public Task Remove(Guid userId);
|
||||
}
|
||||
Reference in New Issue
Block a user