the basis for group and private messages

This commit is contained in:
Artemy
2025-07-04 14:33:54 +07:00
parent fab3d6b67b
commit bdcfd32b11
20 changed files with 418 additions and 207 deletions
+11 -4
View File
@@ -1,9 +1,16 @@
using Govor.Application.Interfaces.Messages;
using Govor.Application.Interfaces.Messages.Parameters;
using Govor.Core.Models;
namespace Govor.API.Services;
namespace Govor.Application.Interfaces;
public interface IGroupService : IMessageSendingService, IMessageManagementService
public interface IGroupService
{
ChatGroup GetGroupByInvite(string code);
Task<ChatGroup> GetGroupByIdAsync(Guid groupId);
Task<ChatGroup> CreateGroupAsync(string name, Guid creatorId, IEnumerable<Guid> initialMemberIds);
Task<Result> AddUserToGroupByInvitationAsync(Guid userId, string invitationCode);
Task<Result> RemoveUserFromGroupAsync(Guid groupId, Guid userId, Guid removedByUserId);
Task<Result> DeleteGroupAsync(Guid groupId, Guid userId);
Task<List<User>> GetGroupMembersAsync(Guid groupId);
Task<List<ChatGroup>>GetUserGroupsAsync(Guid userId);
ChatGroup GetGroupByInviteCode(string code);
}