add girIgnore

This commit is contained in:
jrojas
2026-06-23 19:03:17 +02:00
parent 52335cc5fa
commit 95c9039c78
321 changed files with 84 additions and 12748 deletions
+29
View File
@@ -0,0 +1,29 @@
using audit_logs.Models;
using audit.Model;
namespace audit_logs.Utils;
public static class AuditRecordMapper
{
public static AuditRecordDto ToDto(this AuditRecord record)
{
return new AuditRecordDto
{
Id = record.Id.ToString(),
EntityType = record.EntityType,
RecordId = record.RecordId,
UserId = record.UserId,
ActionType = record.ActionType,
ActionTime = record.ActionTime,
Reason = record.Reason,
UserIpAddress = record.UserIpAddress,
Changes = record.Changes?.Select(c => new ChangeDto
{
Field = c.Field,
OldValue = AuditRecord.Change.ConvertBsonValue(c.OldValue),
NewValue = AuditRecord.Change.ConvertBsonValue(c.NewValue),
ValueType = c.ValueType
}).ToList() ?? new List<ChangeDto>()
};
}
}