Files
monorepo/LCU.API.Internal.Document/LCU.Library.Internal.DocumentModels/Responses/DocumentAuditResponse.cs
T
2026-03-13 09:11:35 -05:00

33 lines
1.2 KiB
C#

using LCU.Library.Internal.DocumentModels.Requests;
using System;
using LCU.Library.Internal.DocumentModels.Converter;
namespace LCU.Library.Internal.DocumentModels.Responses;
[JsonKnownTypes(typeof(DocumentFieldAuditResponse), typeof(DocumentActionAuditResponse))]
[System.Text.Json.Serialization.JsonConverter(typeof(SystemPolymorphicJsonConverter<DocumentAuditResponse>))]
[Newtonsoft.Json.JsonConverter(typeof(NewtonsoftPolymorphicJsonConverter<DocumentAuditResponse>))]
public abstract class DocumentAuditResponse
{
public Guid DocumentId { get; set; }
public string Source { get; set; }
public DateTime Date { get; set; }
public string UserId { get; set; }
}
public class DocumentFieldAuditResponse : DocumentAuditResponse
{
public string Field { get; set; }
[Newtonsoft.Json.JsonConverter(typeof(DynamicObjectJsonConverter))]
public dynamic PreviousValue { get; set; }
[Newtonsoft.Json.JsonConverter(typeof(DynamicObjectJsonConverter))]
public dynamic CurrentValue { get; set; }
}
public class DocumentActionAuditResponse : DocumentAuditResponse
{
public DocumentAction Action { get; set; }
public string ActionDescription { get; set; }
}