Refactor: Revert to hard deletes for messages. Remove IsDeleted flag and update repository and configurations accordingly.

This commit is contained in:
google-labs-jules[bot]
2025-07-04 06:03:14 +00:00
parent fab3d6b67b
commit 204e8dba9c
21 changed files with 1299 additions and 185 deletions
@@ -0,0 +1,7 @@
namespace Govor.Contracts.Requests.SignalR;
public class EditMessageRequest
{
public Guid MessageId { get; set; }
public string NewEncryptedContent { get; set; } = string.Empty;
}
@@ -5,6 +5,7 @@ namespace Govor.Contracts.Requests.SignalR;
public record MessageRequest
{
public Guid RecipientId { get; init; }
public RecipientType RecipientType { get; init; } // Added this field
public string EncryptedContent { get; init; } = string.Empty;
public Guid? ReplyToMessageId { get; set; }
public List<MediaReference> MediaAttachments { get; set; } = new();
@@ -0,0 +1,6 @@
namespace Govor.Contracts.Requests.SignalR;
public class RemoveMessageRequest
{
public Guid MessageId { get; set; }
}
@@ -0,0 +1,13 @@
using Govor.Core.Models; // For RecipientType
namespace Govor.Contracts.Responses.SignalR;
public class MessageEditedResponse
{
public Guid MessageId { get; set; }
public string NewEncryptedContent { get; set; } = string.Empty;
public DateTime EditedAt { get; set; }
public Guid SenderId { get; set; } // Original Sender
public Guid RecipientId { get; set; }
public RecipientType RecipientType { get; set; }
}
@@ -0,0 +1,11 @@
using Govor.Core.Models; // For RecipientType
namespace Govor.Contracts.Responses.SignalR;
public class MessageRemovedResponse
{
public Guid MessageId { get; set; }
public Guid SenderId { get; set; } // Original Sender
public Guid RecipientId { get; set; }
public RecipientType RecipientType { get; set; }
}