Add audit table.

This commit is contained in:
2020-06-09 22:23:17 +01:00
parent af07f790fd
commit c6941d1450
7 changed files with 4279 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
{
public class Audit : BaseModel<long>
{
public AuditType Type { get; set; }
[Required]
public string UserId { get; set; }
public string Table { get; set; }
public JsonObject<Dictionary<string, object>> Keys { get; set; }
public JsonObject<Dictionary<string, object>> OldValues { get; set; }
public JsonObject<Dictionary<string, object>> NewValues { get; set; }
public JsonObject<List<string>> AffectedColumns { get; set; }
[Required]
public virtual ApplicationUser User { get; set; }
}
}