mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Messages first init
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using Govor.Core.Models;
|
||||
|
||||
namespace Govor.Core.Repositories.Messages;
|
||||
|
||||
public interface IMessagesExist
|
||||
{
|
||||
bool Exist(Message message);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Govor.Core.Models;
|
||||
|
||||
namespace Govor.Core.Repositories.Messages;
|
||||
|
||||
public interface IMessagesReader
|
||||
{
|
||||
Task<List<Message>> GetAllAsync();
|
||||
Task<Message> FindByIdAsync(Guid messageId);
|
||||
Task<List<Message>> FindBySenderIdAsync(Guid senderId);
|
||||
Task<List<Message>> FindByReceiverIdAsync(Guid receiverId);
|
||||
Task<List<Message>> FindBySenderAndReceiverIdAsync(Guid senderId, Guid receiverId);
|
||||
Task<List<Message>> FindBySentAtAsync(DateTime date);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Govor.Core.Repositories.Messages;
|
||||
|
||||
public interface IMessagesRepository : IMessagesReader, IMessagesWriter, IMessagesExist
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Govor.Core.Models;
|
||||
|
||||
namespace Govor.Core.Repositories.Messages;
|
||||
|
||||
public interface IMessagesWriter
|
||||
{
|
||||
void Add(Message message);
|
||||
void Update(Message message);
|
||||
void Delete(Guid messageId);
|
||||
}
|
||||
Reference in New Issue
Block a user