18 lines
969 B
C#
18 lines
969 B
C#
using MessageService.Domain.Entities;
|
|
|
|
using MessageService.Domain.Models;
|
|
|
|
namespace MessageService.Domain.IReposities
|
|
{
|
|
public interface IConversationReposity
|
|
{
|
|
Task<Conversation?> FindByIdAsync(Guid id, CancellationToken cancellationToken = default);
|
|
Task<IReadOnlyList<ConversationSummary>> ListByUserIdAsync(Guid userId, CancellationToken cancellationToken = default);
|
|
Task<IEnumerable<Conversation>> FindByTargetIdAsync(Guid targetId, CancellationToken cancellationToken = default);
|
|
Task<IEnumerable<Conversation>> FindByStreamKeyAsync(string streamKey, CancellationToken cancellationToken = default);
|
|
Task<Conversation?> FindActiveAsync(Guid userId, Guid targetId, Enums.ChatType chatType, CancellationToken cancellationToken = default);
|
|
void Create(Conversation conversation);
|
|
Task<IEnumerable<string>> FindAllStreamKeyAsync(Guid userId, CancellationToken cancellationToken = default);
|
|
}
|
|
}
|