InfiniLore / infinilore.cs

GNU General Public License v3.0
2 stars 1 forks source link

make a better thing of this JSON of changed properties #25

Open github-actions[bot] opened 5 hours ago

github-actions[bot] commented 5 hours ago

📝 Todo : make a better thing of this JSON of changed properties

Description:

Code Snippet:


using System.Diagnostics.CodeAnalysis;

namespace InfiniLore.Server.Data.Models.Base;
// ---------------------------------------------------------------------------------------------------------------------
// Code
// ---------------------------------------------------------------------------------------------------------------------
[SuppressMessage("ReSharper", "EntityFramework.ModelValidation.UnlimitedStringLength")]
public class AuditLog<T> where T : BaseContent<T> {
    [Key] public Guid Id { get; set; }

    public required T Content { get; set; }
    public Guid ContentId { get; set; }
    public required Guid UserId { get; set; }

    public DateTime ChangeDate { get; set; } = DateTime.UtcNow;
    public string ChangeType { get; set; } = string.Empty;// TODO add ChangeType predefined stuff : "Created", "Updated", "Deleted"
    public string ChangedProperties { get; set; } = string.Empty;// TODO make a better thing of this JSON of changed properties
}

File:
https://github.com/InfiniLore/infinilore.cs/blob/bf5298d99b5ce01ee03ccaec9cb0721cee38c5a4/src/server/InfiniLore.Server.Data.Models/Base/AuditLog.cs#L21