mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Add private chat support and group model enhancements
Introduces repositories, validators, and integration tests for private chats. Refactors group-related models to support invitations and memberships, updates group repository interfaces and implementations, and enhances message service logic to handle private chat creation and retrieval. Also registers new services and validators in DI, and updates related tests.
This commit is contained in:
@@ -6,9 +6,9 @@ public class ChatGroup
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public Guid ImageId { get; set; }
|
||||
|
||||
public List<string> InviteCode { get; set; }
|
||||
public bool IsChannel { get; set; }
|
||||
public bool IsPrivate { get; set; }
|
||||
public List<Guid> Admins { get; set; } = new();
|
||||
public List<GroupAdmins> Admins { get; set; } = new();
|
||||
public List<GroupMembership> Members { get; set; } = new();
|
||||
public List<GroupInvitation> InviteCodes { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace Govor.Core.Models;
|
||||
|
||||
public class GroupInvitation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid GroupId { get; set; }
|
||||
public Guid UserMakerId { get; set; }
|
||||
public string InvitationCode { get; set; }
|
||||
public string Description {get; set;}
|
||||
public DateTime EndDate { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public int MaxParticipants { get; set; }
|
||||
public List<Guid> GroupMemberships { get; set; } = new();
|
||||
public User? UserMaker { get; set; }
|
||||
}
|
||||
@@ -5,5 +5,6 @@ public class GroupMembership
|
||||
public Guid Id { get; set; }
|
||||
public Guid GroupId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public Guid InvitationId { get; set; }
|
||||
public bool IsBanned { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user