This commit is contained in:
2026-08-31 14:42:22 +08:00
72 changed files with 2479 additions and 168 deletions
+2 -1
View File
@@ -41,7 +41,7 @@ namespace GroupService.Domain.Entities
/// <summary>
/// 群头像
/// </summary>
public string? Avatar { get; private set; } = "https://ts1.tc.mm.bing.net/th/id/OIP-C.XiB9NHwI57WPmotCbXuwawAAAA?rs=1&pid=ImgDetMain&o=7&rm=3";
public string? Avatar { get; private set; }
public long MaxSequenceId { get; private set; } = 0;
public string LastMessage { get; private set; } = string.Empty;
public string LastSenderName { get; private set; } = string.Empty;
@@ -52,6 +52,7 @@ namespace GroupService.Domain.Entities
{
Name = name;
GroupMaster = groupMaster;
Avatar = $"https://api.dicebear.com/7.x/thumbs/svg?seed={Guid.NewGuid()}";
AddDomainEvent(new GroupCreateDomainEvent(this));
}
@@ -5,6 +5,8 @@ namespace GroupService.Domain.IReposities
public interface IGroupInvitationReposity
{
void Create(GroupInvitation invitation);
void CreateRange(IEnumerable<GroupInvitation> invitations);
Task<GroupInvitation?> FindByIdAsync(Guid id);
Task<GroupInvitation?> FindByGroupIdAndUserIdAsync(Guid groupId, Guid userId);
}
}
@@ -29,6 +29,7 @@ namespace GroupService.Domain.IReposities
/// <param name="member"></param>
/// <returns></returns>
GroupMember Create(GroupMember member);
void CreateRange(IEnumerable<GroupMember> members);
/// <summary>
/// 检查成员是否存在
/// </summary>
@@ -36,5 +37,7 @@ namespace GroupService.Domain.IReposities
/// <returns>存在返回true,否则返回false</returns>
Task<bool> CheckMemberExistAsync(Guid groupId, Guid userId);
Task<GroupMember?> FindByIdAsync(Guid id);
Task<bool> CheckMemberAdminAsync(Guid groupId, Guid userId);
}
}
@@ -7,5 +7,6 @@ namespace GroupService.Domain.IReposities
void Create(GroupJoinRequest request);
Task<GroupJoinRequest> FindByIdAsync(Guid id);
Task<IEnumerable<GroupJoinRequest?>> FindByGroupIdAsync(Guid groupId);
Task<IEnumerable<GroupJoinRequest>> FindByUserIdAsync(Guid userId);
}
}